Description of problem: preunsintall scriptlet of openstack-quantum-openvswitch disable/stop only quantum-openvswitch-agent.service as below: ====== # rpm -q --scripts openstack-quantum-openvswitch.noarch preuninstall scriptlet (using /bin/sh): if [ $1 -eq 0 ] ; then # Package removal, not upgrade /bin/systemctl --no-reload disable quantum-openvswitch-agent.service > /dev/null 2>&1 || : /bin/systemctl stop quantum-openvswitch-agent.service > /dev/null 2>&1 || : fi postuninstall scriptlet (using /bin/sh): /bin/systemctl daemon-reload >/dev/null 2>&1 || : if [ $1 -ge 1 ] ; then # Package upgrade, not uninstall /bin/systemctl try-restart quantum-openvswitch-agent.service >/dev/null 2>&1 || : fi ====== But this package provides quantum-ovs-cleanup.service, too. So it should disable/stop this, too, in preunstall scriptlet. Without it, when you reinstall openstack-quantum-openvswitch, quantum-ovs-cleanup.service fails to start. 1) enable/start quantum-ovs-cleanup.service. # systemctl enable quantum-ovs-cleanup.service # systemctl start quantum-ovs-cleanup.service 2) Reinstall openstack-quantum-openvswitch. # yum remove openstack-quantum-openvswitch # yum install openstack-quantum-openvswitch 3) quantum-ovs-cleanup.service fails to start. # systemctl start quantum-ovs-cleanup.service Failed to issue method call: Unit quantum-ovs-cleanup.service failed to load: No such file or directory. See system logs and 'systemctl status quantum-ovs-cleanup.service' for details. Version-Release number of selected component (if applicable): # rpm -q openstack-quantum-openvswitch openstack-quantum-openvswitch-2012.2.3-2.fc18.noarch
The (neutron|quantum)-ovs-cleanup service does not need to be stopped because it is not a persistent service. It only runs at boot and then exits. See "Type=oneshot" in the unit file: [Unit] Description=OpenStack Quantum Open vSwitch Cleanup Utility After=syslog.target network.target openvswitch.service Before=neutron-openvswitch-agent.service neutron-dhcp-agent.service neutron-l3-agent.service openstack-nova-compute.service [Service] Type=oneshot User=neutron ExecStart=/usr/bin/neutron-ovs-cleanup --config-file /usr/share/neutron/neutron-dist.conf --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini --log-file /var/log/neutron/ovs-cleanup.log PrivateTmp=true [Install] WantedBy=multi-user.target
No, even if it's oneshot type service, uninstall postlet needs to "disable" it. Without that, there remains a dead symlink: /etc/systemd/system/multi-user.target.wants/quantum-ovs-cleanup.service And this causes a _real_ problem. First, because of this dead link, systemd recognizes it as a "misconfigured service" even though it's removed from the system. ----- # yum install openstack-quantum-openvswitch # systemctl enable quantum-ovs-cleanup.service # yum remove openstack-quantum-openvswitch # systemctl status quantum-ovs-cleanup.service quantum-ovs-cleanup.service Loaded: error (Reason: No such file or directory) Active: inactive (dead) ----- Second, becuase of this, if a user re-installed it and tried to start it, it _fails_ to start. ----- # yum install openstack-quantum-openvswitch # systemctl start quantum-ovs-cleanup.service Failed to issue method call: Unit quantum-ovs-cleanup.service failed to load: No such file or directory. See system logs and 'systemctl status quantum-ovs-cleanup.service' for details. --- Please reopen this issue.
Indeed you are correct, it should be disabled. Sorry for missing that.
Created attachment 861494 [details] Patch to disable neutron-ovs-cleanup on uninstall
I don't have commit access to the Fedora package, so I've just attached a patch here. This has the %preun scriptlet disable the neutron-ovs-cleanup service as described in this bz.
Change submitted upstream: https://review.gerrithub.io/#/c/221598/