Now that osd_id is passed to util.prepare.create_id it doesn't
make any sense to return osd_id from check_id anymore as it's
not being used.
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
See https://github.com/ceph/ceph/pull/20178, so we won't
try to call 'ceph osd crush weight-set create-compat' multiple times.
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
In crush-compat mode mgr/balancer will do 'ceph osd crush weight-set create-compat'
on each call to 'ceph balancer optimize <plan>', which turns out to be
bumping up osdmap version without modifying anything (we haven't executed the
plan yet).
E.g.:
./bin/ceph balancer reset && ./bin/ceph balancer optimize crush test && ./bin/ceph balancer show crush
// starting osdmap epoch 993
// starting crush version 962
// mode crush-compat
./bin/ceph balancer reset && ./bin/ceph balancer optimize crush test && ./bin/ceph balancer show crush
// starting osdmap epoch 994
// starting crush version 963
// mode crush-compat
Fix the above problem by checking whether a new weight-set is truly created or not
on the OSDMonitor-side.
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
* refs/pull/19833/head:
common: add C_SaferCond ctor with name argument
Client: use C_SaferCond for "_flush_range"
client: use C_SaferCond for _fallocate and ll_write_block
client: use C_SaferCond for _sync_fs and _fsync
client: use C_SaferCond in Client::_write
client: use C_SaferCond for _read_sync
client: use C_SaferCond in _read_async
client: use C_SaferCond for "Client::_read"
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
* refs/pull/19836/head:
Avoid the assert failure when the inode for the cap_export from other MDS happened not in MDCache
Reviewed-by: Zheng Yan <zyan@redhat.com>
If you do not then auth will not be created for the new OSD and the
daemon will not be able to start.
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
Using realpath always means that device mapper paths, like for dmcrypt
or LVM will get mangled and will return something like `/dev/dm-1` which
is not useful for anything in ceph-volume
Signed-off-by: Alfredo Deza <adeza@redhat.com>
The prepare_filestore and prepare_bluestore methods do not need to
attempt to recreate osd_id or fsid because this happens in prepare
already.
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
this allows us to configure multiple values for a given key without
resorting to string formatting to cram them into a single key/value pair
ex. port=80 port=443s instead of port=80+443s
Signed-off-by: Casey Bodley <cbodley@redhat.com>
when reusing a thread-local std::ostream for a new log entry, clear any
ios flags (ie eofbit/failbit/badbit) that may have been set during its
previous use
without this, any stream errors (for example, passing a nullptr to
operator<< sets the badbit) will result in all log output on that thread
to be blank for the remainder of the process
Signed-off-by: Casey Bodley <cbodley@redhat.com>
With prefix_len initialized as zero, mask in netmask_ipv4/6()
will always be zero, so find_ip_in_subnet() always return the
first interface.
Set prefix_len to the right value to fetch the right interface.
Signed-off-by: Gu Zhongyan guzhongyan@360.cn
Signed-off-by: yupeng chen chenyupeng-it@360.cn