Skip to content

Commit 8fdee71

Browse files
Merge pull request #1366 from cschwede/swift-rolling-conversion
Use combined swift-conversion service for rolling node conversion
2 parents a0809e7 + bdd6b68 commit 8fdee71

3 files changed

Lines changed: 68 additions & 13 deletions

File tree

docs_user/modules/proc_converting-object-storage-nodes.adoc

Lines changed: 31 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,9 @@ Pre-provisioned nodes:: Setting `preProvisioned: true` in the
1919
Existing disk mounts are untouched. The `SwiftRawDisks` parameter from
2020
{OpenStackPreviousInstaller} is not migrated or converted. Disks on
2121
converted nodes must be managed manually.
22-
Rolling conversion with multiple node sets:: In production, do not convert
23-
all {object_storage} nodes at once. Instead, create separate
24-
`OpenStackDataPlaneNodeSet` custom resources and deploy them sequentially. Align
25-
groups with ring zones or regions so that no more than one replica of any
26-
partition is affected during the conversion.
22+
Rolling conversion:: The `swift-conversion` service uses `serial: 1` by
23+
default, which converts one node at a time to keep the {object_storage}
24+
available.
2725

2826
.Prerequisites
2927

@@ -89,18 +87,41 @@ $ oc patch openstackcontrolplane openstack --type=merge --patch-file=swift-confi
8987
----
9088

9189
. Create a `OpenStackDataPlaneService` CR to remove remaining
92-
{OpenStackPreviousInstaller} artifacts, such as containers, `systemd` units, and
93-
configuration, from the node:
90+
{OpenStackPreviousInstaller} artifacts and deploy the {object_storage} services
91+
on the node:
9492
+
9593
----
9694
$ oc apply -f - <<EOF
9795
apiVersion: dataplane.openstack.org/v1beta1
9896
kind: OpenStackDataPlaneService
9997
metadata:
100-
name: tripleo-cleanup
98+
name: swift-conversion
10199
namespace: openstack
102100
spec:
103-
playbook: osp.edpm.tripleo_cleanup
101+
addCertMounts: false
102+
caCerts: combined-ca-bundle
103+
edpmServiceType: swift
104+
dataSources:
105+
- secretRef:
106+
name: swift-conf
107+
- configMapRef:
108+
name: swift-storage-config-data
109+
- configMapRef:
110+
name: swift-ring-files
111+
playbookContents: |
112+
- name: Cleanup and deploy Swift
113+
hosts: "{{ edpm_override_hosts | default('all', true) }}"
114+
serial: 1
115+
strategy: linear
116+
gather_facts: "{{ gather_facts | default(false) }}"
117+
any_errors_fatal: "{{ edpm_any_errors_fatal | default(true) }}"
118+
max_fail_percentage: "{{ edpm_max_fail_percentage | default(0) }}"
119+
environment: "{{ edpm_playbook_environment | default({}) }}"
120+
tasks:
121+
- ansible.builtin.import_role:
122+
name: osp.edpm.edpm_tripleo_cleanup
123+
- ansible.builtin.import_role:
124+
name: osp.edpm.edpm_swift
104125
EOF
105126
----
106127

@@ -225,8 +246,7 @@ endif::[]
225246
- run-os
226247
- reboot-os
227248
- install-certs
228-
- tripleo-cleanup
229-
- swift
249+
- swift-conversion
230250
tlsEnabled: true
231251
----
232252

tests/roles/swift_conversion/defaults/main.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,5 @@ swift_conversion_nodeset: |
8080
- run-os
8181
- reboot-os
8282
- install-certs
83-
- tripleo-cleanup
84-
- swift
83+
- swift-conversion
8584
tlsEnabled: {{ enable_tlse }}

tests/roles/swift_conversion/tasks/main.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,42 @@
2727
{{ oc_header }}
2828
oc patch openstackcontrolplane openstack --type=merge --patch-file=swift-config-patch.yaml
2929
30+
- name: Create OpenStackDataPlaneService for Swift conversion
31+
ansible.builtin.shell: |
32+
{{ shell_header }}
33+
{{ oc_header }}
34+
oc apply -f - <<EOF
35+
apiVersion: dataplane.openstack.org/v1beta1
36+
kind: OpenStackDataPlaneService
37+
metadata:
38+
name: swift-conversion
39+
spec:
40+
addCertMounts: false
41+
caCerts: combined-ca-bundle
42+
edpmServiceType: swift
43+
dataSources:
44+
- secretRef:
45+
name: swift-conf
46+
- configMapRef:
47+
name: swift-storage-config-data
48+
- configMapRef:
49+
name: swift-ring-files
50+
playbookContents: |
51+
- name: Cleanup and deploy Swift
52+
hosts: "{{ edpm_override_hosts | default('all', true) }}"
53+
serial: 1
54+
strategy: linear
55+
gather_facts: "{{ gather_facts | default(false) }}"
56+
any_errors_fatal: "{{ edpm_any_errors_fatal | default(true) }}"
57+
max_fail_percentage: "{{ edpm_max_fail_percentage | default(0) }}"
58+
environment: "{{ edpm_playbook_environment | default({}) }}"
59+
tasks:
60+
- ansible.builtin.import_role:
61+
name: osp.edpm.edpm_tripleo_cleanup
62+
- ansible.builtin.import_role:
63+
name: osp.edpm.edpm_swift
64+
EOF
65+
3066
- name: Create OpenStackDataPlaneNodeSet for Swift node conversion
3167
no_log: "{{ use_no_log }}"
3268
ansible.builtin.shell: |

0 commit comments

Comments
 (0)