summaryrefslogtreecommitdiffstats
path: root/fuel-plugin-ovsnfv/deployment_scripts/puppet/modules/ovsdpdk/files/agents_flavors_update.sh
diff options
context:
space:
mode:
authorBilly O'Mahony <billy.o.mahony@intel.com>2016-01-27 15:55:55 +0000
committerBilly O'Mahony <billy.o.mahony@intel.com>2016-01-27 16:32:41 +0000
commit7ce21aebcdabafaa24601104643cbd1c0b4bc8e4 (patch)
tree3af5c64d3915b6081032c17fb19df29df74cbd4c /fuel-plugin-ovsnfv/deployment_scripts/puppet/modules/ovsdpdk/files/agents_flavors_update.sh
parentb29797556682c8be8d33cf66fa2ae100a9c2bda7 (diff)
fuel-plugins: Fuel8 Liberty rebase
Change-Id: I9c0e3ab4c8fde13765ec286d4c7c717070230983 Signed-off-by: Michal Ptacek <michalx.ptacek@intel.com> Reviewed-by: Mark D. Gray <mark.d.gray@intel.com> Reviewed-by: Billy O'Mahony <billy.o.mahony@intel.com>
Diffstat (limited to 'fuel-plugin-ovsnfv/deployment_scripts/puppet/modules/ovsdpdk/files/agents_flavors_update.sh')
-rwxr-xr-xfuel-plugin-ovsnfv/deployment_scripts/puppet/modules/ovsdpdk/files/agents_flavors_update.sh30
1 files changed, 30 insertions, 0 deletions
diff --git a/fuel-plugin-ovsnfv/deployment_scripts/puppet/modules/ovsdpdk/files/agents_flavors_update.sh b/fuel-plugin-ovsnfv/deployment_scripts/puppet/modules/ovsdpdk/files/agents_flavors_update.sh
new file mode 100755
index 0000000..83164c1
--- /dev/null
+++ b/fuel-plugin-ovsnfv/deployment_scripts/puppet/modules/ovsdpdk/files/agents_flavors_update.sh
@@ -0,0 +1,30 @@
+#!/usr/bin/env bash
+
+set -x
+
+# access openstack cli
+source /root/openrc
+
+sleep 10
+neutron agent-list
+
+# Force update of vswitch agents
+for i in `neutron agent-list | grep "Open vSwitch agent" | awk {'print $2'}`; do
+ neutron agent-update $i
+done
+
+sleep 10
+neutron agent-list
+
+# grep id and remove dead agent on all compute nodes
+for i in `nova host-list | grep compute | awk {'print $2'}`; do
+ dead_agent_id=`neutron agent-list | grep $i | grep xxx | grep "Open vSwitch agent" | awk {'print $2'}`
+ neutron agent-delete $dead_agent_id
+done
+
+# modify flavors
+for i in `nova flavor-list | grep m1 | awk {'print $4'}`; do
+ nova flavor-key $i set "hw:mem_page_size=large"
+done
+
+set +x