Skip to content

[SonicHost] Ignore non-zero return code from 'supervisorctl status' in critical_process_status()#2474

Merged
jleveque merged 1 commit intosonic-net:masterfrom
jleveque:ignore_supervisorctl_error_code
Nov 6, 2020
Merged

[SonicHost] Ignore non-zero return code from 'supervisorctl status' in critical_process_status()#2474
jleveque merged 1 commit intosonic-net:masterfrom
jleveque:ignore_supervisorctl_error_code

Conversation

@jleveque
Copy link
Contributor

@jleveque jleveque commented Nov 5, 2020

Description of PR

Summary

Ignore non-zero return code from supervisorctl status command when called from SonicHost.critical_process_status()

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Approach

What is the motivation for this PR?

As part of migrating all Python code in SONiC to Python 3, we must upgrade supervisor to version >= 4.0.0, as this is the first version which supports Python 3. However, as of version 4.0.0, the return codes from supervisorctl status have changed, such that if any process is not in a RUNNING state--even if it is expected (expected exit or even stopped by user)--it will return 3. Thus, we need to ignore the return code from supervisorctl status.

How did you do it?

Add module_ignore_errors=True argument to self.command("docker exec {} supervisorctl status".format(service)) call

How did you verify/test it?

Run tests against a DUT, ensure sanity check passes. Do this with both supervisor 3.x and 4.x.

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

@jleveque jleveque requested review from lguohan and yxieca November 5, 2020 22:24
@jleveque jleveque self-assigned this Nov 5, 2020
@jleveque jleveque merged commit e6522a5 into sonic-net:master Nov 6, 2020
@jleveque jleveque deleted the ignore_supervisorctl_error_code branch November 6, 2020 18:21
jleveque added a commit that referenced this pull request Nov 17, 2020
…us' when checking PMon container (#2544)

This PR is an addendum to #2474, which ignores any non-zero return value from calls to `supervisorctl status`. However, in my previous PR, I missed making the same change to this second call to `supervisorctl status`.
jleveque pushed a commit that referenced this pull request Dec 9, 2020
Fixes # Reboot test is failed due to issue with supervisorctl: status command returns exit code. This PR is an addendum to #2474 and #2544

Signed-off-by: Nazar Tkachuk <nazarx.tkachuk@intel.com>
antoninamelnyk pushed a commit to antoninamelnyk/sonic-mgmt that referenced this pull request Dec 11, 2020
Fixes # Reboot test is failed due to issue with supervisorctl: status command returns exit code. This PR is an addendum to sonic-net#2474 and sonic-net#2544

Signed-off-by: Nazar Tkachuk <nazarx.tkachuk@intel.com>
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
…rm-common] advance submodule head (sonic-net#12492)

linkmgrd:
* d7d6635 2022-10-21 | Fix link prober state event report twice issue (sonic-net#149) (HEAD -> 202205) [Longxiang Lyu]
* 0ef3296 2022-10-21 | [active-active] Add support to send/handle mux probe request (sonic-net#147) [Longxiang Lyu]
* a66fa34 2022-10-17 | [active-active] Fix config reload (sonic-net#145) [Longxiang Lyu]
* 7e1c820 2022-10-11 | [Active-Standby] avoid posting mux metrics event when receiving unsolicited mux state notification  (sonic-net#142) [Jing Zhang]
* 237cfd2 2022-10-07 | [Active-Active] Update default route shutdown heartbeat logic (sonic-net#141) [Jing Zhang]

utilities:
* 415d30e 2022-10-23 | [techsupport] Adding FRR EVPN dumps (sonic-net#2442) (HEAD -> 202205) [Sudharsan Dhamal Gopalarathnam]
* b3ffe45 2022-10-21 | [show][muxcable] add support for show mux firmware version all (sonic-net#2441) [vdahiya12]
* 7d68534 2022-10-19 | [app_ext] [auto-ts] Add available_mem_threshold option (sonic-net#2423) [Vivek]
* 52b9c16 2022-10-07 | [muxcable][config] add CLI support for mux mode detach (sonic-net#2425) [Jing Zhang]
* 14646ff 2022-10-10 | [show priority-group drop counters] Remove backup with cached PG drop counters after 'config reload' (sonic-net#2386) [Andriy Yurkiv]
* dffcc53 2022-10-11 | Add a subcommand to display a hexdump of transceiver EEPROM page (sonic-net#2379) [mihirpat1]
* 86175c2 2022-10-17 | [chassis]Add fabric counter cli commands (sonic-net#1860) [Maxime Lorrillere]

swss:
* 6fe0afd 2022-10-25 | [portsorch] remove port OID from saiOidToAlias map on port deletion (sonic-net#2483) (HEAD -> 202205, github/202205) [Stepan Blyshchak]
* 7290d66 2022-10-07 | [vlanmgr] Disable `arp_evict_nocarrier` for vlan host intf (sonic-net#2469) [Longxiang Lyu]
* d074001 2022-10-05 | [chassis][voq]Collect counters for fabric links (sonic-net#1944) [Maxime Lorrillere]
* 3a0353a 2022-10-18 | [counters][202205] Improve performance by polling only configured ports buffer queue/pg counters (sonic-net#2474) [Vadym Hlushko]
* 2feb39d 2022-10-14 | [202205] [crm] Fix issue with continues EXCEEDED and CLEAR logs for ACL group/table counters (sonic-net#2482) [Volodymyr Samotiy]

sairedis:
* 326b630 2022-10-21 | [gbsyncd] Add asic db prefix for channel NOTIFICATIONS (sonic-net#1129) (HEAD -> 202205) [Junhua Zhai]

platform-daemon:
* 6dbda9b 2022-10-25 | [ycabled] fix no port/state returned by grpc server (sonic-net#308) (HEAD -> 202205) [vdahiya12]
* 3d1228a 2022-10-20 | Fix xcvrd to support 400G ZR optic (sonic-net#293) [Bohan Yang]

platform-common:
* c04d710 2022-09-29 | Read CMIS data path state duration (sonic-net#312) (HEAD -> 202205) [Bohan Yang]

Signed-off-by: Ying Xie <ying.xie@microsoft.com>

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
…nic-net#12669)

utilities:
* 8cb6124 2022-11-09 | [armhf][sonic-installer] Fix the issue of sonic-installer list after set-default and cleanup (sonic-net#2479) [Marty Y. Lok]
* b2d50f4 2022-11-06 | [GCU] Fix JsonPointerFilter bug (sonic-net#2477) (HEAD -> 202205, github/202205) [jingwenxie]
* 927daea 2022-11-08 | Do not configure physical attributes on port channels in portconfig (sonic-net#2456) [Stephen Sun]
* dbe8f2d 2022-11-02 | Fix sudo sfputil show error-status on a multiasic platform issue (sonic-net#2373) [Marty Y. Lok]
* fff5f67 2022-11-04 | [show] vnet advertised-route command (sonic-net#2390) (sonic-net#2478) [siqbal1986]
* 9d921a7 2022-11-04 | Fix exception in adding mirror_session when gre_type is absent (sonic-net#2476) [bingwang-ms]
* 0bbe54a 2022-11-03 | [show] vnet endpoint [ip/ipv6] command (sonic-net#2342) (sonic-net#2421) (sonic-net#2474) [siqbal1986]
* b1b3661 2022-11-03 | show vnet routes all. (sonic-net#2341) (sonic-net#2472) [siqbal1986]

swss:
* e208c87 2022-11-08 | swss: Fixing race condition for rif counters (sonic-net#2488) (HEAD -> 202205) [Suman Kumar]

platform-common:
* 83f77cc 2022-11-08 | Fix issue: rounding float value for txpower and rxpower (sonic-net#320) (HEAD -> 202205) [Junchao-Mellanox]
* 169ee25 2022-11-04 | Fix issue: copper cable should not display DOM information (sonic-net#318) [Junchao-Mellanox]

Signed-off-by: Ying Xie <ying.xie@microsoft.com>

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants