Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

librbd: global config overrides do not apply to in-use images #37894

Merged
merged 3 commits into from Nov 2, 2020

Conversation

dillaman
Copy link

Checklist

  • References tracker ticket
  • Updates documentation if necessary
  • Includes tests for new functionality or reproducer for bug

Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox

This method was previously only available for seastart builds, but
librbd will also use it to control the timing of updates to the global
config.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/common/config_proxy.h Show resolved Hide resolved
void set_config_values(const ConfigValues& val) {
#ifndef WITH_SEASTAR
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just wondering, do we really need this #ifndef WITH_SEASTAR? Wouldn't the lock work for seastar too?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They try to avoid all locking in seastar -- I think that's why there are those 100% unsafe operator-> overloads.

src/librbd/ImageCtx.cc Show resolved Hide resolved
Jason Dillaman added 2 commits October 29, 2020 14:14
Expose the ability to retrieve the ConfigValues from an existing
ConfigProxy object. When combined with the newly exposed
'set_config_values' method, it will allow the safe bulk-updating
of configuration options. This also removes the original private
static version of 'get_config_values'.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
The ConfigProxy contains a point-in-time copy of the global config
that is dynamically updated in CephContext::_conf. Upon an image
refresh, pull the latest version of the global config from the
CephContext and apply it to the config stored within the ImageCtx.

Fixes: https://tracker.ceph.com/issues/48035
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Copy link
Contributor

@trociny trociny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants