[PATCH] opal: prd_info: Add resilience to service check
Deborah McLemore
debmc at us.ibm.com
Sat Apr 7 15:20:54 UTC 2018
We are getting -1 back, what is the expected exit status from systemd
stop ?
Sent from my iPhone
> On Apr 7, 2018, at 9:23 AM, Vasant Hegde <hegdevasant at linux.vnet.ibm.com>
wrote:
>
>> On 04/07/2018 07:40 PM, Deb McLemore wrote:
>> When the opal-prd.service is running and attempt to stop is
>> performed, ignore the exit status and continue.
>
> Deb,
>
> Can you please explain why do you want to ignore exit status here?
> Is there any issues?
>
> -Vasant
>
>
>
>>
>> Signed-off-by: Deb McLemore <debmc at linux.vnet.ibm.com>
>> ---
>> src/opal/prd_info.c | 20 ++++----------------
>> 1 file changed, 4 insertions(+), 16 deletions(-)
>>
>> diff --git a/src/opal/prd_info.c b/src/opal/prd_info.c
>> index 4082a18..2db9413 100644
>> --- a/src/opal/prd_info.c
>> +++ b/src/opal/prd_info.c
>> @@ -73,7 +73,7 @@ static int prd_dev_query(fwts_framework *fw)
>>
>> static int prd_service_check(fwts_framework *fw, int *restart)
>> {
>> - int rc = FWTS_OK, status = 0, stop_status = 0;
>> + int rc = FWTS_OK, status = 0;
>> char *command;
>> char *output = NULL;
>>
>> @@ -97,25 +97,13 @@ static int prd_service_check(fwts_framework *fw, int
*restart)
>> goto out;
>> case 0: /* "running" */
>> command = "systemctl stop opal-prd.service 2>&1";
>> - stop_status = fwts_exec2(command, &output);
>> + fwts_exec2(command, &output);
>>
>> if (output)
>> free(output);
>>
>> - switch (stop_status) {
>> - case 0:
>> - *restart = 1;
>> - break;
>> - default:
>> - fwts_failed(fw, LOG_LEVEL_HIGH, "OPAL PRD
Info",
>> - "Attempt was made to stop the "
>> - "opal-prd.service but was not "
>> - "successful. Try to "
>> - "\"sudo systemctl stop "
>> - "opal-prd.service\" and retry.");
>> - rc = FWTS_ERROR;
>> - goto out;
>> - }
>> + *restart = 1;
>> + break;
>> default:
>> break;
>> }
>>
>
>
> --
> fwts-devel mailing list
> fwts-devel at lists.ubuntu.com
> Modify settings or unsubscribe at:
https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.ubuntu.com_mailman_listinfo_fwts-2Ddevel&d=DwIGaQ&c=jf_iaSHvJObTbx-siA1ZOg&r=V3KRDPsp3yMosW9R4elWYg&m=Sy-O20yWd_N3piZoJOEzigB1XzmLV4OUCfEyl3ENAcc&s=oPh1ACx1NGTgif-0V5BIQffXXqjymI8QC_bagI2jZsA&e=
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/fwts-devel/attachments/20180407/72d05220/attachment.html>
More information about the fwts-devel
mailing list