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

Projects
None yet
2 participants
@cbodley
Contributor

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

This comment has been minimized.

@cbodley

This comment has been minimized.

Contributor

cbodley commented Apr 11, 2017

jenkins test this please

@cbodley cbodley requested review from yehudasa and oritwas Apr 11, 2017

@cbodley

This comment has been minimized.

Contributor

cbodley commented May 3, 2017

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

@oritwas

This comment has been minimized.

Contributor

oritwas commented May 3, 2017

@cbodley , is this tested in test_multi.py?

@oritwas

oritwas approved these changes May 3, 2017

cbodley added some commits Apr 8, 2017

rgw: enable move on RGWRESTConn
added custom move construct/assign because std::atomic is not movable

Signed-off-by: Casey Bodley <cbodley@redhat.com>
radosgw-admin: get remote connections from given period/zonegroup
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>
radosgw-admin: send_to_remote_gateway takes RGWRESTConn*
callers are responsible for providing their own remote connection

Signed-off-by: Casey Bodley <cbodley@redhat.com>
radosgw-admin: 'period pull' reads endpoints from current period
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

This comment has been minimized.

Contributor

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

3 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodifed Submodules submodules for project are unmodified
Details
default Build finished.
Details

@cbodley cbodley deleted the cbodley:wip-rgw-admin-remote branch May 4, 2017

dongbula pushed a commit to dongbula/ceph that referenced this pull request Jul 22, 2017

Merge pull request ceph#14407 from cbodley/wip-rgw-admin-remote
rgw: fix handling of --remote in radosgw-admin period commands
Reviewed-by: Orit Wasserman <owasserm@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment