-
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
[services] dhcp_relay service sets swss and teamd services as Requisite=, not Requires= #3818
Conversation
retest vsimage please |
retest vs please |
retest mellanox please |
@stepanblyschak yes. this change fixes issue #3822 |
@@ -1,6 +1,6 @@ | |||
[Unit] | |||
Description=DHCP relay container | |||
Requires=updategraph.service swss.service teamd.service | |||
Requisite=updategraph.service swss.service teamd.service |
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.
start of swss service will trigger start of dhcp_relay service which now will fail. because it is not guarantied that teamd will be already started as it is managed in the script in wait().
Checked this on DUT and got:
Nov 26 15:40:39.009962 arc-switch1025 INFO systemd[1]: Starting switch state service...
Nov 26 15:40:43.383200 arc-switch1025 INFO systemd[1]: Started switch state service.
Nov 26 15:40:43.383948 arc-switch1025 INFO systemd[1]: Starting SNMP container...
Nov 26 15:40:43.384887 arc-switch1025 NOTICE systemd[1]: TEAMD container is not active.
Nov 26 15:40:43.385738 arc-switch1025 WARNING systemd[1]: Dependency failed for DHCP relay container.
Nov 26 15:40:43.386313 arc-switch1025 NOTICE systemd[1]: dhcp_relay.service: Job dhcp_relay.service/start failed with result 'dependency'.
Nov 26 15:40:44.016929 arc-switch1025 INFO systemd[1]: Starting syncd service...
Nov 26 15:40:52.841680 arc-switch1025 INFO systemd[1]: Started SNMP container.
Nov 26 15:40:55.079201 arc-switch1025 INFO systemd[1]: Started syncd service.
Nov 26 15:40:55.099903 arc-switch1025 INFO systemd[1]: Starting TEAMD container...
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.
Thanks for your feedback, @stepanblyschak. It appears that since the DHCP relay relies on both swss and teamd, and teamd is now managed in the wait() function of swss.sh, we may also need to add the dhcp_relay service to the swss.sh script and remove these dependencies altogether to ensure that the dhcp_relay service gets started in the appropriate order.
Closing in favor of #3823 |
Fixes #3822
The dhcp_relay service should not start unless swss and teamd services are started. However, if these services are not started, the dhcp_relay service should not attempt to start them, instead it should simply fail to start. Using
Requisite=
, we will achieve this behavior, whereas usingRequires=
will cause the required services to be started.