Skip to content

Commit b5cf898

Browse files
Merge pull request #1010 from katarimanojk/udpate_ceph_migration_for_swift_endpoints
improve ceph migration doc for rgw
2 parents 45bc391 + 1f246a1 commit b5cf898

2 files changed

Lines changed: 51 additions & 27 deletions

File tree

docs_user/assemblies/assembly_migrating-the-object-storage-service.adoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ ifdef::context[:parent-context: {context}]
66
:context: migrate-object-storage-service
77

88
= Migrating the {object_storage} to {rhos_long_noacro} nodes
9-
If you are using the {rhos_prev_long} {object_storage_first_ref} as an Object Storage service, you must migrate your Object Storage service to {rhos_long_noacro} nodes. If you are using the Object Storage API of the Ceph Object Gateway (RGW), you can skip this chapter.
9+
If you are using the {rhos_prev_long} {object_storage_first_ref} as an Object Storage service, you must migrate your Object Storage service to {rhos_long_noacro} nodes.
10+
11+
If you are using the Object Storage API of the Ceph Object Gateway (RGW), you can skip this chapter and migrate your Red Hat Ceph Storage cluster. For more information, see xref:ceph-migration_adopt-control-plane[Migrate the {Ceph} cluster]. If you are not planning to migrate Ceph daemons from Controller nodes, you must perform the steps that are described in xref:deploying-a-ceph-ingress-daemon_migrating-ceph-rgw[Deploying a Ceph ingress daemon] and xref:updating-the-object-storage-endpoints_migrating-ceph-rgw[Create or update the Object Storage service endpoints].
1012

1113
The data migration happens replica by replica. For example, if you have 3 replicas, move them one at a time to ensure that the other 2 replicas are still operational, which enables you to continue to use the {object_storage} during the migration.
1214

docs_user/modules/proc_updating-the-object-storage-endpoints.adoc

Lines changed: 48 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,83 @@
11
:_mod-docs-content-type: PROCEDURE
22
[id="updating-the-object-storage-endpoints_{context}"]
33

4-
= Updating the {object_storage} endpoints
4+
= Create or update the {object_storage} endpoints
55

6-
You must update the {object_storage_first_ref} endpoints to point to the new virtual IP address (VIP) that you reserved on the same network that you used to deploy RGW ingress.
6+
You must create or update the {object_storage_first_ref} endpoints to configure the new virtual IP address (VIP) that you reserved on the same network that you used to deploy RGW ingress.
77

88
.Procedure
99

10-
. List the current endpoints:
10+
. List the current swift endpoints and service:
1111
+
1212
----
13-
(overcloud) [stack@undercloud-0 ~]$ openstack endpoint list | grep object
13+
$ oc rsh openstackclient openstack endpoint list | grep 'swift.*object'
14+
$ oc rsh openstackclient openstack service list | grep 'swift.*object'
15+
----
1416

15-
| 1326241fb6b6494282a86768311f48d1 | regionOne | swift | object-store | True | internal | http://172.17.3.68:8080/swift/v1/AUTH_%(project_id)s |
16-
| 8a34817a9d3443e2af55e108d63bb02b | regionOne | swift | object-store | True | public | http://10.0.0.103:8080/swift/v1/AUTH_%(project_id)s |
17-
| fa72f8b8b24e448a8d4d1caaeaa7ac58 | regionOne | swift | object-store | True | admin | http://172.17.3.68:8080/swift/v1/AUTH_%(project_id)s |
17+
. If the service and endpoints do not exist, create the missing swift resources:
18+
+
19+
----
20+
$ oc rsh openstackclient openstack service create --name swift --description 'OpenStack Object Storage' object-store
21+
$ oc rsh openstackclient openstack role add --user swift --project service member
22+
$ oc rsh openstackclient openstack role add --user swift --project service admin
23+
$ for i in public internal; do
24+
oc rsh openstackclient endpoint create --region regionOne object-store $i http://<RGW_VIP>:8080/swift/v1/AUTH_%\(tenant_id\)s
25+
done
26+
$ oc rsh openstackclient openstack role add --project admin --user admin swiftoperator
1827
----
28+
+
29+
* Replace `<RGW_VIP>` with the Ceph RGW ingress VIP.
1930

20-
. Update the endpoints that are pointing to the Ingress VIP:
31+
. If the endpoints exist, update the endpoints to point to the right RGW ingress VIP:
2132
+
2233
----
23-
(overcloud) [stack@undercloud-0 ~]$ openstack endpoint set --url "http://10.0.0.89:8080/swift/v1/AUTH_%(project_id)s" 95596a2d92c74c15b83325a11a4f07a3
34+
$ oc rsh openstackclient openstack endpoint set --url http://<RGW_VIP>:8080/swift/v1/AUTH_%\(tenant_id\)s <swift_public_endpoint_uuid>
35+
$ oc rsh openstackclient openstack endpoint set --url http://<RGW_VIP>:8080/swift/v1/AUTH_%\(tenant_id\)s <swift_internal_endpoint_uuid>
36+
$ oc rsh openstackclient openstack endpoint list | grep object
37+
| 0d682ad71b564cf386f974f90f80de0d | regionOne | swift | object-store | True | public | http://172.18.0.100:8080/swift/v1/AUTH_%(tenant_id)s |
38+
| b311349c305346f39d005feefe464fb1 | regionOne | swift | object-store | True | internal | http://172.18.0.100:8080/swift/v1/AUTH_%(tenant_id)s |
2439
25-
(overcloud) [stack@undercloud-0 ~]$ openstack endpoint list | grep object-store
26-
| 6c7244cc8928448d88ebfad864fdd5ca | regionOne | swift | object-store | True | internal | http://172.17.3.79:8080/swift/v1/AUTH_%(project_id)s |
27-
| 95596a2d92c74c15b83325a11a4f07a3 | regionOne | swift | object-store | True | public | http://10.0.0.89:8080/swift/v1/AUTH_%(project_id)s |
28-
| e6d0599c5bf24a0fb1ddf6ecac00de2d | regionOne | swift | object-store | True | admin | http://172.17.3.79:8080/swift/v1/AUTH_%(project_id)s |
2940
----
3041
+
31-
Repeat this step for both internal and admin endpoints.
42+
* Replace `<swift_public_endpoint_uuid>` with the UUID of the swift public endpoint.
43+
* Replace `<swift_internal_endpoint_uuid>` with the UUID of the swift internal endpoint.
3244

3345
. Test the migrated service:
3446
+
3547
----
36-
(overcloud) [stack@undercloud-0 ~]$ swift list --debug
37-
38-
DEBUG:swiftclient:Versionless auth_url - using http://10.0.0.115:5000/v3 as endpoint
39-
DEBUG:keystoneclient.auth.identity.v3.base:Making authentication request to http://10.0.0.115:5000/v3/auth/tokens
40-
DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): 10.0.0.115:5000
41-
DEBUG:urllib3.connectionpool:http://10.0.0.115:5000 "POST /v3/auth/tokens HTTP/1.1" 201 7795
42-
DEBUG:keystoneclient.auth.identity.v3.base:{"token": {"methods": ["password"], "user": {"domain": {"id": "default", "name": "Default"}, "id": "6f87c7ffdddf463bbc633980cfd02bb3", "name": "admin", "password_expires_at": null},
4348
49+
$ oc rsh openstackclient openstack container list --debug
4450
4551
...
4652
...
4753
...
54+
REQ: curl -g -i -X GET http://keystone-public-openstack.apps.ocp.openstack.lab -H "Accept: application/json" -H "User-Agent: openstacksdk/1.0.2 keystoneauth1/5.1.3 python-requests/2.25.1 CPython/3.9.23"
55+
Starting new HTTP connection (1): keystone-public-openstack.apps.ocp.openstack.lab:80
56+
http://keystone-public-openstack.apps.ocp.openstack.lab:80 "GET / HTTP/1.1" 300 298
57+
RESP: [300] content-length: 298 content-type: application/json date: Mon, 14 Jul 2025 17:41:29 GMT location: http://keystone-public-openstack.apps.ocp.openstack.lab/v3/ server: Apache set-cookie: b5697f82cf3c19ece8be533395142512=d5c6a9ee2
58+
267c4b63e9f656ad7565270; path=/; HttpOnly vary: X-Auth-Token x-openstack-request-id: req-452e42c5-e60f-440f-a6e8-fe1b9ea89055
59+
RESP BODY: {"versions": {"values": [{"id": "v3.14", "status": "stable", "updated": "2020-04-07T00:00:00Z", "links": [{"rel": "self", "href": "http://keystone-public-openstack.apps.ocp.openstack.lab/v3/"}], "media-types": [{"base": "applic
60+
ation/json", "type": "application/vnd.openstack.identity-v3+json"}]}]}}
61+
GET call to http://keystone-public-openstack.apps.ocp.openstack.lab/ used request id req-452e42c5-e60f-440f-a6e8-fe1b9ea89055
62+
63+
...
64+
65+
REQ: curl -g -i -X GET "http://172.18.0.100:8080/swift/v1/AUTH_44477474b0dc4b5b8911ceec23a22246?format=json" -H "User-Agent: openstacksdk/1.0.2 keystoneauth1/5.1.3 python-requests/2.25.1 CPython/3.9.23" -H "X-Auth-Token: {SHA256}ec5deca0be37bd8bfe659f132b9cdf396b8f409db5dc16972d50cbf3f28474d4"
66+
Starting new HTTP connection (1): 172.18.0.100:8080
67+
http://172.18.0.100:8080 "GET /swift/v1/AUTH_44477474b0dc4b5b8911ceec23a22246?format=json HTTP/1.1" 200 2
68+
RESP: [200] accept-ranges: bytes content-length: 2 content-type: application/json; charset=utf-8 date: Mon, 14 Jul 2025 17:41:31 GMT x-account-bytes-used: 0 x-account-bytes-used-actual: 0 x-account-container-count: 0 x-account-object-count: 0 x-account-storage-policy-default-placement-bytes-used: 0 x-account-storage-policy-default-placement-bytes-used-actual: 0 x-account-storage-policy-default-placement-container-count: 0 x-account-storage-policy-default-placement-object-count: 0 x-openstack-request-id: tx000001e95361131ccf694-006875414a-7753-default x-timestamp: 1752514891.25991 x-trans-id: tx000001e95361131ccf694-006875414a-7753-default
69+
RESP BODY: []
70+
GET call to http://172.18.0.100:8080/swift/v1/AUTH_44477474b0dc4b5b8911ceec23a22246?format=json used request id tx000001e95361131ccf694-006875414a-7753-default
71+
72+
clean_up ListContainer:
73+
END return value: 0
4874
49-
DEBUG:swiftclient:REQ: curl -i http://10.0.0.89:8080/swift/v1/AUTH_852f24425bb54fa896476af48cbe35d3?format=json -X GET -H "X-Auth-Token: gAAAAABj7KHdjZ95syP4c8v5a2zfXckPwxFQZYg0pgWR42JnUs83CcKhYGY6PFNF5Cg5g2WuiYwMIXHm8xftyWf08zwTycJLLMeEwoxLkcByXPZr7kT92ApT-36wTfpi-zbYXd1tI5R00xtAzDjO3RH1kmeLXDgIQEVp0jMRAxoVH4zb-DVHUos" -H "Accept-Encoding: gzip"
50-
DEBUG:swiftclient:RESP STATUS: 200 OK
51-
DEBUG:swiftclient:RESP HEADERS: {'content-length': '2', 'x-timestamp': '1676452317.72866', 'x-account-container-count': '0', 'x-account-object-count': '0', 'x-account-bytes-used': '0', 'x-account-bytes-used-actual': '0', 'x-account-storage-policy-default-placement-container-count': '0', 'x-account-storage-policy-default-placement-object-count': '0', 'x-account-storage-policy-default-placement-bytes-used': '0', 'x-account-storage-policy-default-placement-bytes-used-actual': '0', 'x-trans-id': 'tx00000765c4b04f1130018-0063eca1dd-1dcba-default', 'x-openstack-request-id': 'tx00000765c4b04f1130018-0063eca1dd-1dcba-default', 'accept-ranges': 'bytes', 'content-type': 'application/json; charset=utf-8', 'date': 'Wed, 15 Feb 2023 09:11:57 GMT'}
52-
DEBUG:swiftclient:RESP BODY: b'[]'
5375
----
5476
ifeval::["{build}" != "downstream"]
5577
. Run tempest tests against {object_storage}:
5678
+
5779
----
58-
(overcloud) [stack@undercloud-0 tempest-dir]$ tempest run --regex tempest.api.object_storage
80+
$ tempest run --regex tempest.api.object_storage
5981
...
6082
...
6183
...

0 commit comments

Comments
 (0)