In order for an MDS to make it through stopping when
it had some strays, the other ranks that serviced
the migrate_stray renames must ensure that they
give up any cache objects that belonged to
the stopping MDS, so that the stopping MDS
can finish emptying its cache.
Fixes: #10744
Signed-off-by: John Spray <john.spray@redhat.com>
Add high precision cpu cycles support for powerpc and powerpc64.
Provide a fallback for other architectures and warn during
compilation.
Signed-off-by: James Page <james.page@ubuntu.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>
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>
The kernel partition table notification (via partprobe, partx, etc.) may
behave differently when a partition is in use. Add a test case that
checks a new journal partition shows as expected, even if another
journal partition is in use.
http://tracker.ceph.com/issues/10987 Refs: #10987
Signed-off-by: Loic Dachary <ldachary@redhat.com>
Create an OSD with data on a disk, journal on another
This will add a new partition to $journal, the previous
one will remain.
Add 200MB to the file supporting the pseudo disk exposed via the loop
device: as we create more OSDs, more 100MB partitions will be created
for journals.
Signed-off-by: Loic Dachary <ldachary@redhat.com>
Direct IO for the journal may cause subtle errors while running the
tests withing a container. Disable Direct IO for all ceph-disk.sh tests.
Signed-off-by: Loic Dachary <ldachary@redhat.com>
Replace the fragile extaction of the whoami file with an explicit uuid
set for a given OSD. It can conveniently be translated back into an osd
id with ceph osd create uuid if needed.
Signed-off-by: Loic Dachary <ldachary@redhat.com>
The activate_dev error must kill all process with teardown before
attempting to umount the devices when an error happens. Otherwise the
device fails to be unmounted and the loop devices are never freed.
Signed-off-by: Loic Dachary <ldachary@redhat.com>