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

[config] Unconditionally reset failed status of all SONiC services #619

Merged
merged 1 commit into from
Sep 12, 2019
Merged

[config] Unconditionally reset failed status of all SONiC services #619

merged 1 commit into from
Sep 12, 2019

Conversation

jleveque
Copy link
Contributor

This will reset the systemd counters which dictate when a service should be placed in the "failed" state for all specified SONiC services whenever calling config reload, config load_minigraph. The previous behavior only performed the reset if the services were already in the "failed" state. However, there is the chance that a process is one restart away from being marked as failed, so a call to one of the above commands could have still resulted in a process which failed to start.

Resolves #616

@jleveque
Copy link
Contributor Author

@avi-milner: Please test that this fixes your issue.

@avi-milner
Copy link

@avi-milner: Please test that this fixes your issue.
getting exception from python file about logging after updating:

root@et6448m-M0:/usr/lib/python2.7/dist-packages/config# config reload -y
Traceback (most recent call last):
File "/usr/bin/config", line 12, in
sys.exit(config())
File "/usr/lib/python2.7/dist-packages/click/core.py", line 722, in call
return self.main(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/usr/lib/python2.7/dist-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/lib/python2.7/dist-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/lib/python2.7/dist-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/config/main.py", line 401, in reload
log_info("'reload' executing...")
File "/usr/lib/python2.7/dist-packages/config/main.py", line 33, in log_info
syslog.openlog(SYSLOG_IDENTIFIER)
AttributeError: 'Group' object has no attribute 'openlog'

root@et6448m-M0:/usr/lib/python2.7/dist-packages/config# show version

SONiC Software Version: SONiC.HEAD.0-dirty-20190820.201118
Distribution: Debian 9.9
Kernel: 4.9.168
Build commit: bf08a2c
Build date: Wed Aug 21 02:35:32 UTC 2019
Built by: azure@azure

Platform: armhf-marvell_et6448m_52x-r0
HwSKU: et6448m
ASIC: marvell
Serial Number: 201908150001
Uptime: 17:25:21 up 8 min, 1 user, load average: 2.05, 2.34, 1.48

Docker images:
REPOSITORY TAG IMAGE ID SIZE
docker-syncd-mrvl HEAD.0-dirty-20190820.201118 5c1d07879687 454MB
docker-syncd-mrvl latest 5c1d07879687 454MB
docker-fpm-frr HEAD.0-dirty-20190820.201118 ef4e0a5c2da6 290MB
docker-fpm-frr latest ef4e0a5c2da6 290MB
docker-lldp-sv2 HEAD.0-dirty-20190820.201118 7f384f68f52a 276MB
docker-lldp-sv2 latest 7f384f68f52a 276MB
docker-snmp-sv2 HEAD.0-dirty-20190820.201118 5cbb357bafba 311MB
docker-snmp-sv2 latest 5cbb357bafba 311MB
docker-dhcp-relay HEAD.0-dirty-20190820.201118 87285a719c88 268MB
docker-dhcp-relay latest 87285a719c88 268MB
docker-database HEAD.0-dirty-20190820.201118 cd6af91afc96 263MB
docker-database latest cd6af91afc96 263MB
docker-orchagent HEAD.0-dirty-20190820.201118 4f0b7a4e60c0 343MB
docker-orchagent latest 4f0b7a4e60c0 343MB
docker-teamd HEAD.0-dirty-20190820.201118 b537c4cf9e32 277MB
docker-teamd latest b537c4cf9e32 277MB
docker-router-advertiser HEAD.0-dirty-20190820.201118 3d1222450409 263MB
docker-router-advertiser latest 3d1222450409 263MB
docker-platform-monitor HEAD.0-dirty-20190820.201118 1da1daf86d79 296MB
docker-platform-monitor latest 1da1daf86d79 296MB

@jleveque
Copy link
Contributor Author

jleveque commented Sep 5, 2019

That issue appears unrelated to my change. Can you try again?

@jleveque
Copy link
Contributor Author

jleveque commented Sep 10, 2019

@avi-milner: The issue you encountered was fixed yesterday by #636. Can you please try again?

@avi-milner
Copy link

@avi-milner: The issue you encountered was fixed yesterday by #636. Can you please try again?

after also taking #636 your fix is now working fine

@jleveque jleveque merged commit b943d67 into sonic-net:master Sep 12, 2019
@jleveque jleveque deleted the reset_even_if_not_failed branch September 12, 2019 18:00
yxieca pushed a commit that referenced this pull request Sep 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Multiple restart of swss during config load fails to start swss still after fix for that
4 participants