]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
common: do not dup the options when reexpanding 38058/head
authorXiubo Li <xiubli@redhat.com>
Mon, 23 Nov 2020 12:55:01 +0000 (20:55 +0800)
committerXiubo Li <xiubli@redhat.com>
Tue, 24 Nov 2020 04:01:49 +0000 (12:01 +0800)
commit56ca87ae3b3c341a78a8df8f95d3bf31828c9108
treebdd459394c4a8b072454a42ba7c0c0d8184bb896
parent7496be719c3419224ac7fc29d6db4e282b193554
common: do not dup the options when reexpanding

The old code will store all the options, which has `$pid` in them,
in may_reexpand_meta map. And when reexpanding later, the reexpand
code will dup them with a higher priority(CONF_OVERRIDE).

This will be a problem, if the default value has `$pid` and be
stored in the may_reexpand_meta map, and then the code set a new
different value, which may have no `$pid`, from CLI or config file.
The reexpand will override it with the default value always.

This will do not duplicate the options with CONF_OVERRIDE priority
when reexpanding, just refresh them and call the observers. And the
finalize_reexpand_meta() will always be called after the fork() is
done in child processes.

Fixes: https://tracker.ceph.com/issues/48240
Signed-off-by: Xiubo Li <xiubli@redhat.com>
src/common/config.cc
src/common/config.h