This commit adds a new unit test
`test_safe_prepare_osd_already_created()` in order to test when
`is_ceph_device()` returns `True` `RuntimeError` is well raised.
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
When rerunning ceph-volume lvm create on a device already prepared and
activated, ceph-volume should skip the creation.
This is a regression introduced by bb4de1a3fc
Fixes: https://tracker.ceph.com/issues/43981
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
This adds two properties available_[lvm,raw] to device (and thus inventory).
The goal is to have different notions of availability based on the
intended use case. For example finding LVM structures make a drive
unavailable for the raw mode, but might be available for the lvm mode.
Fixes: https://tracker.ceph.com/issues/43400
Signed-off-by: Jan Fajerski <jfajerski@suse.com>
* refs/pull/33114/head:
cephadm:Fix name argument parsing during image check for non-ceph components
Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Michael Fritch <mfritch@suse.com>
bug in parsing introduced in 97def7c
args.name may exist but will be none if flag is not used
check the value in addition to checking if it exists
Signed-off-by: Daniel-Pivonka <dpivonka@redhat.com>
A single report on a non-lvm device now works.
Format was cleaned up, report lvm journal,wal, db only once.
Fixes: https://tracker.ceph.com/issues/44009
Signed-off-by: Jan Fajerski <jfajerski@suse.com>
Also drop the sep argument from get_lvs and siblings, unused.
Introduce LV_CMD_OPTIONS to unify options to lvs.
Signed-off-by: Jan Fajerski <jfajerski@suse.com>
This was broken by d8debba782
because the 'images' json output works with podman but not with
docker. (Also, the inspect command is more explicit and cleaner.)
Signed-off-by: Sage Weil <sage@redhat.com>
This is fixed in RHEL 8.1.1 (and by extension centos/rhel 8.2+).
No fix for el 7 yet
Partially-fixes: https://tracker.ceph.com/issues/43703
Signed-off-by: Sage Weil <sage@redhat.com>
this test will end with a failure like
```
2020-01-30T18:15:15.870 INFO:tasks.ceph.mgr.x.smithi042.stderr:Warning: Permanently added 'smithi042.front.sepia.ceph.com,172.21.15.42' (ECDSA) to the list of known hosts.
2020-01-30T18:15:15.925 INFO:tasks.ceph.mgr.x.smithi042.stderr:Permission denied, please try again.
2020-01-30T18:15:15.932 INFO:tasks.ceph.mgr.x.smithi042.stderr:Permission denied, please try again.
2020-01-30T18:15:15.939 INFO:tasks.ceph.mgr.x.smithi042.stderr:root@smithi042.front.sepia.ceph.com: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
```
because mgr is not able to establish an ssh connection to that host with "root".
please note, the teuthology worker is acting using the "ubuntu" account on the
test node, and by default, "root" does not have its pubkey. and actually
`qa/tasks/cephadm.py` does push the pubkey to all the managed hosts before
testing cephadm.
since `qa/tasks/cephadm.py` is a better test for cephadm, let's just
drop this one.
as suites/rados/cephadm already covers cephadm
Signed-off-by: Kefu Chai <kchai@redhat.com>
since rexec module has been removed in python3, we cannot use it
anymore.
Fixes: https://tracker.ceph.com/issues/43657
Signed-off-by: Kefu Chai <kchai@redhat.com>
* refs/pull/33058/head:
mgr/cephadm: enforce that a host is a valid DNS name
mgr/cephadm: verify host's hostname matches our host name
cephadm: check-host: add optional --expect-hostname
Reviewed-by: Michael Fritch <mfritch@suse.com>
Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
* refs/pull/33069/head:
cephadm: use appropriate default image for non-ceph components
Reviewed-by: Patrick Seidensal <pseidensal@suse.com>
Reviewed-by: Michael Fritch <mfritch@suse.com>
* refs/pull/33039/head:
osd/OSD: prevent down osds from immediately rejoining the culster
osd/OSD: trim osd_markdown_log in tick() thread
Reviewed-by: yanjun <yan.jun8@zte.com.cn>
Reviewed-by: Sage Weil <sage@redhat.com>
This combines the hostname restrictions
* 1-63 chars
* a-z, A-Z, 0-9, -
and the DNS name restrictions
* .-delimited
* no empty components (or leading or trailing .)
* 250 chars total max
Note that this allows bare IPv4 addresses (which are indistinguishable from
a valid DNS name, AFAICS), but disallows bare IPv6 addresses.
Signed-off-by: Sage Weil <sage@redhat.com>
This makes the daemon disappear immediately from 'service ls', and also
avoids a temporary health warning about a stray service.
Signed-off-by: Sage Weil <sage@redhat.com>
This will fix an error caused by the usage of the latest version of Angular CLI
and Node.js v10.16.0.
Fixes: https://tracker.ceph.com/issues/43961
Signed-off-by: Tiago Melo <tmelo@suse.com>
mon/MgrMonitor.cc: warn about missing mgr in a cluster with osds
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>