Instead of setting the HEAD image flag to indicate an invalid
object map, set the flag for the specific snapshot that is
invalid.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
http://developer.openstack.org/api-ref-objectstorage-v1.html says: "With COPY, you can add additional metadata to the object."
Fixes: #10662
Backport: hammer
Reported-by: Ahmad Faheem <ahmad.faheem@ril.com>
Signed-off-by: Dmytro Iurchenko <diurchenko@mirantis.com>
It's possible for an object map to be invalid only for
a snapshot, so allow snapshot flags to be updated. This
will also be required when rebuilding the object map and
clearing the invalid flag.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
We slip in an extraneous comma if { "rw": "rw" } happens to be the
first map_options pair:
# ./rbd map -o rw,share foo
/dev/rbd0
-> 127.0.0.1:6789 name=admin,key=client.admin,,share rbd foo -
The kernel mount options parser can handle it, but fix it nonetheless.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Allow supplying rbd map -o / --options through 'rbd default map
options' config option. Options specified on the command line take
precedence on a per-option basis, i.e. default and cli options are
merged with a preference for the latter. For example:
# grep 'rbd default map options' ceph.conf
rbd default map options = "ro,nocrc"
# ./rbd map -o noshare,rw foo
/dev/rbd0
results in a rw mapping with nocrc,noshare.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
For example:
# ./rbd map -o share,noshare foo
rbd: warning: redefining map option share: 'share' -> 'noshare'
/dev/rbd0
mount(8) doesn't do this and it's a bit silly to begin with. Drop this
in preparation for adding rbd default map options config option.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
1. client try to connect to server
2. server side accept and enter STANDBY because of socket error
3. client reconnect
4. during replacing, server side failed to reply connect tag
5. client reconnect again
6. because we have existing connection which is in normal state but has
error socket, we will reply to WAIT tag
7. client waits
We need to handle error in step 4, so we can ensure not sending WAIT tag
Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
Since XioLoopbackConnection is a RefCountedObject, it can't be
an expanded member of XioMessenger.
Fixes cleanup/shutdown errors.
Signed-off-by: Matt Benjamin <matt@cohortfs.com>
(cherry picked from commit f5735b28d1)
For the write case when the oid.snap is CEPH_NOSNAP, the obc is created
in find_object_context, and missing_oid is setting to a NULL object.
Checking if the missing_oid is in the hit set is not the correct way
since it's NULL. Instead, we should check the obc->obs.oi.soid.
Signed-off-by: Zhiqiang Wang <zhiqiang.wang@intel.com>
Since XioLoopbackConnection is a RefCountedObject, it can't be
an expanded member of XioMessenger.
Fixes cleanup/shutdown errors.
Signed-off-by: Matt Benjamin <matt@cohortfs.com>
Just fixes linkage of dencoder in test. Fix the false assumption
that cls is only used if WITH_RADOSGW.
Signed-off-by: Matt Benjamin <matt@cohortfs.com>
In some cases, depending on the implementation or the operating system,
parted --machine -- /dev/sdh print
may contain empty lines. The current parsing code is fragile and highly
depends on output details. Replace it with code that basically does the
same sanity checks (output not empty, existence of units, existence of
the dev entry) but handles the entire output instead of checking line by
line.
http://tracker.ceph.com/issues/10983Fixes: #10983
Signed-off-by: Loic Dachary <ldachary@redhat.com>
Fix for cppcheck issue:
Assignment of function parameter has no effect outside the function.
Remove assignment to need_to_wait before exit.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
On CentOS 6.X and RHEL 6.X:
* /dev/disk/by-partuuid is not updated, support files must be installed
to create them when udev notices a partition modification.
* /dev/loop is not configured to handle partition tables, the default
2.6.32 kernel must be configured with loop.max_part=16
Sanity checks are added to verify the above, attempt to fix it and fail
if it cannot be fixed or if a machine reboot is necessary.
Signed-off-by: Loic Dachary <ldachary@redhat.com>
If we are not able to send the XIO message using xio_send_msg(),
remove the XIO message from the send Q, before queuing it to the resend
Q. Otherwise, boost will generate a assert.
Signed-off-by: Raju Kurunkad <raju.kurunkad@sandisk.com>
(cherry picked from commit dbb8c93d41)
If we are not able to send the XIO message using xio_send_msg(),
remove the XIO message from the send Q, before queuing it to the resend
Q. Otherwise, boost will generate a assert.
Signed-off-by: Raju Kurunkad <raju.kurunkad@sandisk.com>