From 3d8c8c444b289d5624e94bba1c655c84f3d3d7d4 Mon Sep 17 00:00:00 2001 From: Ivan Chavero Date: Thu, 4 Feb 2016 00:07:42 -0700 Subject: [PATCH] Set manila nova_flavor id The default service_instance_flavor_id for the manila::service_instance class does not provide the disk space required for manila to work (Fixes rhbz#1304104) Change-Id: Ib7d1a5753e501f1f5d70652984e91980fc6316d0 --- packstack/plugins/{manila_255.py => manila_355.py} | 0 packstack/puppet/templates/manila_generic.pp | 12 ++++++++++++ 2 files changed, 12 insertions(+) rename packstack/plugins/{manila_255.py => manila_355.py} (100%) diff --git a/packstack/plugins/manila_255.py b/packstack/plugins/manila_355.py similarity index 100% rename from packstack/plugins/manila_255.py rename to packstack/plugins/manila_355.py diff --git a/packstack/puppet/templates/manila_generic.pp b/packstack/puppet/templates/manila_generic.pp index d3e4e90e9..c8fda323e 100644 --- a/packstack/puppet/templates/manila_generic.pp +++ b/packstack/puppet/templates/manila_generic.pp @@ -16,11 +16,23 @@ elsif ($::manila_network_type == 'nova-network'){ $service_instance_network_helper_type = 'nova' } +$admin_username = hiera('CONFIG_KEYSTONE_ADMIN_USERNAME') +$admin_password = hiera('CONFIG_KEYSTONE_ADMIN_PW') +$admin_tenant = 'admin' +$keystone_url = hiera('CONFIG_KEYSTONE_PUBLIC_URL') + +exec { 'create m1.manila nova flavor': + path => '/usr/bin:/bin:/usr/sbin:/sbin', + provider => shell, + command => "nova --os-username $admin_username --os-password $admin_password --os-tenant-name $admin_tenant --os-auth-url $keystone_url flavor-create m1.manila 66 512 0 1", + unless => "nova --os-username $admin_username --os-password $admin_password --os-tenant-name $admin_tenant --os-auth-url $keystone_url flavor-list | grep 66", +} -> manila::service_instance{ 'generic': service_image_location => hiera('CONFIG_MANILA_SERVICE_IMAGE_LOCATION'), service_instance_user => hiera('CONFIG_MANILA_SERVICE_INSTANCE_USER'), service_instance_password => hiera('CONFIG_MANILA_SERVICE_INSTANCE_PASSWORD'), service_instance_network_helper_type => $service_instance_network_helper_type, + service_instance_flavor_id => 66, } class { '::manila::compute::nova':