Adding Requires=neutron-ovs-cleanup.service to neutron-l3-agent.service, neutron-dhcp-agent.service, and nova-compute.service is turning out to be perhaps too tightly coupled.
Doing this would also require the binary packages for each of the above named services to depend on the neutron-openvswitch-agent binary package. This is because neutron-ovs-cleanup is installed by the neutron-openvswitch-agent binary package. If we add Requires=neutron-ovs-cleanup without adding the binary package dependency, then at install time the above named services would fail with a dependency error if neutron-ovs-cleanup is not already installed.
I just did some reboot testing and I think we are ok with just the After=neutron-ovs-cleanup for these services. I rebooted 10 times and each time neutron-l3-agent and neutron-dhcp-agent started after neutron-ovs-cleanup. So I believe we are already covered for reboots.
What this doesn't cover is service start order at package install time. neutron-l3-agent and neutron-dhcp-agent can be installed and started before neutron-ovs-cleanup is installed. In this case neutron-ovs-cleanup would start and run after neutron-l3-agent and neutron-dhcp-agent are started. I don't think this is a big deal at install time.
As for upgrades, neutron-ovs-cleanup doesn't restart, I believe because it is Type=oneshot. So that is very good news. You can 'apt dist-upgrade' to all new neutron packages and neutron-ovs-cleanup won't get restarted.
I think we should just move forward with the original issue reported by this bug and add AFter= and Requires= to neutron-ovs-cleanup.
Adding Requires= neutron- ovs-cleanup. service to neutron- l3-agent. service, neutron- dhcp-agent. service, and nova-compute. service is turning out to be perhaps too tightly coupled.
Doing this would also require the binary packages for each of the above named services to depend on the neutron- openvswitch- agent binary package. This is because neutron-ovs-cleanup is installed by the neutron- openvswitch- agent binary package. If we add Requires= neutron- ovs-cleanup without adding the binary package dependency, then at install time the above named services would fail with a dependency error if neutron-ovs-cleanup is not already installed.
I just did some reboot testing and I think we are ok with just the After=neutron- ovs-cleanup for these services. I rebooted 10 times and each time neutron-l3-agent and neutron-dhcp-agent started after neutron- ovs-cleanup. So I believe we are already covered for reboots.
What this doesn't cover is service start order at package install time. neutron-l3-agent and neutron-dhcp-agent can be installed and started before neutron-ovs-cleanup is installed. In this case neutron-ovs-cleanup would start and run after neutron-l3-agent and neutron-dhcp-agent are started. I don't think this is a big deal at install time.
As for upgrades, neutron-ovs-cleanup doesn't restart, I believe because it is Type=oneshot. So that is very good news. You can 'apt dist-upgrade' to all new neutron packages and neutron-ovs-cleanup won't get restarted.
I think we should just move forward with the original issue reported by this bug and add AFter= and Requires= to neutron- ovs-cleanup.