microceph pool setting fails
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Snap |
Fix Released
|
Critical
|
Unassigned |
Bug Description
2023.2/candidate (rev 509)
While testing this candidate we hit this issue in all our test runs.
When running `sunbeam cluster join` microceph charm goes to error
microceph/0* active idle 0 10.246.164.174
microceph/1 error idle 1 10.246.164.175 hook failed: "peers-
microceph/2 error idle 2 10.246.165.13 hook failed: "ceph-relation-
microceph/3 error idle 3 10.246.165.86 hook failed: "peers-
microceph/4 error idle 4 10.246.165.14 hook failed: "peers-
microceph/5 active executing 5 10.246.167.160
microceph/6 error idle 6 10.246.164.113 hook failed: "peers-
microceph/7 error idle 7 10.246.164.114 hook failed: "peers-
microceph/8 blocked idle 8 10.246.165.85 (workload) Error in charm (see logs): Command '['microceph', 'cluster', 'join', 'eyJuYW1lIjoibW
Units fail because of
subprocess.
charm - microceph reef/candidate rev 47
snap - microceph 18.2.0+
One of failed test runs - https:/
Changed in snap-openstack: | |
status: | New → Triaged |
importance: | Undecided → Critical |
Some more context from https:/ /oil-jenkins. canonical. com/artifacts/ 66675a8b- 8d56-477f- 9e4a-5731c88135 c2/generated/ generated/ sunbeam/ juju_debug_ log.txt
It looks like we might be calling `ceph config set` prematurely before the ceph.conf is fully populated
unit-microceph-1: 12:15:42 ERROR unit.microceph/ 1.juju- log peers:1: Uncaught exception while in charm code: juju/agents/ unit-microceph- 1/charm/ ./src/charm. py", line 343, in <module> MicroCephCharm) juju/agents/ unit-microceph- 1/charm/ venv/ops/ main.py" , line 544, in main juju/agents/ unit-microceph- 1/charm/ venv/ops/ main.py" , line 520, in run juju/agents/ unit-microceph- 1/charm/ venv/ops/ main.py" , line 509, in _emit charm_event( self.charm, self.dispatcher .event_ name) juju/agents/ unit-microceph- 1/charm/ venv/ops/ main.py" , line 143, in _emit_charm_event to_emit. emit(*args, **kwargs) juju/agents/ unit-microceph- 1/charm/ venv/ops/ framework. py", line 350, in emit _emit(event) juju/agents/ unit-microceph- 1/charm/ venv/ops/ framework. py", line 849, in _emit _reemit( event_path) juju/agents/ unit-microceph- 1/charm/ venv/ops/ framework. py", line 939, in _reemit handler( event) juju/agents/ unit-microceph- 1/charm/ src/relation_ handlers. py", line 261, in on_changed _rel_changed_ nonldr( event) juju/agents/ unit-microceph- 1/charm/ src/relation_ handlers. py", line 254, in _rel_changed_nonldr on.node_ added.emit( **event_ args) juju/agents/ unit-microceph- 1/charm/ venv/ops/ framework. py", line 350, in emit _emit(event) juju/agents/ unit-microceph- 1/charm/ venv/ops/ framework. py", line 849, in _emit _reemit( event_path) juju/agents/ unit-microceph- 1/charm/ venv/ops/ framework. py", line 939, in _reemit handler( event) juju/agents/ unit-microceph- 1/charm/ src/relation_ handlers. py", line 325, in _on_node_added callback_ f(event) juju/agents/ unit-microceph- 1/charm/ ./src/charm. py", line 113, in configure_charm configure_ ceph(event) juju/agents/ unit-microceph- 1/charm/ ./src/charm. py", line 339, in configure_ceph juju/agents/ unit-microceph- 1/charm/ ./src/charm. py", line 327, in configure_ceph set_pool_ size("" , str(default_rf)) juju/agents/ unit-microceph- 1/charm/ src/microceph. py", line 251, in set_pool_size juju/agents/ unit-microceph- 1/charm/ src/microceph. py", line 44, in _run_cmd juju/agents/ unit-microceph- 1/charm/ src/microceph. py", line 39, in _run_cmd output= True, text=True, check=True, timeout=180) python3. 10/subprocess. py", line 526, in run ror(retcode, process.args, CalledProcessEr ror: Command '['sudo', 'microceph', 'pool', 'set-rf', '--size', '1', '']' returned non-ze...
Traceback (most recent call last):
File "/var/lib/
main(
File "/var/lib/
manager.run()
File "/var/lib/
self._emit()
File "/var/lib/
_emit_
File "/var/lib/
event_
File "/var/lib/
framework.
File "/var/lib/
self.
File "/var/lib/
custom_
File "/var/lib/
self.
File "/var/lib/
self.
File "/var/lib/
framework.
File "/var/lib/
self.
File "/var/lib/
custom_
File "/var/lib/
self.
File "/var/lib/
self.
File "/var/lib/
raise e
File "/var/lib/
microceph.
File "/var/lib/
_run_cmd(cmd)
File "/var/lib/
raise e
File "/var/lib/
process = subprocess.run(cmd, capture_
File "/usr/lib/
raise CalledProcessEr
subprocess.