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

cephadm: init config and keyring with None #34108

Merged
merged 1 commit into from Mar 24, 2020

Conversation

mgfritch
Copy link
Contributor

and we should not assume that both config and keying are specified
when calling this method. because, for instance, create_daemon_dirs()
does handle the case where config and/or keyring is not specified.

this is a follow-up fix of 245d6a5

Signed-off-by: Kefu Chai kchai@redhat.com
Signed-off-by: Michael Fritch mfritch@suse.com

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 crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard backend
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox

and we should not assume that both `config` and `keying` are specified
when calling this method. because, for instance, `create_daemon_dirs()`
does handle the case where `config` and/or `keyring` is not specified.

this is a follow-up fix of 245d6a5

Signed-off-by: Kefu Chai <kchai@redhat.com>
Signed-off-by: Michael Fritch <mfritch@suse.com>
@mgfritch mgfritch requested a review from a team as a code owner March 22, 2020 18:21
@mgfritch
Copy link
Contributor Author

fixes traceback when no config/keyring specified:

Traceback (most recent call last):
  File "/root/cephadm", line 4247, in <module>
    r = args.func()
  File "/root/cephadm", line 935, in _infer_fsid
    return func()
  File "/root/cephadm", line 2603, in command_ceph_volume
    (config, keyring) = get_config_and_keyring()
  File "/root/cephadm", line 1358, in get_config_and_keyring
    if not config:
UnboundLocalError: local variable 'config' referenced before assignment

@mgfritch mgfritch requested a review from tchaikov March 22, 2020 18:28
@sebastian-philipp
Copy link
Contributor

#34102

@bk201
Copy link
Contributor

bk201 commented Mar 24, 2020

tested locally and works, no longer see the referenced before assignment issue.

@tchaikov tchaikov merged commit 3f5a801 into ceph:master Mar 24, 2020
@sebastian-philipp
Copy link
Contributor

Backport depends on #34168

@mgfritch mgfritch deleted the cephadm-optional-config-keyring branch April 2, 2020 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants