Browse Source

Correct logical expressions for storage backends

After introducing the change Iead5167210c4132badb866afc25d4ef14e27f6b2
swift isn't installed if ceph used as a backend for images
and not for object-storage service. In this sutiation we end up
with absence of object-storage at all which is wrong.

The commit introduces changes which makes possible
to swift been installed if ceph used only for image service.

Change-Id: If319845aa9f2d9b3ca07936350ef374f504679cb
Closes-Bug: #1604879
Sergii Rizvan 2 years ago
parent
commit
57bb7299b7

+ 3
- 3
deployment/puppet/openstack_tasks/examples/swift/tasks.yaml View File

@@ -6,7 +6,7 @@
6 6
   requires: [openstack-controller, memcached]
7 7
   condition:
8 8
     yaql_exp: &swift_enabled >
9
-      (not $.storage.objects_ceph and not $.storage.images_ceph) and
9
+      not $.storage.objects_ceph and
10 10
       (changedAny($.network_scheme, $.network_metadata, $.swift,
11 11
         $.get('swift_master_role', 'primary-controller'),
12 12
         $.get('swift_object_roles'), ('primary-controller' in $.roles),
@@ -63,7 +63,7 @@
63 63
   requires: [swift-proxy_storage, primary-swift-proxy_storage]
64 64
   condition:
65 65
     yaql_exp: >
66
-      (not $.storage.objects_ceph and not $.storage.images_ceph) and
66
+      not $.storage.objects_ceph and
67 67
       (changedAny($.storage, $.get('swift_master_role', 'primary-controller'),
68 68
         $.get('swift_ring_min_part_hours'),('primary-controller' in $.roles)))
69 69
   parameters:
@@ -84,7 +84,7 @@
84 84
     - name: swift-proxy_storage
85 85
   condition:
86 86
     yaql_exp: >
87
-      (not $.storage.objects_ceph and not $.storage.images_ceph) and
87
+      not $.storage.objects_ceph and
88 88
       (changedAny($.swift, $.network_metadata.vips,
89 89
         $.get('region', 'RegionOne'), $.public_ssl, $.get('use_ssl')))
90 90
   parameters:

+ 1
- 1
deployment/puppet/osnailyfacter/manifests/openstack_haproxy/openstack_haproxy_radosgw.pp View File

@@ -12,7 +12,7 @@ class osnailyfacter::openstack_haproxy::openstack_haproxy_radosgw {
12 12
   $external_lb      = hiera('external_lb', false)
13 13
 
14 14
   if !$external_lb {
15
-    if (!$storage_hash['images_ceph'] and !$storage_hash['objects_ceph']) {
15
+    if !$storage_hash['objects_ceph'] {
16 16
       $use_swift = true
17 17
     } else {
18 18
       $use_swift = false

+ 1
- 1
deployment/puppet/osnailyfacter/manifests/openstack_haproxy/openstack_haproxy_swift.pp View File

@@ -15,7 +15,7 @@ class osnailyfacter::openstack_haproxy::openstack_haproxy_swift {
15 15
 
16 16
   $external_lb       = hiera('external_lb', false)
17 17
 
18
-  if (!$storage_hash['images_ceph'] and !$storage_hash['objects_ceph']) {
18
+  if !$storage_hash['objects_ceph'] {
19 19
     $use_swift = true
20 20
   } else {
21 21
     $use_swift = false

Loading…
Cancel
Save