Add high availability tool for neutron networking
* Setup optional cron jobs to call the tool in order to find offline l3 agents and migrate them to another online agent * Supports a rebalance feature to shuffle tenants around given the scheduler for neutron is very simplistic right now * Supports rebalancing DHCP configuration to all DHCP agents Change-Id: Iaf0686c2fa93ec1dcdd644b75cb3b4528d4cabf0
This commit is contained in:
@@ -43,3 +43,22 @@ service "quantum-server" do
|
||||
supports :status => true, :restart => true
|
||||
action :enable
|
||||
end
|
||||
|
||||
if node["openstack"]["network"]["quantum_ha_cmd_cron"]
|
||||
# ensure period checks are offset between multiple l3 agent nodes
|
||||
# and assumes splay will remain constant (i.e. based on hostname)
|
||||
# Generate a uniformly distributed unique number to sleep.
|
||||
checksum = Digest::MD5.hexdigest(node['fqdn'] || 'unknown-hostname')
|
||||
splay = node['chef_client']['splay'].to_i || 3000
|
||||
sleep_time = checksum.to_s.hex % splay
|
||||
|
||||
cron "quantum-ha-healthcheck" do
|
||||
minute node["openstack"]["network"]["cron_l3_healthcheck"]
|
||||
command "sleep #{sleep_time} ; . /root/openrc && #{node["openstack"]["network"]["quantum_ha_cmd"]} --l3-agent-migrate"
|
||||
end
|
||||
|
||||
cron "quantum-ha-replicate-dhcp" do
|
||||
minute node["openstack"]["network"]["cron_replicate_dhcp"]
|
||||
command "sleep #{sleep_time} ; . /root/openrc && #{node["openstack"]["network"]["quantum_ha_cmd"]} --replicate-dhcp"
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user