Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rgw: fix handling of --remote in radosgw-admin period commands #14407

Merged
merged 5 commits into from May 4, 2017

Conversation

cbodley
Copy link
Contributor

@cbodley cbodley commented Apr 8, 2017

send_to_remote_gateway() was using RGWRados::zonegroup_conn_map and zone_conn_map to find a connection to the given --remote. the zone_conn_map only contains zones in the current zonegroup, however, so --remote didn't work for zones in other zonegroups

radosgw-admin period commit relies on send_to_remote_gateway() to commit the period to the master zone. if that master zone is another zonegroup, the command fails:

$ radosgw-admin period update --commit
Sending period to new master zone 2554ff93-3149-4e77-ab94-bfbff0493074
could not find connection for zone or zonegroup id: 2554ff93-3149-4e77-ab94-bfbff0493074
request failed: (2) No such file or directory
failed to commit period: (2) No such file or directory

Fixes: http://tracker.ceph.com/issues/19554

radosgw-admin period pull also uses send_to_remote_gateway(). because it no longer needs RGWRados::zone_conn_map for connections, the period pull command is now a raw_storage_op

@cbodley
Copy link
Contributor Author

cbodley commented Apr 11, 2017

@cbodley
Copy link
Contributor Author

cbodley commented Apr 11, 2017

jenkins test this please

@cbodley
Copy link
Contributor Author

cbodley commented May 3, 2017

ping @yehudasa @oritwas - this fix is needed to allow period commit from a secondary zonegroup

@oritwas
Copy link
Member

oritwas commented May 3, 2017

@cbodley , is this tested in test_multi.py?

added custom move construct/assign because std::atomic is not movable

Signed-off-by: Casey Bodley <cbodley@redhat.com>
helper functions to create connections to arbitrary remotes, rather
than depending on RGWRados to construct them in zone[group]_conn_map

Signed-off-by: Casey Bodley <cbodley@redhat.com>
callers are responsible for providing their own remote connection

Signed-off-by: Casey Bodley <cbodley@redhat.com>
by finding remote endpoints from the current period, 'period pull' no
longer needs to initialize RGWRados for zone[group]_conn_map

Fixes: http://tracker.ceph.com/issues/19554

Signed-off-by: Casey Bodley <cbodley@redhat.com>
@cbodley
Copy link
Contributor Author

cbodley commented May 3, 2017

@oritwas yes, when run with num_zonegroups=2, test_multi.py will fail to commit on the secondary zonegroup. with this fix, it succeeds

(pushed a rebase - there was a build failure from the recent change from atomic_t -> std::atomic that git didn't detect as a conflict)

@oritwas oritwas merged commit 94d6eed into ceph:master May 4, 2017
@cbodley cbodley deleted the wip-rgw-admin-remote branch May 4, 2017 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants