For the case where multiple resize requests were pending,
queued resizes should use the most recent value for the
current image size -- not the image size when the resize
was queued.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
If the object map is too large for the current image, it implies
that a resize operation was interrupted. It should only be
considered invalid if the object map is smaller than the image,
which shouldn't be possible.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
During a resize, reduce the possibility that the object map
and the header will get out-of-sync during a resize operation
that is canceled.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Update the in-memory image metadata for size and parent
overlap after updating the on-disk image metadata. Also
schedule an image refresh in case multiple resizes are
enqueued -- since ictx_refresh isn't async.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
If a shrink operation is in progress, all operations should use
the new size and new parent overlap for IO operations.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
When proxying resize/flatten requests, the current image
R/W state is not validated. Also ensure the proper locks
are held when reading image metadata.
Signed-off-by: Jason Dillaman <dillaman@redhat.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>
If an ObjectOperation op is cancelled, its destructor is
called and each Context object in out_handler is deleted.
A C_TwoContexts object can be one of these handlers. The
two contexts wrapped in C_TwoContexts must be deleted
as well.
Signed-off-by: Xiong Yiliang <xiongyiliang@xunlei.com>
(cherry picked from commit f33cdbe485)
This will only output all the values applicable to a given type of pool.
So for example for a pool that is not a tier pool values like HIT_SET_TYPE,
HIT_SET_PERIOD, HIT_SET_COUNT etc. will be ignored.
Fixes: #10891
Signed-off-by: Michal Jarzabek <stiopa@gmail.com>
On all distros, Apache should be able to write to its own log directory.
If not, that is a severe distro bug that should be reported/fixed.
Remove the references to running "chown" on /var/log/httpd or
/var/log/apache2.
Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
If this connection is blocking on throttler and another worker thread
try to acquire this connection's lock, it will deadlock.
Signed-off-by: Haomai Wang <haomaiwang@gmail.com>