Browse Source

Do not install glare murano config under UCA

UCA does not provide the murano glance artifacts plugin so we need to
exclude it's configuration when deploying UCA.

DocImpact: UCA with murano does not install and configure glare as it is
not available with UCA packages. It will continue to use murano for the
artifact repository when UCA is used.

Change-Id: I356600cf410aaf0ce32f25ff18642e135b7380e9
Closes-Bug: #1586141
(cherry picked from commit 874b4350b4)
tags/9.0.1
Alex Schultz 3 years ago
parent
commit
a05673abb6

+ 4
- 1
deployment/puppet/openstack_tasks/manifests/glance/glance.pp View File

@@ -107,7 +107,10 @@ class openstack_tasks::glance::glance {
107 107
     $show_image_direct_url = pick($glance_hash['show_image_direct_url'], false)
108 108
   }
109 109
 
110
-  if $murano_plugins and $murano_plugins['glance_artifacts_plugin'] and $murano_plugins['glance_artifacts_plugin']['enabled'] {
110
+  # NOTE(aschultz): UCA does not have the glance artifacts plugin package
111
+  # we can remove the os_package_type once UCA provides the package
112
+  # TODO(aschultz): switch to dig at some point
113
+  if $murano_plugins and $murano_plugins['glance_artifacts_plugin'] and $murano_plugins['glance_artifacts_plugin']['enabled'] and ($::os_package_type == 'debian') {
111 114
     package {'murano-glance-artifacts-plugin':
112 115
       ensure  => installed,
113 116
     }

+ 5
- 1
deployment/puppet/openstack_tasks/manifests/murano/murano.pp View File

@@ -96,7 +96,11 @@ class openstack_tasks::murano::murano {
96 96
       action => 'accept',
97 97
     }
98 98
 
99
-    if $murano_plugins and $murano_plugins['glance_artifacts_plugin'] and $murano_plugins['glance_artifacts_plugin']['enabled'] {
99
+
100
+    # NOTE(aschultz): UCA does not have the glance artifacts plugin package
101
+    # we can remove the os_package_type once UCA provides the package
102
+    # TODO(aschultz): switch to dig at some point
103
+    if $murano_plugins and $murano_plugins['glance_artifacts_plugin'] and $murano_plugins['glance_artifacts_plugin']['enabled'] and ($::os_package_type == 'debian') {
100 104
       $packages_service = 'glance'
101 105
       $enable_glare     = true
102 106
     } else {

+ 1
- 1
tests/noop/spec/hosts/glance/glance_spec.rb View File

@@ -165,7 +165,7 @@ describe manifest do
165 165
       should contain_glance_glare_config('DEFAULT/default_log_levels').with_value(default_log_levels.sort.join(','))
166 166
     end
167 167
 
168
-    if murano_glance_artifacts_plugin and murano_glance_artifacts_plugin['enabled']
168
+    if murano_glance_artifacts_plugin and murano_glance_artifacts_plugin['enabled'] and facts[:os_package_type] == 'debian'
169 169
       it 'should install murano-glance-artifacts-plugin package' do
170 170
         should contain_package('murano-glance-artifacts-plugin').with(:ensure  => 'installed')
171 171
       end

+ 18
- 0
tests/noop/spec/hosts/murano/murano_spec.rb View File

@@ -124,6 +124,22 @@ describe manifest do
124 124
 
125 125
     murano_glance_artifacts_plugin = Noop.hiera_hash('murano_glance_artifacts_plugin', {})
126 126
 
127
+    let(:packages_service) do
128
+      if murano_glance_artifacts_plugin and murano_glance_artifacts_plugin['enabled'] and facts[:os_package_type] == 'debian'
129
+        'glance'
130
+      else
131
+        'murano'
132
+      end
133
+    end
134
+
135
+    let(:enable_glare) do
136
+      if murano_glance_artifacts_plugin and murano_glance_artifacts_plugin['enabled'] and facts[:os_package_type] == 'debian'
137
+        true
138
+      else
139
+        false
140
+      end
141
+    end
142
+
127 143
     #############################################################################
128 144
 
129 145
     enable = Noop.hiera_structure('murano/enabled')
@@ -148,6 +164,7 @@ describe manifest do
148 164
                    'identity_uri'        => "#{admin_auth_protocol}://#{admin_auth_address}:35357/",
149 165
                    'notification_driver' => 'messagingv2',
150 166
                    'use_neutron'         => use_neutron,
167
+                   'packages_service'    => packages_service,
151 168
                    'rabbit_os_user'      => rabbit_os_user,
152 169
                    'rabbit_os_password'  => rabbit_os_password,
153 170
                    'rabbit_os_port'      => amqp_port,
@@ -190,6 +207,7 @@ describe manifest do
190 207
                    'api_url'  => nil,
191 208
                    'repo_url' => repository_url,
192 209
                    'sync_db'  => false,
210
+                   'enable_glare' => enable_glare
193 211
                )
194 212
       end
195 213
 

Loading…
Cancel
Save