Skip to content

Commit b7818a8

Browse files
committed
Fix Swift node conversion documentation
Add port config step, move downstream vars to nodeTemplate, improve verification Signed-off-by: Christian Schwede <cschwede@redhat.com>
1 parent d14b316 commit b7818a8

1 file changed

Lines changed: 84 additions & 24 deletions

File tree

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

Lines changed: 84 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,54 @@ Rolling conversion with multiple node sets:: In production, do not convert
2929
* The initial {object_storage} adoption is complete. For more information, see
3030
xref:adopting-the-object-storage-service_hsm-integration[Adopting the
3131
{object_storage}].
32+
* Nodes cannot be members of more than one `OpenStackDataPlaneNodeSet` CR at
33+
the same time. If the nodes you want to convert were part of the node set
34+
created during the earlier adoption, delete that node set before proceeding:
35+
+
36+
----
37+
$ oc delete openstackdataplanenodeset <adoption-nodeset-name>
38+
----
3239

3340
.Procedure
3441

42+
. Create a patch file to configure the {object_storage} data plane storage
43+
ports. The {OpenStackPreviousInstaller} deployment used different default
44+
ports (6002 for the account service, 6001 for the container service, 6000 for
45+
the object service). The converted nodes must continue to use these same
46+
ports to ensure connectivity between all {object_storage} storage nodes using
47+
the unmodified rings:
48+
+
49+
----
50+
cat > swift-config-patch.yaml << EOF
51+
spec:
52+
swift:
53+
template:
54+
swiftStorage:
55+
defaultConfigOverwrite:
56+
01-account-server.conf: |
57+
[DEFAULT]
58+
bind_port = 6002
59+
01-container-server.conf: |
60+
[DEFAULT]
61+
bind_port = 6001
62+
01-object-server.conf: |
63+
[DEFAULT]
64+
bind_port = 6000
65+
EOF
66+
----
67+
+
68+
NOTE: If any {object_storage} storage service settings were customized in the
69+
{OpenStackPreviousInstaller} deployment, include those settings as well. For
70+
example, if the workers count was changed or additional configuration options
71+
were added for the account, container, or object services, add them to the
72+
corresponding section in the patch file.
73+
74+
. Apply the patch to the `OpenStackControlPlane` CR:
75+
+
76+
----
77+
$ oc patch openstackcontrolplane openstack --type=merge --patch-file=swift-config-patch.yaml
78+
----
79+
3580
. Create a `OpenStackDataPlaneService` custom resource (CR) to remove remaining
3681
{OpenStackPreviousInstaller} artifacts, such as containers, `systemd` units, and
3782
configuration, from the node:
@@ -94,6 +139,13 @@ spec:
94139
nodeTemplate:
95140
ansible:
96141
ansibleUser: cloud-admin
142+
ifeval::["{build}" == "downstream"]
143+
ansibleVarsFrom:
144+
- secretRef:
145+
name: subscription-manager
146+
- secretRef:
147+
name: redhat-registry
148+
endif::[]
97149
ansibleVars:
98150
edpm_nodes_validation_validate_controllers_icmp: false
99151
edpm_nodes_validation_validate_gateway_icmp: false
@@ -106,30 +158,40 @@ spec:
106158
gather_facts: false
107159
timesync_ntp_servers:
108160
- hostname: pool.ntp.org
161+
ifeval::["{build}" != "downstream"]
162+
edpm_bootstrap_command: |
163+
# This is a hack to deploy RDO Delorean repos to RHEL as if it were Centos 9 Stream
164+
set -euxo pipefail
165+
curl -sL https://github.com/openstack-k8s-operators/repo-setup/archive/refs/heads/main.tar.gz | tar -xz
166+
python3 -m venv ./venv
167+
PBR_VERSION=0.0.0 ./venv/bin/pip install ./repo-setup-main
168+
# This is required for FIPS enabled until trunk.rdoproject.org
169+
# is not being served from a centos7 host, tracked by
170+
# https://issues.redhat.com/browse/RHOSZUUL-1517
171+
dnf -y install crypto-policies
172+
update-crypto-policies --set FIPS:NO-ENFORCE-EMS
173+
./venv/bin/repo-setup current-podified -b antelope -d centos9 --stream
174+
dnf -y upgrade openstack-selinux
175+
rm -f /run/virtlogd.pid
176+
rm -rf repo-setup-main
177+
endif::[]
178+
ifeval::["{build}" == "downstream"]
179+
rhc_release: 9.2
180+
rhc_repositories:
181+
- {name: "*", state: disabled}
182+
- {name: "rhel-9-for-x86_64-baseos-eus-rpms", state: enabled}
183+
- {name: "rhel-9-for-x86_64-appstream-eus-rpms", state: enabled}
184+
- {name: "rhel-9-for-x86_64-highavailability-eus-rpms", state: enabled}
185+
- {name: "rhoso-18.0-for-rhel-9-x86_64-rpms", state: enabled}
186+
endif::[]
109187
ansibleSSHPrivateKeySecret: dataplane-adoption-secret
110188
managementNetwork: ctlplane
111189
nodes:
112190
edpm-swift-0:
113191
ansible:
114192
ansibleHost: 192.168.122.100
115-
ifeval::["{build}" == "downstream"]
116-
ansibleVarsFrom:
117-
- secretRef:
118-
name: subscription-manager
119-
- secretRef:
120-
name: redhat-registry
121-
endif::[]
122193
ansibleVars:
123194
edpm_swift_disks: []
124-
ifeval::["{build}" == "downstream"]
125-
rhc_release: 9.2
126-
rhc_repositories:
127-
- {name: "*", state: disabled}
128-
- {name: "rhel-9-for-x86_64-baseos-eus-rpms", state: enabled}
129-
- {name: "rhel-9-for-x86_64-appstream-eus-rpms", state: enabled}
130-
- {name: "rhel-9-for-x86_64-highavailability-eus-rpms", state: enabled}
131-
- {name: "rhoso-18.0-for-rhel-9-x86_64-rpms", state: enabled}
132-
endif::[]
133195
hostName: edpm-swift-0
134196
networks:
135197
- defaultRoute: true
@@ -144,9 +206,6 @@ endif::[]
144206
subnetName: subnet4
145207
preProvisioned: true
146208
services:
147-
ifeval::["{build}" == "upstream"]
148-
- repo-setup
149-
endif::[]
150209
- bootstrap
151210
- download-cache
152211
- install-os
@@ -194,19 +253,20 @@ $ watch oc get pod -l app=openstackansibleee
194253
----
195254
+
196255
----
197-
$ oc logs -l app=openstackansibleee -f --max-log-requests 20
256+
$ oc logs -l app=openstackansibleee -f --max-log-requests 40
198257
----
199258

200259
.Verification
201260

202-
* Verify that the node set is ready:
261+
* Verify that the Object Storage services are running on the converted node:
203262
+
204263
----
205-
$ oc get openstackdataplanenodeset openstack-edpm-ipam
264+
$ ssh cloud-admin@192.168.122.100 "sudo systemctl status edpm_swift_*"
206265
----
207266

208-
* Verify that the Object Storage services are running on the converted node:
267+
* Verify that the Object Storage services are functional after conversion, for
268+
example by uploading an object:
209269
+
210270
----
211-
$ ssh cloud-admin@192.168.122.100 "sudo systemctl status edpm_swift_*"
271+
$ oc rsh openstackclient /bin/sh -c "touch obj && openstack container create cont && openstack object create cont obj"
212272
----

0 commit comments

Comments
 (0)