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>
There's no need to refer to this old version of ceph-deploy. v1.1.3 is
circa June 2013, and since that time, we have shipped much newer version
of ceph-deploy (1.5.22 at the time of this writing). We should simply
state the behavior of modern ceph-deploys here.
Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
On CentOS and RHEL, some dependencies come from EPEL.
Always enable RHEL Optional repository for RHEL as packages such as
packages such as libatomic_ops-devel or libedit-devel are only found
there in RHEL 6.5.
http://tracker.ceph.com/issues/11061 Refs: #11061
Signed-off-by: Loic Dachary <ldachary@redhat.com>