On my box LC_ALL=C# includes the '#' in the value without
a space between C and '#' and things go completely bonkers.
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
* Use set -e to detect errors
* no need to retry cleanup in a loop now that rbd-fuse closes images
* use --no-progress for long-running operations
* add output at the start of each test
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
Close all open images and librados state. This cleans up watches so we
don't need to wait for them to timeout in tests.
rbd-fuse is still a rough prototype, but this makes it slightly more
usable for testing.
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
Ensure that no more than one outstanding progress callback
is queued for notification. This will allow remote progress
updates to be sent at a rate in which all watch/notify
clients can support.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
When image locking is enabled, snapshot create, resize, and
flatten are coordinated with the lock owner. Previously, if the
the lock owner changed during one of this operations, the
operation would fail. Now librbd will attempt to restart the
operation with the new lock owner (or become the owner itself).
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
The resize, flatten, and snapshot maintenance operations now
use the new assert_lock feature to ensure that the current
client still owns the header lock when making changes.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
The assert_locked operation can be combined with other
RADOS ops to prevent an update to a locked object when
the client doesn't own the lock. It will not attempt to
acquire the lock if the object is not currently locked.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
When the exclusive lock feature is enabled, only a single client can
modify the image. As a result, certain maintenance activities
need to be proxied from the maintenance client to the active
leader.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Snapshot, flatten, and resize maintenance operations can now
be coordinated via the client holding the exclusive lock for the
image.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Resize and flatten now have async versions. The existing resize
and flatten operations now use the async versions internally. The
async operations will be used by the client holding the exclusive
lock when it receives maintenance requests from other clients.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
The trim completion context was not properly invoked if the
image's exclusive lock was lost between issuing a librados call
and receiving its completion.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
The parsing is sensitive to i18n and will fail if, for instance, it is set to French.
Workaround the problem by always setting the language to C so the script
can safely assume all output will be in english.
http://tracker.ceph.comm/issues/10596Fixes: #10596
Signed-off-by: Ahoussi Armand <ahoussi.say@telecom-bretagne.eu>
Use wildcard to capture gzipped man pages for ceph-clsinfo(8) and
librados-config(8). In addition to future-proofing us against
possible compression type changes down the road, this also aligns us
with the existing convention that's used to capture the rest of the man
page files.
First read the new instance info, then remove it, not the other way
around. Artifact of bucket sharding merge with object versioning.
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
The owner_lock was incorrectly held when unregistering the image
watcher. It was possible for the ImageWatcher finisher to be
running code that was then deadlocked waiting to acquire the
owner_lock while the close_image thread was attempting to shutdown
the deadlocked finisher.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
There was a rare race condition between a pending CoR operation
and a resize down operation resulting in a CoR copyup past the
new, reduced parent overlap. This commit also adds additional
log message details for CoR.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
The new RBD copy-on-read unit test case uses these RADOS functions
to verify that the CoR operation was successful. This implements
these functions in the librados_test_stub library.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
When issuing the CoR copyup request, there is no need to keep
initialize the librados callback. Treat the CoR as a fire-and-
forget operation.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
When the RBD cache is enabled, the ObjectCacher does not allow
reentrancy to read the full object. As a temporary workaround,
use the Finisher to handle CoR read requests.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
This is a hack. The correct answer is to adapt this method and
finish_ctx to allow this method to use finish_ctx. This is complicated
by the presence of the hit set trims in the same repop, so for now, we
kick the can down the road a bit.
Fixes: 10616
Signed-off-by: Samuel Just <sjust@redhat.com>
We left this off because it seemed the same as DONTNEED, but there is a
subtle distinction: DONTNEED means nobody will need it (and we probably
discard our cache), while NOREUSE means this client won't need it again
(and we should try to avoid polluting the cache from this IO only). At
least, that's the way we'r defining it. posix_fadvise says:
POSIX_FADV_NOREUSE
The specified data will be accessed only once.
POSIX_FADV_DONTNEED
The specified data will not be accessed in the near future.
which is similar. I think our definitions make a bit more sense for the
multi-client environment.
Signed-off-by: Sage Weil <sage@redhat.com>
Prior to this commit, the radosgw logrotate config was in the main
"ceph" package. This meant that if a user had installed "ceph", but not
"ceph-radosgw", they would end up with a logrotate configuration that
was unnecessary.
Only install the logrotate configuration file if the user has installed
ceph-radosgw.
Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
If a librados watch error occurs, it is possible that one
or more events were missed. Therefore, flag the header as
dirty so that it will be reloaded after the next operation.
Fixes: #4092
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Using set command, we can set pool write mode like with
LIBRADOS_OP_FLAG_FADVISE_DONTNEED which indicate osd backend don't cache
data afte writing.
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>