monitor-secret is not autogenerated when deploying with monitor-count=1

Bug #1694435 reported by Frode Nordahl
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ceph Monitor Charm
Fix Released
Undecided
Frode Nordahl

Bug Description

Per bug 1661737 and commit https://review.openstack.org/455052 monitor-secret is no longer mandatory and is auto-generated by the charm when not set.

This is however not true when deploying a single ceph-mon unit with monitor-count set to 1.

We should update the specialized code for single-monitor deployment or see if the more common code-path used for multi-monitor deployment can be generalized so it can be used in both scenarios.

2017-05-30 13:00:45 INFO config-changed creating /var/lib/ceph/tmp/juju-fe268a-0-lxd-0.mon.keyring
2017-05-30 13:00:45 INFO config-changed can't decode key 'None'
2017-05-30 13:00:45 INFO config-changed Traceback (most recent call last):
2017-05-30 13:00:45 INFO config-changed File "/var/lib/juju/agents/unit-ceph-mon-0/charm/hooks/config-changed", line 617, in <module>
2017-05-30 13:00:45 INFO config-changed hooks.execute(sys.argv)
2017-05-30 13:00:45 INFO config-changed File "/var/lib/juju/agents/unit-ceph-mon-0/charm/hooks/charmhelpers/core/hookenv.py", line 731, in execute
2017-05-30 13:00:45 INFO config-changed self._hooks[hook_name]()
2017-05-30 13:00:45 INFO config-changed File "/var/lib/juju/agents/unit-ceph-mon-0/charm/hooks/charmhelpers/contrib/hardening/harden.py", line 79, in _harden_inner2
2017-05-30 13:00:45 INFO config-changed return f(*args, **kwargs)
2017-05-30 13:00:45 INFO config-changed File "/var/lib/juju/agents/unit-ceph-mon-0/charm/hooks/config-changed", line 225, in config_changed
2017-05-30 13:00:45 INFO config-changed ceph.bootstrap_monitor_cluster(config('monitor-secret'))
2017-05-30 13:00:45 INFO config-changed File "lib/ceph/__init__.py", line 1201, in bootstrap_monitor_cluster
2017-05-30 13:00:45 INFO config-changed os.unlink(keyring)
2017-05-30 13:00:45 INFO config-changed OSError: [Errno 2] No such file or directory: '/var/lib/ceph/tmp/juju-fe268a-0-lxd-0.mon.keyring'
2017-05-30 13:00:45 ERROR juju.worker.uniter.operation runhook.go:107 hook "config-changed" failed: exit status 1

Revision history for this message
Frode Nordahl (fnordahl) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/469129/

Changed in charm-ceph-mon:
assignee: nobody → Frode Nordahl (fnordahl)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-ceph-mon (master)

Reviewed: https://review.openstack.org/469129
Committed: https://git.openstack.org/cgit/openstack/charm-ceph-mon/commit/?id=4c05a1622343f47f5d7305ff5c58d84c04ed80da
Submitter: Jenkins
Branch: master

commit 4c05a1622343f47f5d7305ff5c58d84c04ed80da
Author: Frode Nordahl <email address hidden>
Date: Tue May 30 15:37:15 2017 +0200

    Fix single-monitor deployment

    Commit ce4fe7a084a727390e83bb7da5adb697fe2f7405 introduced
    auto-generation of 'monitor-secret' and 'fsid'.

    However, the auto-generated 'monitor-secret' is not used when
    doing single-monitor deployments.

    This commit fixes that.

    Change-Id: Iae41b3296c2dfd86823cac91f70d582951206261
    Closes-Bug: #1694435

Changed in charm-ceph-mon:
status: In Progress → Fix Committed
James Page (james-page)
Changed in charm-ceph-mon:
milestone: none → 17.08
James Page (james-page)
Changed in charm-ceph-mon:
status: Fix Committed → Fix Released
Revision history for this message
Chris Gregan (cgregan) wrote :

This issue appeared in this run again.

Revision history for this message
Chris Gregan (cgregan) wrote :
Revision history for this message
Chris Gregan (cgregan) wrote :
Revision history for this message
Ryan Beisner (1chb1n) wrote :

monitor-count is 3 (expected-mon-count 3) in the scenario posted. This original bug was all about a scenario with a single monitor. Please raise a separate/new bug. Thank you.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.