-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Make swssconfig status FATAL when it fails #1009
Conversation
…e status will become FATAL instead of EXITED if failure happens Signed-off-by: Qi Luo <qiluo-msft@users.noreply.github.com>
@@ -46,7 +46,7 @@ elif [ "$HWSKU" == "Force10-S6000-Q32" ]; then | |||
elif [ "$HWSKU" == "Arista-7050-QX32" ]; then | |||
SWSSCONFIG_ARGS+="td2.32ports.buffers.json td2.32ports.qos.json " | |||
elif [[ "$HWSKU" == "ACS-MSN27"* ]]; then | |||
sonic-cfggen -m /etc/sonic/minigraph.xml -t /usr/share/sonic/templates/msn27xx.32ports.buffers.json.j2 > /etc/swss/config.d/msn27xx.32ports.buffers.json | |||
sonic-cfggen -m /etc/sonic/minigraph.xml -t /usr/share/sonic/templates/msn27xx.32ports.buffers.json.j2 > /etc/swss/config.d/msn27xx.32ports.buffers.json || exit 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about set -e
for this script?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The swssconfig.sh could be improved in future. Currently there is no assumption that every command will success there, except the obvious line such as sonic-cfggen.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't get why there's no assumption that every command will success? right now there're sonic-cfggen and swssconfig commands. I think both of them need to be successful after execution.
What is the ultimate behavior change you're trying to achieve with this? |
Signed-off-by: Qi Luo <qiluo-msft@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please also check with other reviewers
does this change the syslog message? |
It only change syslog this way
|
Signed-off-by: Qi Luo <qiluo-msft@users.noreply.github.com>
* msft_github/master: [DHCP Relay]: Support Multiple VLANs (Separate DHCP Relay Agents, One Per VLAN) (sonic-net#999) [build]: sonic-utilities package depends on swsssdk; build as wheel and add build dependency (sonic-net#1011) Make swssconfig status FATAL when it fails (sonic-net#1009) [swss]: Update swss-common/sairedis/swss submodules (sonic-net#1008) [config-engine]: Fix bug multiple ports connecting to same neighbor (sonic-net#1005)
Fix a typo in mellanox_buffer_migrator (sonic-net#1090) [CLI][PFCWD][Multi-ASIC] Added multi ASIC support to 'pfcwd' CLI command (sonic-net#1080) Add namespace of the process in the coredump filename. (sonic-net#1091) [setup.py] Add aliases.ini to sonic_installer package (sonic-net#1088) [pfcwd] Add single asic unit tests for show commands (sonic-net#1085) Enhance SONiC with kubernetes management commands (sonic-net#962) [counterpoll] add port buffer drop group (sonic-net#1009) [CLI][PFC] Add multi ASIC options for pfcstat and 'show pfc counters' (sonic-net#1057) Signed-off-by: Stephen Sun <stephens@nvidia.com>
5c173f7 [counterpoll] add port buffer drop group (sonic-net#1009) 62e44d9 [CLI][PFC] Add multi ASIC options for pfcstat and 'show pfc counters' (sonic-net#1057) Signed-off-by: Volodymyr Samotiy <volodymyrs@nvidia.com>
Signed-off-by: Mykola Faryma <mykolaf@mellanox.com> Co-authored-by: Danny Allen <daall@microsoft.com> Co-authored-by: Volodymyr Samotiy <volodymyrs@mellanox.com>
Make supervisor controled one-shot program autorestart 0 time, so the status will become FATAL instead of EXITED if fails. 'supervisorctl status' differentiates between normal exit and failure.
It will help diagnose in running switch.
Signed-off-by: Qi Luo qiluo-msft@users.noreply.github.com
- What I did
The supervisor controlled one-shot program status will become FATAL instead of EXITED if failure happens
- How I did it
Make supervisor controled one-shot program autorestart 0 time
- How to verify it
Test in lab switch
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)