Enabling mirroring for an image that does not support journaling
assumes snapshot based mirroring, which is supported only when the
pool is in the "image" mirror mode.
Also for the pool in the "image" mirror mode disabling/enabling
journaling feature for a mirroring image will switch
snapshot/journal mirror mode.
Signed-off-by: Mykola Golub <mgolub@suse.com>
"rbd snap rollback" expects an unlocked image, but we may get there
locked if object map is enabled (or if lock_on_read is specified in
rbd_default_map_options).
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Since 5.3:
- a plain "rbd map" acquires the lock, so it's not different from
"rbd map -o exclusive" in this regard
- if the lock is held by the exclusive peer, I/O is failed right away
instead of blocking
- lock_timeout option is respected only by "rbd map" and not by I/O
Since 5.5:
- if the mapping is read-only, the lock isn't acquired
Added blacklisting test case, dropped lock_timeout test case.
Fixes: https://tracker.ceph.com/issues/43127
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
This will ensure that the Ceph dashbord's block mirroring page and
the CLI's 'mirror pool status' have matching health indications.
Fixes: https://tracker.ceph.com/issues/42748
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Snapshot existence validation code was removed from krbd. It was racy
and relied on having watch established for snapshots.
Fixes: https://tracker.ceph.com/issues/42916
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
otherwise wait_for_health() fails like:
wait_for_health: ceph health detail
HEALTH_WARN 1 pool(s) have non-power-of-two pg_num
[WRN] POOL_PG_NUM_NOT_POWER_OF_TWO: 1 pool(s) have non-power-of-two pg_num
pool 'rbd' pg_num 10 is not a power of two
../qa/workunits/cephtool/../../standalone/ceph-helpers.sh:1613: wait_for_health: return 1
the failure was found when testing test_mon_pg().
this behavior was introduced by 6e46b1c0e5
Signed-off-by: Kefu Chai <kchai@redhat.com>
"version" is not an asok command anymore in the sense that it's served
by registered asock hook. so in this change, we replace "version" with
"sessions", so we can verify that audit channel does not the dispatched
"sessions" command sent from ceph cli.
also, restructure the test as a loop for better readability
Signed-off-by: Kefu Chai <kchai@redhat.com>
tests all IEC and SI units related test with a tier pool. as
`target_max_objects` and `target_size_bytes` only apply to tier
pools. so, for the sake of simplicity, tests all of them using
a tier pool.
introduced by 9095f67e
Signed-off-by: Kefu Chai <kchai@redhat.com>
mgr/ActivePyModules: behave if a module queries a devid that does not exist
Reviewed-by: Brad Hubbard <bhubbard@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
For an entity a.b.c.d, search all dot-delineated prefix sections. This
enables you to establish a hierarchical set of options for clients, such
as radosgw daemons.
Signed-off-by: Sage Weil <sage@redhat.com>
The GIL reacquire was being handled in the lambda, but that was not
getting called if the device didn't exist, leading to a crash.
Add a trivial CLI test.
Fixes: https://tracker.ceph.com/issues/42578
Signed-off-by: Sage Weil <sage@redhat.com>
krbd: retry on transient errors from udev_enumerate_scan_devices()
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
Reviewed-by: Dongsheng Yang <dongsheng.yang@easystack.cn>
* refs/pull/30859/head:
auth: EACCES, not EPERM
mon: shunt old tell commands from cli interface to asok
mon: allow mgr to tell mon.foo smart
mon: include quorum features in quorum_status
qa/workunits/mon/caps.sh: fix test
ceph_test_rados_api_cmd: fix MonDescribe test
Merge branch 'vstart-fs-auth' of git://github.com/batrick/ceph into wip-cleanup-mon-asok
test/pybind/test_ceph_argparse: fix tests
vstart: add volume client keys to keyring
vstart: use fs authorize to create master client key
vstart: redirect some output to stderr
vstart: output command strings to stderr
qa/workunits/cephtool/test.sh: fix 'quorum enter' caller
qa: change mon_status calls to quorum_status or tell commands
mon: fix 'heap ...' command
mon: consolidate 'sync force' commands
mon: allow asok commands to return an error code
mon: move 'quorum enter|exit' and 'mon_status' to asok
mon: fix 'smart' asok command
mon: remove old 'config set' and 'injectargs'
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
* refs/pull/30813/head:
qa: get rid of iteritems for python3 compatibility
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
I'm not really sure why this test expected EPERM before when it expects 0
a bit earlier, but it should certainly expect EPERM after the user is
deleted.
Signed-off-by: Sage Weil <sage@redhat.com>
since it requires a running ceph cluster, it can't run in 'make check'
as a unittest. add it to the rgw/verify suite instead
Signed-off-by: Casey Bodley <cbodley@redhat.com>
Replace the 'ceph [mon] sync force' commands and just use the asok
sync_force command instead. This is a low-level command that nobody should
reasonsbly using except in an emergency, so do not bother with trying to
maintain compatibility; it's a bit rediculous that we had 3 variations of
this to being with!
Signed-off-by: Sage Weil <sage@redhat.com>
* refs/pull/30217/head:
crimson: common/admin_socket kludge so that it builds
mon/MonClient: fix sending mon command to a specific rank
src/.gitignore: ignore .tox
mon/MonClient: interpret numeric mon target name as rank
mgr,mgr/MgrClient: use fsid to signal mon-mgr vs cli MCommands
qa/workunits/cephtool: fix errpr checks for 'ceph daemon' commands
common/ceph_context: make 'config unset' idempotent
qa/tasks/dump_stuck: mon.a, not mon.0
qa/suites/rados/singleton/all/admin-socket: fix test
common/config: EPERM setting config option after startup
qa/workunits/cephtool/test.sh: fix tell output error check
common/admin_socket: pass Formatter from generic infrastructure
common/admin_socket: pass ostream to call() for error output
os/bluestore: fix asok hook return value
rgw: fix asok return value
common/ceph_context: return error code from asok commands
test/pybind/test_rados: fix accidental mon tell test
mon: print entity_name along with caps to debug log
PendingReleaseNotes: notes about asok changes
mgr/MgrClient: empty target string for 'tell' means active mgr
common/admin_socket: report error code as part of output string
osd: change trigger_[deep_]scrub tommands to a pg tell command
osd: remove old command workqueue, threadpool
osd: drop MMonCommand handling
osdc/Objecter: resend OSD tell commands on EAGAIN
osd: route tell commands to asok; migrate commands
osd: use unique_ptr<Formatter> for asok_command
common/ceph_context: add generic asok 'injectargs'
common/admin_socket: allow dup prefixes
common/admin_socket: refactor with sync and async execute_command variants
common/admin_socket: pass input bufferlist
osd: transition to call_async() for asok
common/admin_socket: support alternative call_async()
mon/MonClient: send tell commands out of band via MCommand
mon: accept tell commands via MCommand and send them to asok handler
common/admin_socket: return int from hook call()
mgr/DaemonServer: route MCommand (for octopus+) to asok commands
do not use 'ceph tell mgr'
pybind/ceph_argparse: disambiguate mgr tell and CLI commands
ceph: make 'ceph tell mgr.*' send to the active mgr
ceph: send 'ceph tell mgr.X' to the right mgr
librados: add rados_mgr_command_target
mgr/MgrClient: add start_command variant that takes a target
common/admin_socket: drop unregister_command(); use per-hook variant
common/admin_socket: drop explicit prefix arg to register_command
common/admin_socket: simplify command routing
common/admin_socket: add ability to process MCommand via asok queue
common/admin_socket: pass cmdvec to execute_command
common/admin_socket: use pipe for general wakeup
include/compat: add flags arg to pipe_cloexec
common/admin_socket: drop unused args
Reviewed-by: Neha Ojha <nojha@redhat.com>
Therefore the v1 parent spec should not attempt to populate the
namespace.
Fixes: https://tracker.ceph.com/issues/41938
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
* refs/pull/28834/head:
libcephfs: Add test for lazyio via libcephfs
libcephfs: Add lazyio_propogate and lazyio_synchronize methods to libcephfs
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Jeff Layton <jlayton@redhat.com>
* refs/pull/29824/head:
qa: whitelist new FS_INLINE_DATA_DEPRECATED health warning
mds: add a HEALTH_WARN message when inline_data is enabled
mds: log a warning message when mds is started on an fs with inline_data
mon: deprecate CephFS inline_data support
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Douglas Fuller <dfuller@redhat.com>
The plan is to start deprecating this feature now so that we can remove
it in a future release. Change it to require the
--yes-i-really-really-mean-it flag, and to emit a custom
warning when that isn't specified.
For now, we leave the testing in place since we do want to be notified
if something breaks before we're ready to rip it out completely.
Fixes: https://tracker.ceph.com/issues/41311
Signed-off-by: Jeff Layton <jlayton@redhat.com>
This helps to to avoid the case where new tasks were not being scheduled
when an image name was re-used after having a task created under the
same name.
Fixes: https://tracker.ceph.com/issues/41032
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
* refs/pull/29034/head:
doc/mgr/crash: document missing commands, options
qa/suites/rados/singleton/all/test-crash: whitelist RECENT_CRASH
qa/suites/rados/mgr/tasks/insights: whitelist RECENT_CRASH
qa/tasks/mgr/test_insights: crash module now rejects bad crash reports
mgr/telemetry: fix remote into crash do_ls()
mgr/crash: don't make these methods static
mgr/BaseMgrModule: handle unicode health detail strings
mgr/crash: verify timestamp is valid
qa/suites/mgr: whitelist RECENT_CRASH
mgr/crash: remove unused var
mgr/crash: remove unused import 'six'
qa/workunits/rados/test_crash: health check
mgr/crash: improve validation on post
mgr/crash: automatically prune old crashes after a year
mgr/crash: raise RECENT_CRASH warning for recent (new) crashes
mgr/crash: add 'crash ls-new'
mgr/crash: add option and serve infra
mgr/crash: keep copy of crashes in memory
mgr/pg_autoscaler: adjust style to match built-in tables
mgr/crash: make 'crash ls' a nice table with a NEW column
mgr/crash: nicely format 'crash info' output
mgr/crash: add 'crash archive <id>', 'crash archive-all' commands
Reviewed-by: Neha Ojha <nojha@redhat.com>
lifecycle_expiration tests require some additional configuration.
beast and civetweb are both strict about header parsing and require
fails_strict_rfc2616
Signed-off-by: Casey Bodley <cbodley@redhat.com>
This commit makes chunk_scrub as a chunk_pool-based operation.
chunk_scrub procedure:
1. find references in the chunk_pool
2. check whether the reference exists in a base_pool
3. fix references
Signed-off-by: Myoungwon Oh <omwmw@sk.com>
this case introduces multiple quotes in caps line
it will trigger the bug like http://tracker.ceph.com/issues/22227
Signed-off-by: Gu Zhongyan <guzhongyan@360.cn>
Our test admin has been asking for this for the past few years:-)
Besides, this is also useful for operating on large Ceph clusters with
mutliple storage pools possibly spanning over all osds.
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
Due to pipe, sdiff return code was ignored. Also the compare functions
spent most of time in xxd, which was normally unnecessary.
Signed-off-by: Mykola Golub <mgolub@suse.com>