doc:adding "--allow-shrink" in decreasing the size of the rbd block to distinguish from the increasing option
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
* in python3, None can not be compared with a str. and
we should always set codename with a non empty str, so update
TestCephDetectInit.test_debian so it always set a code name.
and assert(codename and distroname) in choose_init().
Signed-off-by: Kefu Chai <kchai@redhat.com>
In the original file, the increasing and decreaing of the size of the rbd block shares the same option:
"rbd resize --size 2048 foo".
However, it is not proper, as the "--allow-shrink" needs to be added while decreasing the size of the rbd block.
As a result, it is necessary to make a distinguish between these two options as follows:
"rbd resize --size 2048 foo (to increase)"
"rbd resize --size 2048 foo --allow-shrink (to decrease)"
Signed-off-by: Yehua <chen.yehua@h3c.com>
ceph-disk: fix failures when preparing disks with udev > 214
On CentOS 7.1 and other operating systems with a version of udev greater or equal to 214,
running ceph-disk prepare triggered unexpected removal and addition of partitions on
the disk being prepared. That created problems ranging from the OSD not being activated
to failures because /dev/sdb1 does not exist although it should.
Reviewed-by: Sage Weil <sage@redhat.com>
When ceph-disk prepares the disk, it triggers udev events and each of
them ceph-disk activate. If systemctl stop ceph-osd@2 happens while
there still are ceph-disk activate in flight, the systemctl stop may be
cancelled by the systemctl enable issued by one of the pending ceph-disk
activate.
This only matters in a test environment where disks are destroyed
shortly after they are activated.
Signed-off-by: Loic Dachary <loic@dachary.org>
sgdisk -i 1 /dev/vdb opens /dev/vdb in write mode which indirectly
triggers a BLKRRPART ioctl from udev (starting version 214 and up) when
the device is closed (see below for the udev release note). The
implementation of this ioctl by the kernel (even old kernels) removes
all partitions and adds them again (similar to what partprobe does
explicitly).
The side effects of partitions disappearing while ceph-disk is running
are devastating.
sgdisk is replaced by blkid which only opens the device in read mode and
will not trigger this unexpected behavior.
The problem does not show on Ubuntu 14.04 because it is running udev <
214 but shows on CentOS 7 which is running udev > 214.
git clone git://anonscm.debian.org/pkg-systemd/systemd.git
systemd/NEWS:
CHANGES WITH 214:
* As an experimental feature, udev now tries to lock the
disk device node (flock(LOCK_SH|LOCK_NB)) while it
executes events for the disk or any of its partitions.
Applications like partitioning programs can lock the
disk device node (flock(LOCK_EX)) and claim temporary
device ownership that way; udev will entirely skip all event
handling for this disk and its partitions. If the disk
was opened for writing, the close will trigger a partition
table rescan in udev's "watch" facility, and if needed
synthesize "change" events for the disk and all its partitions.
This is now unconditionally enabled, and if it turns out to
cause major problems, we might turn it on only for specific
devices, or might need to disable it entirely. Device Mapper
devices are excluded from this logic.
http://tracker.ceph.com/issues/14094Fixes: #14094
Signed-off-by: Ilya Dryomov <idryomov@redhat.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
The behavior of partprobe or sgdisk may be subtly different if given a
symbolic link to a device instead of an actual device. The debug output
is also more confusing when the symlink shows instead of the device it
points to.
Always dereference the symlink before running destroy and zap.
Signed-off-by: Loic Dachary <loic@dachary.org>
The default of 120 seconds may be exceeded when the disk is very slow
which can happen in cloud environments. Increase it to 600 seconds
instead.
The partprobe command may fail for the same reason but it does not have
a timeout parameter. Instead, try a few times before failing.
The udevadm settle guarding partprobe are not necessary because
partprobe already does the same. However, partprobe does not provide a
way to control the timeout. Having a udevadm settle after another is
going to be a noop most of the time and not add any delay. It matters
when the udevadm settle run by partprobe fails with a timeout because
partprobe will silentely ignores the failure.
http://tracker.ceph.com/issues/14080Fixes: #14080
Signed-off-by: Loic Dachary <loic@dachary.org>
This patch adds the option for eviction check size in cache-tier.
On a busy setup, it's better to check bigger number of objects so
the eviction is faster.
Signed-off-by: Yuan Zhou <yuan.zhou@intel.com>
The inline ms_fast_dispatch implementation calls assert, which
puts asset.h in the interface.
The fact that many Dispatcher descendants don't implement
ms_fast_dispatch prevents making the method pure virtual--which
suggests that maybe there is a need for a FastDispatcher
interface that inherits Dispatcher and introduces ms_fast_dispatch
and related?
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>