From 9111f2adfc5ab63c1a4529cf3d1a13092c6407ad Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Fri, 25 Oct 2024 23:59:19 +0900 Subject: [PATCH] Drop redundant nova resource dependencies Current nova_flavor resource automatically requires that all nova services are up. Also nova user credential is always configured before nova services are all up. Change-Id: I1d941d8ea628055308f5ef3fc5c051cb902b54d4 --- .../manifests/manila/backend/generic.pp | 11 ++-- .../modules/packstack/manifests/nova/api.pp | 58 ++++++++----------- .../packstack/manifests/provision/tempest.pp | 22 ++++--- 3 files changed, 40 insertions(+), 51 deletions(-) diff --git a/packstack/puppet/modules/packstack/manifests/manila/backend/generic.pp b/packstack/puppet/modules/packstack/manifests/manila/backend/generic.pp index 843ebf267..3957b149e 100644 --- a/packstack/puppet/modules/packstack/manifests/manila/backend/generic.pp +++ b/packstack/puppet/modules/packstack/manifests/manila/backend/generic.pp @@ -16,12 +16,11 @@ class packstack::manila::backend::generic () $keystone_url = lookup('CONFIG_KEYSTONE_PUBLIC_URL') nova_flavor { 'm1.manila': - ensure => present, - id => '66', - ram => '512', - disk => '1', - vcpus => '1', - require => [ Class['::nova::api'], Class['::nova::keystone::auth'] ], + ensure => present, + id => '66', + ram => '512', + disk => '1', + vcpus => '1', } -> manila::backend::service_instance{ 'generic': service_image_location => lookup('CONFIG_MANILA_SERVICE_IMAGE_LOCATION'), diff --git a/packstack/puppet/modules/packstack/manifests/nova/api.pp b/packstack/puppet/modules/packstack/manifests/nova/api.pp index e29637046..aece41fde 100644 --- a/packstack/puppet/modules/packstack/manifests/nova/api.pp +++ b/packstack/puppet/modules/packstack/manifests/nova/api.pp @@ -78,52 +78,44 @@ class packstack::nova::api () $manage_flavors = str2bool(lookup('CONFIG_NOVA_MANAGE_FLAVORS')) if $manage_flavors { - Class['::nova::api'] -> Nova_flavor<||> - Class['::keystone'] -> Nova_flavor<||> - nova_flavor { 'm1.tiny': - ensure => present, - id => '1', - ram => '512', - disk => '1', - vcpus => '1', - require => [ Class['::nova::api'], Class['::nova::keystone::auth'] ], + ensure => present, + id => '1', + ram => '512', + disk => '1', + vcpus => '1', } nova_flavor { 'm1.small': - ensure => present, - id => '2', - ram => '2048', - disk => '20', - vcpus => '1', - require => [ Class['::nova::api'], Class['::nova::keystone::auth'] ], + ensure => present, + id => '2', + ram => '2048', + disk => '20', + vcpus => '1', } nova_flavor { 'm1.medium': - ensure => present, - id => '3', - ram => '4096', - disk => '40', - vcpus => '2', - require => [ Class['::nova::api'], Class['::nova::keystone::auth'] ], + ensure => present, + id => '3', + ram => '4096', + disk => '40', + vcpus => '2', } nova_flavor { 'm1.large': - ensure => present, - id => '4', - ram => '8192', - disk => '80', - vcpus => '4', - require => [ Class['::nova::api'], Class['::nova::keystone::auth'] ], + ensure => present, + id => '4', + ram => '8192', + disk => '80', + vcpus => '4', } nova_flavor { 'm1.xlarge': - ensure => present, - id => '5', - ram => '16384', - disk => '160', - vcpus => '8', - require => [ Class['::nova::api'], Class['::nova::keystone::auth'] ], + ensure => present, + id => '5', + ram => '16384', + disk => '160', + vcpus => '8', } } } diff --git a/packstack/puppet/modules/packstack/manifests/provision/tempest.pp b/packstack/puppet/modules/packstack/manifests/provision/tempest.pp index 7122f26d5..85cd95a7f 100644 --- a/packstack/puppet/modules/packstack/manifests/provision/tempest.pp +++ b/packstack/puppet/modules/packstack/manifests/provision/tempest.pp @@ -62,20 +62,18 @@ class packstack::provision::tempest () $tempest_flavor_alt_vcpus= lookup('CONFIG_PROVISION_TEMPEST_FLAVOR_ALT_VCPUS') nova_flavor { $tempest_flavor_name : - ensure => present, - id => $tempest_flavor_ref, - ram => $tempest_flavor_ram, - disk => $tempest_flavor_disk, - vcpus => $tempest_flavor_vcpus, - require => [ Class['::nova::api'], Class['::nova::keystone::auth'] ], + ensure => present, + id => $tempest_flavor_ref, + ram => $tempest_flavor_ram, + disk => $tempest_flavor_disk, + vcpus => $tempest_flavor_vcpus, } nova_flavor { $tempest_flavor_alt_name : - ensure => present, - id => $tempest_flavor_alt_ref, - ram => $tempest_flavor_alt_ram, - disk => $tempest_flavor_alt_disk, - vcpus => $tempest_flavor_alt_vcpus, - require => [ Class['::nova::api'], Class['::nova::keystone::auth'] ], + ensure => present, + id => $tempest_flavor_alt_ref, + ram => $tempest_flavor_alt_ram, + disk => $tempest_flavor_alt_disk, + vcpus => $tempest_flavor_alt_vcpus, } # Service availability for testing based on configuration