Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

swss: gearsyncd should return 0 on exit #1376

Merged
merged 2 commits into from
Aug 4, 2020
Merged

Conversation

sydlogan
Copy link
Contributor

@sydlogan sydlogan commented Aug 4, 2020

  • changes made to supervisord conf require gearsyncd to return 0 otherwise
    restarts are performed, fail, and swss docker exits
  • originally, gearsyncd did not exit, and if it did, 1 exit code was returned
    to indicate failure. We converted this to do its job and exit, but did not
    correct the exit code.
  • prior state was not a problem until changes that are yet to merge for
    sonic-buildimage supervisord conf made returning a 1 problematic.

What I did

change exit code for gearsyncd to 0 from 1

Why I did it

for compatibility with supervisord.conf. Not to mention, processes should return 0 on success.

How I verified it

Local build.

HLD is located at https://github.com/Azure/SONiC/blob/b817a12fd89520d3fd26bbc5897487928e7f6de7/doc/gearbox/gearbox_mgr_design.md

Signed-off-by: [email protected]

* changes made to supervisord conf require gearsyncd to return 0 otherwise
  restarts are performed, fail, and swss docker exits
* originally, gearsyncd did not exit, and if it did, 1 exit code was returned
  to indicate failure. We converted this to do its job and exit, but did not
  correct the exit code.
* prior state was not a problem until changes that yet to merge for
  sonic-buildimage supervisord conf made returning a 1 problematic.

HLD is located at https://github.com/Azure/SONiC/blob/b817a12fd89520d3fd26bbc5897487928e7f6de7/doc/gearbox/gearbox_mgr_design.md

  Signed-off-by: [email protected]
@sydlogan
Copy link
Contributor Author

sydlogan commented Aug 4, 2020

@jleveque this is going to be required for supervisord conf changes in pull 4851 to work.

gearsyncd/gearsyncd.cpp Outdated Show resolved Hide resolved
@sydlogan sydlogan marked this pull request as ready for review August 4, 2020 03:52
@sydlogan
Copy link
Contributor Author

sydlogan commented Aug 4, 2020

Retest vs please

1 similar comment
@sydlogan
Copy link
Contributor Author

sydlogan commented Aug 4, 2020

Retest vs please

@jleveque jleveque merged commit ea30f2f into sonic-net:master Aug 4, 2020
EdenGri pushed a commit to EdenGri/sonic-swss that referenced this pull request Feb 28, 2022
* Fixed int stat with portchannel
* Replace N/A with None

Fixed crash of "show int status" command when there are portchannels in system.

Traceback (most recent call last):
  File "/usr/local/bin/intfutil", line 521, in <module>
    main()
  File "/usr/local/bin/intfutil", line 513, in main
    interface_stat.display_intf_status()
  File "/usr/local/bin/intfutil", line 354, in display_intf_status
    self.get_intf_status()
  File "/usr/local/lib/python3.7/dist-packages/utilities_common/multi_asic.py", line 137, in wrapped_run_on_all_asics
    func(self,  *args, **kwargs)
  File "/usr/local/bin/intfutil", line 435, in get_intf_status
    self.portchannel_speed_dict = po_speed_dict(self.po_int_dict, self.db)
  File "/usr/local/bin/intfutil", line 249, in po_speed_dict
    interface_speed = '{}G'.format(interface_speed[:-3])
TypeError: 'NoneType' object is not subscriptable

Signed-off-by: d-dashkov <[email protected]>
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.

3 participants