Rook will set up some environment variables to tell us what pod, pod
namespace, and physical host we are running on. If we see them, set
'hostname' according to the hardware host, and include the pod info
in our metadata.
This allows the usual host-based logic on Ceph to work correctly, like
placing OSDs automatically in the CRUSH map.
Signed-off-by: Sage Weil <sage@redhat.com>
We were modifying the in-memory state when running through several
osdmap pruning functions.
Should the transaction we're encoding not be committed, we may end up in
a state where we have a stale in-memory state that does not match what
is on disk; including having in-memory state while not having on-disk
state.
We prevent this sort of inconsistency by working on temporary states
instead.
Fixes: http://tracker.ceph.com/issues/24612
Signed-off-by: Joao Eduardo Luis <joao@suse.de>
The deep-copy and migration features required force-opening the
parent image just in case the deep-flatten feature wasn't enabled
on an image. This change simplies the code by always opening the
direct parent image, which really only matters if a cloned image
has snapshots w/o the deep-flatten feature.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
* refs/pull/23718/head:
cleanup: Replace always-false assertions with abort
include/assert: Smarten up ceph_assert
common: Call ceph_abort(), not abort()
include,common: Remove assert and clobber-foo
rbd_replay: Use ceph_assert for asserts.
rbd_fuse: Use ceph_assert for asserts.
osdc: Use ceph_assert for asserts.
osd: Use ceph_assert for asserts.
msg: Use ceph_assert for asserts.
mgr: Use ceph_assert for asserts.
messages: Use ceph_assert for asserts.
mds: Use ceph_assert for asserts.
log: Use ceph_assert for asserts.
libradosstriper: Use ceph_assert for asserts.
librados: Use ceph_assert for asserts.
kv: Use ceph_assert for asserts.
test: Use ceph_assert for asserts.
key_value_store: Use ceph_assert for asserts.
json_spirit: Use ceph_assert for asserts.
journal: Use ceph_assert for asserts.
global: Use ceph_assert for asserts.
erasure-code: Use ceph_assert for asserts.
rbd: Use ceph_assert for asserts.
tools: Use ceph_assert for asserts.
rgw: Use ceph_assert for asserts.
mon: Use ceph_assert for asserts.
crush: Use ceph_assert for asserts in C++ code.
crimson: Use ceph_assert for asserts.
compressor: Use ceph_assert for asserts.
cls: Use ceph_assert for asserts.
client: Use ceph_assert for asserts.
auth: Use ceph_assert for asserts
os: Use ceph_assert for asserts
common: Use ceph_assert for asserts
include: Use ceph_assert for asserts
include/assert: Deprecate assert macro
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
It is no longer necessary to fetch a monmap pre-authentication, something
we previous did for get_monmap_privately(). New code has replaced this
with get_monmap_and_config(), and it authenticates in order to get that
same information (plus configs).
That change was made in mimic, but we must support upgrades from N-2,
which means that luminous daemons still need to function. The only caller
for get_monmap_privately() in luminous is from ceph-osd during mkfs.
Disabling this here means that new OSDs cannot be created using nautilus
mons and a luminous ceph-osd. Include a note for the (future) nautilus
upgrade notes.
Reported-by: Christopher Ryan Harrell <harrellcr@email.arizona.edu>
Signed-off-by: Sage Weil <sage@redhat.com>
Change ceph_assert_msg to not require a CephContext. Add
ceph_assert_msgf that accepts a format string.
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
Since everything is using the ceph_assert macro, get rid of the assert
macro in include/assert.h .
As that is no longer a concern, get of macros to break the compile if
our macro gets replaced with the system assert.
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>