Provide launch several vms simultaneously.
There was a bug 1481071 which was fixed on driver side. This patch-set does corresponding changes on the plugin level. Change-Id: I7268c3201664190a086d69615c66309ac020e620
This commit is contained in:
parent
31d9c7aae2
commit
9deb9d177a
15
deployment_scripts/del_predefined_networks.sh
Executable file
15
deployment_scripts/del_predefined_networks.sh
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
. /root/openrc
|
||||||
|
router=router04
|
||||||
|
|
||||||
|
neutron router-gateway-clear $router
|
||||||
|
|
||||||
|
for port in $(neutron router-port-list $router| grep ip_a| cut -f 2 -d\ ); do
|
||||||
|
neutron router-interface-delete $router port=$port
|
||||||
|
neutron port-delete $port
|
||||||
|
done
|
||||||
|
|
||||||
|
for net in $(neutron net-list|grep '/'|cut -f 4 -d\ ); do
|
||||||
|
neutron net-delete $net
|
||||||
|
done
|
@ -7,6 +7,7 @@ port=8080
|
|||||||
|
|
||||||
function _nova_patch {
|
function _nova_patch {
|
||||||
wget -O /usr/lib/python2.7/dist-packages/nova.patch "http://$ip:$port/plugins/$plugin_name-$plugin_version/nova.patch" && cd /usr/lib/python2.7/dist-packages/ ; patch -N -p1 < nova.patch
|
wget -O /usr/lib/python2.7/dist-packages/nova.patch "http://$ip:$port/plugins/$plugin_name-$plugin_version/nova.patch" && cd /usr/lib/python2.7/dist-packages/ ; patch -N -p1 < nova.patch
|
||||||
|
sed -i s/neutron_url_timeout=.*/neutron_url_timeout=3600/ /etc/nova/nova.conf
|
||||||
for resource in $(crm_mon -1|awk '/nova_compute_vmware/ {print $1}'); do
|
for resource in $(crm_mon -1|awk '/nova_compute_vmware/ {print $1}'); do
|
||||||
execute_node=$(crm resource status $resource | cut -f 6 -d\ )
|
execute_node=$(crm resource status $resource | cut -f 6 -d\ )
|
||||||
if [ "$execute_node"="$(hostname)" ];
|
if [ "$execute_node"="$(hostname)" ];
|
||||||
@ -16,6 +17,11 @@ function _nova_patch {
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function _haproxy_config {
|
||||||
|
echo ' timeout server 1h' >> /etc/haproxy/conf.d/085-neutron.cfg
|
||||||
|
crm resource restart p_haproxy
|
||||||
|
}
|
||||||
|
|
||||||
function _dirty_hack {
|
function _dirty_hack {
|
||||||
cd /usr/lib/python2.7/dist-packages/oslo
|
cd /usr/lib/python2.7/dist-packages/oslo
|
||||||
mv messaging messaging.old
|
mv messaging messaging.old
|
||||||
@ -41,24 +47,11 @@ function _ln {
|
|||||||
ln -s /usr/lib/python2.7/dist-packages/oslo/rootwrap
|
ln -s /usr/lib/python2.7/dist-packages/oslo/rootwrap
|
||||||
}
|
}
|
||||||
|
|
||||||
function _del_network {
|
|
||||||
. /root/openrc
|
|
||||||
router=router04
|
|
||||||
neutron router-gateway-clear $router
|
|
||||||
for port in $(neutron router-port-list $router| grep ip_a| cut -f 2 -d\ ); do
|
|
||||||
neutron router-interface-delete $router port=$port
|
|
||||||
neutron port-delete $port
|
|
||||||
done
|
|
||||||
for net in $(neutron net-list|grep '/'|cut -f 4 -d\ ); do
|
|
||||||
neutron net-delete $net
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
function _neutron_restart {
|
function _neutron_restart {
|
||||||
service neutron-server restart
|
service neutron-server restart
|
||||||
}
|
}
|
||||||
|
|
||||||
_del_network
|
_haproxy_config
|
||||||
_nova_patch
|
_nova_patch
|
||||||
_core_install
|
_core_install
|
||||||
_dirty_hack
|
_dirty_hack
|
||||||
|
@ -37,4 +37,5 @@ class {'vmware_dvs':
|
|||||||
nets => $nets,
|
nets => $nets,
|
||||||
keystone_admin_tenant => $keystone_admin_tenant,
|
keystone_admin_tenant => $keystone_admin_tenant,
|
||||||
driver_name => 'vmware_dvs',
|
driver_name => 'vmware_dvs',
|
||||||
|
neutron_url_timeout => '3600',
|
||||||
}
|
}
|
||||||
|
@ -12,9 +12,17 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
# == Class: ::vmware_dvs
|
||||||
|
#
|
||||||
# edit /etc/neutron/neturon.conf and /etc/neutron/plugin.ini
|
# edit /etc/neutron/neturon.conf and /etc/neutron/plugin.ini
|
||||||
# recreate net04 and net04_ext on primary-controller
|
# recreate net04 and net04_ext on primary-controller
|
||||||
# restart the neutron-server
|
# restart the neutron-server
|
||||||
|
#
|
||||||
|
# === Parameters
|
||||||
|
#
|
||||||
|
# [*vsphere_hostname*]
|
||||||
|
# (required) String. This is a name or ip of VMware vSphere server
|
||||||
|
#
|
||||||
class vmware_dvs(
|
class vmware_dvs(
|
||||||
$vsphere_hostname,
|
$vsphere_hostname,
|
||||||
$vsphere_login,
|
$vsphere_login,
|
||||||
@ -25,6 +33,7 @@ class vmware_dvs(
|
|||||||
$nets,
|
$nets,
|
||||||
$keystone_admin_tenant,
|
$keystone_admin_tenant,
|
||||||
$driver_name = 'vmware_dvs',
|
$driver_name = 'vmware_dvs',
|
||||||
|
$neutron_url_timeout = '3600',
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
$true_network_maps = get_network_maps($network_maps, $neutron_physnet)
|
$true_network_maps = get_network_maps($network_maps, $neutron_physnet)
|
||||||
@ -47,7 +56,12 @@ class vmware_dvs(
|
|||||||
setting => 'mechanism_drivers',
|
setting => 'mechanism_drivers',
|
||||||
subsetting => $driver_name,
|
subsetting => $driver_name,
|
||||||
subsetting_separator => ','
|
subsetting_separator => ','
|
||||||
|
} ->
|
||||||
|
exec {'restart_neutron':
|
||||||
|
command => 'service neutron-server restart',
|
||||||
|
path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
|
||||||
}
|
}
|
||||||
|
|
||||||
if $primary_controller {
|
if $primary_controller {
|
||||||
|
|
||||||
Service<| title == 'neutron-server' |> ->
|
Service<| title == 'neutron-server' |> ->
|
||||||
|
@ -3,7 +3,7 @@ name: fuel-plugin-vmware-dvs
|
|||||||
# Human-readable name for your plugin
|
# Human-readable name for your plugin
|
||||||
title: use Neutron VMware DVS ML2 plugin
|
title: use Neutron VMware DVS ML2 plugin
|
||||||
# Plugin version
|
# Plugin version
|
||||||
version: '1.0.0'
|
version: '1.0.2'
|
||||||
# Description
|
# Description
|
||||||
description: Enable to use plugin vmware_dvs for Neutron
|
description: Enable to use plugin vmware_dvs for Neutron
|
||||||
# Required fuel version
|
# Required fuel version
|
||||||
|
14
tasks.yaml
14
tasks.yaml
@ -1,18 +1,24 @@
|
|||||||
- role: ['primary-controller','controller']
|
- role: ['primary-controller']
|
||||||
stage: post_deployment/7000
|
stage: post_deployment/7000
|
||||||
type: shell
|
type: shell
|
||||||
parameters:
|
parameters:
|
||||||
cmd: ./install_the_driver.sh
|
cmd: ./del_predefined_networks.sh 2>&1 | tee -a /tmp/dep_pre_nets.log
|
||||||
timeout: 720
|
timeout: 120
|
||||||
- role: ['primary-controller','controller']
|
- role: ['primary-controller','controller']
|
||||||
stage: post_deployment/7001
|
stage: post_deployment/7001
|
||||||
|
type: shell
|
||||||
|
parameters:
|
||||||
|
cmd: ./install_the_driver.sh 2>&1 | tee -a /tmp/ins_the_drivers.log
|
||||||
|
timeout: 720
|
||||||
|
- role: ['primary-controller','controller']
|
||||||
|
stage: post_deployment/7002
|
||||||
type: puppet
|
type: puppet
|
||||||
parameters:
|
parameters:
|
||||||
puppet_manifest: puppet/manifests/site.pp
|
puppet_manifest: puppet/manifests/site.pp
|
||||||
puppet_modules: puppet/modules:/etc/puppet/modules
|
puppet_modules: puppet/modules:/etc/puppet/modules
|
||||||
timeout: 720
|
timeout: 720
|
||||||
- role: ['primary-controller','controller']
|
- role: ['primary-controller','controller']
|
||||||
stage: post_deployment/7002
|
stage: post_deployment/7003
|
||||||
type: shell
|
type: shell
|
||||||
parameters:
|
parameters:
|
||||||
cmd: service neutron-server restart
|
cmd: service neutron-server restart
|
||||||
|
Loading…
Reference in New Issue
Block a user