Inservice patch sometimes fails during restart script

Bug #2031330 reported by Luis Sampaio
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Low
Luis Sampaio

Bug Description

Brief Description
-----------------

Sometimes the current inservice test patch fails during the restart script with error below:

Severity
--------
Minor

Steps to Reproduce
------------------
Generate a debian test patch using the script below:
https://opendev.org/starlingx/update/src/branch/master/sw-patch/scripts/build_test_patches.py
Once that is done, try to apply the patch it fails sometimes during the host-install stage with below error:

2023-08-04T21:07:06: sw-patch-agent[69400]: patch_agent.py(503): INFO: Mounting the new deployment
2023-08-04T21:07:06: sw-patch-agent[69400]: patch_agent.py(510): INFO: Running in-service patch-scripts
2023-08-04T21:07:06: sw-patch-agent[69400]: patch_agent.py(82): INFO: Synced restart scripts from controller: b'receiving incremental file list\n23.09_NRR_INSVC_example-restart\n\nsent 52 bytes received 3,782 bytes 7,668.00 bytes/sec\ntotal size is 3,632 speedup is 0.95\n'
2023-08-04T21:07:06.917: run-patch-scripts: Running 1 in-service patch scripts
2023-08-04T21:07:06.938: 23.09_NRR_INSVC_example-restart: /run/patching/patch-scripts/23.09_NRR_INSVC_example-restart: Restarting sysinv-agent
2023-08-04T21:07:07.981: 23.09_NRR_INSVC_example-restart: /run/patching/patch-scripts/23.09_NRR_INSVC_example-restart: Restarting horizon
2023-08-04T21:07:43.202: 23.09_NRR_INSVC_example-restart: /run/patching/patch-scripts/23.09_NRR_INSVC_example-restart: Failed to restart horizon
2023-08-04T21:07:43: sw-patch-agent[69400]: patch_agent.py(518): ERROR: In-Service patch installation failed
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/cgcs_patch/patch_agent.py", line 512, in handle_install
    subprocess.check_output(run_insvc_patch_scripts_cmd, stderr=subprocess.STDOUT)
  File "/usr/lib/python3.9/subprocess.py", line 424, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/lib/python3.9/subprocess.py", line 528, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '/usr/sbin/run-patch-scripts' returned non-zero exit status 1.
2023-08-04T21:07:43: sw-patch-agent[69400]: patch_agent.py(519): ERROR: Command output: b''

Expected Behavior
------------------
Patch should be applied without errors

Workaround
----------
Try host-install multiple times

Luis Sampaio (lsampaio)
Changed in starlingx:
assignee: nobody → Luis Sampaio (lsampaio)
Changed in starlingx:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on update (master)

Change abandoned by "Luis Sampaio <email address hidden>" on branch: master
Review: https://review.opendev.org/c/starlingx/update/+/891082
Reason: Will send a new review

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to update (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/starlingx/update/+/891330

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to update (master)

Reviewed: https://review.opendev.org/c/starlingx/update/+/891330
Committed: https://opendev.org/starlingx/update/commit/2d289c0296138c65ac0dcbcb7233268604c8a61a
Submitter: "Zuul (22348)"
Branch: master

commit 2d289c0296138c65ac0dcbcb7233268604c8a61a
Author: Luis Sampaio <email address hidden>
Date: Mon Aug 14 09:17:32 2023 -0700

    Update test-patches restart script

    Sometimes the current script can trigger an issue while
    restarting horizon so this commit updates the test patches
    script to use a simpler script.

    Test Plan:
    PASS: build test patch and check the restart script inside
    the patch file was updated.
    PASS: Applied test patch on latest build

    Closes-bug: 2031330
    Signed-off-by: Luis Sampaio <email address hidden>
    Change-Id: Ia907d8b95526c35ba5992d7106178bf480c97986

Changed in starlingx:
status: In Progress → Fix Released
Ghada Khalil (gkhalil)
Changed in starlingx:
importance: Undecided → Low
tags: added: stx.9.0 stx.update
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.