Call FDB table cleaning tool from ocf script.
* Installs ssh keys to allow access between all computes and controllers * add fuel-fdb-cleaner to neutron-agent-l3 OCF script Change-Id: If855247a9654763b35dcd7adc5bfcf28d1fa331d Closes-Bug: #1260465
This commit is contained in:
parent
d68ae82323
commit
ade56a7e52
|
@ -321,7 +321,7 @@ neutron_dhcp_agent_start() {
|
|||
done
|
||||
|
||||
# detach deffered rescheduling procedure
|
||||
bash -c "sleep 13 ; q-agent-cleanup.py --agent=dhcp --reschedule --remove-dead 2>&1 >> /var/log/neutron/rescheduling.log" &
|
||||
bash -c "sleep 33 ; q-agent-cleanup.py --agent=dhcp --reschedule --remove-dead 2>&1 >> /var/log/neutron/rescheduling.log" &
|
||||
|
||||
ocf_log info "OpenStack DHCP Server (${OCF_RESKEY_binary}) started"
|
||||
return $OCF_SUCCESS
|
||||
|
|
|
@ -356,7 +356,8 @@ neutron_l3_agent_start() {
|
|||
done
|
||||
|
||||
# detach deferred rescheduling procedure
|
||||
bash -c "sleep 13 ; q-agent-cleanup.py --agent=l3 --reschedule --remove-dead 2>&1 >> /var/log/neutron/rescheduling.log" &
|
||||
bash -c "sleep 33 ; q-agent-cleanup.py --agent=l3 --reschedule --remove-dead 2>&1 >> /var/log/neutron/rescheduling.log " &
|
||||
fuel-fdb-cleaner --ssh-keyfile /root/.ssh/id_rsa_neutron -l /var/log/neutron/fdb-cleaner.log
|
||||
|
||||
ocf_log info "OpenStack Router (neutron-l3-agent) started"
|
||||
return $OCF_SUCCESS
|
||||
|
|
|
@ -15,6 +15,8 @@ class neutron (
|
|||
$use_syslog = false,
|
||||
$syslog_log_facility = 'LOCAL4',
|
||||
$syslog_log_level = 'WARNING',
|
||||
$ssh_private_key = '/var/lib/astute/neutron/neutron',
|
||||
$ssh_public_key = '/var/lib/astute/neutron/neutron.pub',
|
||||
$server_ha_mode = false,
|
||||
) {
|
||||
include 'neutron::params'
|
||||
|
@ -136,15 +138,6 @@ class neutron (
|
|||
'keystone_authtoken/admin_user': value => $neutron_config['keystone']['admin_user'];
|
||||
'keystone_authtoken/admin_password': value => $neutron_config['keystone']['admin_password'];
|
||||
}
|
||||
# logging for agents grabbing from stderr. It's workarround for bug in quantum-logging
|
||||
# server givs this parameters from command line
|
||||
# FIXME change init.d scripts for q&agents, fix daemon launch commands (CENTOS/RHEL):
|
||||
# quantum-server:
|
||||
# daemon --user quantum --pidfile $pidfile "$exec --config-file $config --config-file /etc/$prog/plugin.ini &>>/var/log/quantum/server.log & echo \$!
|
||||
# quantum-ovs-cleanup:
|
||||
# daemon --user quantum $exec --config-file /etc/$proj/$proj.conf --config-file $config &>>/var/log/$proj/$plugin.log
|
||||
# quantum-ovs/metadata/l3/dhcp/-agents:
|
||||
# daemon --user quantum --pidfile $pidfile "$exec --config-file /etc/$proj/$proj.conf --config-file $config &>>/var/log/$proj/$plugin.log & echo \$! > $pidfile"
|
||||
|
||||
|
||||
if defined(Anchor['neutron-server-config-done']) {
|
||||
|
@ -153,6 +146,25 @@ class neutron (
|
|||
$endpoint_neutron_main_configuration = 'neutron-init-done'
|
||||
}
|
||||
|
||||
|
||||
$fuel_utils_package = $neutron::params::fuel_utils_package
|
||||
package { $fuel_utils_package :
|
||||
ensure => installed,
|
||||
}
|
||||
|
||||
install_ssh_keys {'neutron_ssh_key':
|
||||
ensure => present,
|
||||
user => 'root',
|
||||
private_key_path => $ssh_private_key,
|
||||
public_key_path => $ssh_public_key,
|
||||
private_key_name => 'id_rsa_neutron',
|
||||
public_key_name => 'id_rsa_neutron.pub',
|
||||
authorized_keys => 'authorized_keys',
|
||||
}
|
||||
|
||||
Anchor['neutron-init'] -> Package[$fuel_utils_package] -> Install_ssh_keys['neutron_ssh_key'] -> Anchor[$endpoint_neutron_main_configuration]
|
||||
|
||||
|
||||
Anchor['neutron-init'] ->
|
||||
Package['neutron'] ->
|
||||
File['/var/cache/neutron'] ->
|
||||
|
|
|
@ -34,6 +34,7 @@ class neutron::params {
|
|||
$python_path = 'python2.7/dist-packages'
|
||||
$cidr_package = 'ipcalc'
|
||||
$vlan_package = 'vlan'
|
||||
$fuel_utils_package = 'fuel-utils'
|
||||
|
||||
case $::operatingsystem {
|
||||
'Debian': {
|
||||
|
@ -69,6 +70,7 @@ class neutron::params {
|
|||
$python_path = 'python2.6/site-packages'
|
||||
$cidr_package = "whatmask"
|
||||
$vlan_package = 'vconfig'
|
||||
$fuel_utils_package = 'fuel-utils'
|
||||
|
||||
$service_provider = undef
|
||||
|
||||
|
|
Loading…
Reference in New Issue