Bugfix missing quantum-ovs-cleanup on startup

Ubuntu PPA packages are missing quantum-ovs-cleanup
service scripts whereas RHEL et al set this service up
appropriately on package installation.

This update addresses the missing service by installing
the upstart configuration and setting it to start at the
appropriate point in the bootup process, prior to the
l3 agent and dhcp agents.

For additional details, see:
https://bugs.launchpad.net/openstack-manuals/+bug/1156861

Change-Id: Id8abcc07ad3c0b0cfd742886a2f3d71d16585d91
Fixes-Bug: #1266495
This commit is contained in:
Alan Meadows 2014-01-06 07:34:38 -08:00
parent fcf73dae7a
commit 3d32e37445
6 changed files with 61 additions and 1 deletions

View File

@ -2,6 +2,9 @@
This file is used to list changes made in each version of cookbook-openstack-network.
## 7.4.1
* Add missing quantum-ovs-cleanup to ubuntu startup (LP #1266495)
## 7.4.0
* Add network database migration

View File

@ -878,6 +878,7 @@ when "fedora", "redhat", "centos" # :pragma-foodcritic: ~FC024 - won't fix this
"quantum_openvswitch_agent_service" => "openstack-quantum-openvswitch-agent",
"quantum_linuxbridge_agent_service" => "quantum-linuxbridge-agent",
"quantum_server_service" => "quantum-server",
"quantum_ovs_cleanup_service" => "quantum-ovs-cleanup",
"package_overrides" => ""
}
when "suse"
@ -907,6 +908,7 @@ when "suse"
"quantum_openvswitch_agent_service" => "openstack-quantum-openvswitch-agent",
"quantum_linuxbridge_agent_service" => "openstack-quantum-linuxbridge-agent",
"quantum_server_service" => "openstack-quantum",
"quantum_ovs_cleanup_service" => "quantum-ovs-cleanup",
"package_overrides" => ""
}
when "ubuntu"
@ -936,6 +938,7 @@ when "ubuntu"
"quantum_openvswitch_agent_service" => "quantum-plugin-openvswitch-agent",
"quantum_linuxbridge_agent_service" => "quantum-plugin-linuxbridge-agent",
"quantum_server_service" => "quantum-server",
"quantum_ovs_cleanup_service" => "quantum-ovs-cleanup",
"package_overrides" => "-o Dpkg::Options::='--force-confold' -o Dpkg::Options::='--force-confdef'"
}
end

View File

@ -0,0 +1,17 @@
# quantum-ovs-cleanup - Quantum OVS Port Cleanup
#
# Quantum OVS Port Cleanup Script
description "Quantum OVS Port Cleanup"
author "Alan Meadows <alan.meadows@gmail.com>"
start on runlevel [2345]
stop on runlevel [016]
pre-start script
if [ -f "/etc/quantum/quantum.conf" ]; then
exec /usr/bin/quantum-ovs-cleanup
else
exit 1
fi
end script

View File

@ -3,7 +3,7 @@ maintainer "Jay Pipes <jaypipes@gmail.com>"
license "Apache 2.0"
description "Installs and configures the OpenStack Network API Service and various agents and plugins"
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version "7.4.0"
version "7.4.1"
recipe "openstack-network::server", "Installs packages required for a OpenStack Network server"
recipe "openstack-network::openvswitch", "Installs packages required for OVS"
recipe "openstack-network::metadata_agent", "Installs packages required for a OpenStack Network Metadata Agent"

View File

@ -65,3 +65,32 @@ if not ["nicira", "plumgrid", "bigswitch", "linuxbridge"].include?(main_plugin)
only_if "ip link show #{ext_bridge_iface}"
end
end
# (alanmeadows): Ubuntu PPA packages are missing quantum-ovs-cleanup
# service scripts whereas RHEL et al set this service up
# appropriately on package installation.
#
# For additional details, see:
# https://bugs.launchpad.net/openstack-manuals/+bug/1156861
if platform?("ubuntu")
cookbook_file "/etc/init/quantum-ovs-cleanup.conf" do
owner "root"
group "root"
mode "0755"
source "quantum-ovs-cleanup.conf.upstart"
action :create
not_if { File.exists?("/etc/init/quantum-ovs-cleanup.conf") }
end
link "/etc/init.d/quantum-ovs-cleanup" do
to "/lib/init/upstart-job"
not_if { File.exists?("/etc/init.d/quantum-ovs-cleanup") }
end
service "quantum-ovs-cleanup" do
service_name platform_options["quantum_ovs_cleanup_service"]
supports :restart => false, :start => true, :stop => false, :reload => false
priority({ 2 => [ :start, 19 ]})
action :enable
only_if { File.exists?("/etc/quantum/quantum.conf") }
end
end

View File

@ -14,6 +14,14 @@ describe 'openstack-network::l3_agent' do
expect(@chef_run).to install_package "quantum-l3-agent"
end
it "starts the l3 agent on boot" do
expect(@chef_run).to set_service_to_start_on_boot "quantum-l3-agent"
end
it "starts the quantum-ovs-cleanup service on boot" do
expect(@chef_run).to set_service_to_start_on_boot "quantum-ovs-cleanup"
end
describe "l3_agent.ini" do
before do