summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancesco Santoro <francesco.santoro@6wind.com>2015-09-23 18:09:08 +0200
committerFrancesco Santoro <francesco.santoro@6wind.com>2015-09-25 15:50:38 +0200
commit510b4fbc2af63dd20783bc3c7e7f50737c763d16 (patch)
tree55f2107aef470bd37e85a79bba11f656791df78f
parentc574186a05e746260e576528aefa1652a83b6695 (diff)
add support for hugepages to nova flavors
Nova flavors need to be properly configured to use hugepages backed memory. This patch performs flavors configuration on plugin startup Change-Id: I05da7e7069e63c07d47c8996326df8ca53536811
Notes
Notes (review): Verified+2: Jenkins Code-Review+2: Maxime Leroy <maxime.leroy@6wind.com> Workflow+1: Maxime Leroy <maxime.leroy@6wind.com> Submitted-by: Jenkins Submitted-at: Fri, 25 Sep 2015 16:22:14 +0000 Reviewed-on: https://review.openstack.org/227780 Project: stackforge/networking-6wind Branch: refs/heads/master
-rw-r--r--devstack/plugin.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/devstack/plugin.sh b/devstack/plugin.sh
index 64c3d1a..b55e76a 100644
--- a/devstack/plugin.sh
+++ b/devstack/plugin.sh
@@ -51,6 +51,12 @@ function configure_ml2_for_fast_path {
51 fi 51 fi
52} 52}
53 53
54function nova_set_hugepages_flavor {
55 for flavor_id in $(nova flavor-list | awk '{print $2}' | grep [0-9]); do
56 nova flavor-key $flavor_id set hw:mem_page_size=large
57 done
58}
59
54# main loop 60# main loop
55if is_service_enabled net-6wind; then 61if is_service_enabled net-6wind; then
56 source $NET_6WIND_DIR/devstack/libs/fast-path 62 source $NET_6WIND_DIR/devstack/libs/fast-path
@@ -69,6 +75,10 @@ if is_service_enabled net-6wind; then
69 if is_service_enabled neutron; then 75 if is_service_enabled neutron; then
70 configure_ml2_for_fast_path 76 configure_ml2_for_fast_path
71 fi 77 fi
78 elif [[ "$1" == "stack" && "$2" == "extra" ]]; then
79 if is_service_enabled nova; then
80 nova_set_hugepages_flavor
81 fi
72 fi 82 fi
73 83
74 if [[ "$1" == "unstack" ]]; then 84 if [[ "$1" == "unstack" ]]; then