Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
This project is now read‑only. Starting Monday, February 2, please use Jira Cloud for all bug tracking management.

Bug 1333754

Summary: Changing master zone procedure results in error
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: shilpa <smanjara>
Component: RGWAssignee: Casey Bodley <cbodley>
Status: CLOSED ERRATA QA Contact: shilpa <smanjara>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 2.0CC: cbodley, ceph-eng-bugs, hnallurv, kbader, kdreyer, mbenjamin, owasserm, sweil
Target Milestone: rc   
Target Release: 2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: RHEL: ceph-10.2.1-1.el7cp Ubuntu: ceph_10.2.1-2redhat1xenial Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-08-23 19:37:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description shilpa 2016-05-06 10:27:53 UTC
Description of problem:
After changing the master zone, doing a period commit fails. 

Version-Release number of selected component (if applicable):
10.2.0

How reproducible:
Always

Steps to Reproduce:
1. Configure us-1 as master zone with a multizone configuration with us-1 and us-2 as the zones.
2. Make us-2 as master. #radosgw-admin zone modify --rgw-zone=us-2 --master
3. Do a period update --commit and a radosgw restart on both the rgw nodes. 

Actual results:
Period commit throws an error:

# radosgw-admin period update --commit
request failed: (22) Invalid argument
Reason: Cannot commit period on zone 4f20d429-9e6c-4c0c-993b-7c2dd3f7d263, it must be sent to the period's master zone 8d3e4783-47e9-44b8-b772-07ad5888c028.

failed to commit period: (22) Invalid argument

get --staging command shows the period updated with us-2 as master. But commit throws error. Data fails to sync.

Additional info:

Logs in http://pastebin.test.redhat.com/371616

Comment 2 Casey Bodley 2016-05-10 20:14:07 UTC
Added upstream ticket http://tracker.ceph.com/issues/15828 and fixed in https://github.com/ceph/ceph/pull/9055.

Comment 3 Ken Dreyer (Red Hat) 2016-05-13 23:27:55 UTC
https://github.com/ceph/ceph/pull/9081 was merged to jewel and is present in v10.2.1.

Comment 6 shilpa 2016-07-14 07:57:12 UTC
Tested on 10.2.2-18. The procedure is:

On the rgw zone which has to be made primary:
1. radosgw-admin zone modify --rgw-zonegroup=us --rgw-zone=us-2 --access_key=secret --secret=secret --endpoints=http://rgw2:80 --default --master

2. radosgw-admin period update --commit

3. "radosgw-admin period get" should show the new master as us-2

4. Restart gateway

Comment 8 errata-xmlrpc 2016-08-23 19:37:50 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-1755.html