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

[services] dhcp_relay service sets swss and teamd services as Requisite=, not Requires= #3818

Closed
wants to merge 1 commit into from
Closed

Conversation

jleveque
Copy link
Contributor

@jleveque jleveque commented Nov 26, 2019

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 using Requires= will cause the required services to be started.

@stepanblyschak
Copy link
Collaborator

@jleveque Does it fix #3822?

@yxieca
Copy link
Contributor

yxieca commented Nov 26, 2019

retest vsimage please

@yxieca
Copy link
Contributor

yxieca commented Nov 26, 2019

retest vs please

@yxieca
Copy link
Contributor

yxieca commented Nov 26, 2019

retest mellanox please

@yxieca
Copy link
Contributor

yxieca commented Nov 26, 2019

@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
Copy link
Collaborator

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...

Copy link
Contributor Author

@jleveque jleveque Nov 26, 2019

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.

@jleveque
Copy link
Contributor Author

Closing in favor of #3823

@jleveque jleveque closed this Nov 26, 2019
@jleveque jleveque deleted the dhcp_relay_requisite branch November 26, 2019 20:00
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.

during config reload, teamd is restarted twice
3 participants