Page MenuHomePhabricator

Ceph cookbook fails waiting for OSDs to show up
Closed, ResolvedPublic

Description

A new check for OSDs to be present in the OSD tree was added in this patch but it's not working correctly:

Exception raised while executing cookbook wmcs.ceph.osd.bootstrap_and_add:
Traceback (most recent call last):
  File "/Users/fran/.virtualenvs/cookbooks/lib/python3.10/site-packages/spicerack/_menu.py", line 234, in run
    raw_ret = runner.run()
  File "/Users/fran/wmf/cookbooks/cookbooks/wmcs/ceph/osd/bootstrap_and_add.py", line 210, in run
    new_osds = _wait_for_osds_to_show_up(
  File "/Users/fran/wmf/cookbooks/cookbooks/wmcs/ceph/osd/bootstrap_and_add.py", line 117, in _wait_for_osds_to_show_up
    raise Exception(f"Unable to find the new OSD node ({ceph_hostname}) in the osd tree")
Exception: Unable to find the new OSD node (cloudcephosd1030) in the osd tree
END (FAIL) - Cookbook wmcs.ceph.osd.bootstrap_and_add (exit_code=99)

Event Timeline

fnegri changed the task status from Open to In Progress.Sep 27 2022, 3:26 PM
fnegri triaged this task as Medium priority.
fnegri created this task.
fnegri moved this task from Inbox to Doing on the cloud-services-team (Kanban) board.

Change 835643 had a related patch set uploaded (by FNegri; author: FNegri):

[operations/cookbooks@wmcs] ceph.bootstrap_and_add: fix _wait_for_osds

https://gerrit.wikimedia.org/r/835643

Change 835643 merged by jenkins-bot:

[operations/cookbooks@wmcs] ceph.bootstrap_and_add: fix _wait_for_osds

https://gerrit.wikimedia.org/r/835643

This is still not working correctly, because I forgot to fix the value that is returned by the method _wait_for_osds_to_show_up. New error is:

Exception raised while executing cookbook wmcs.ceph.osd.bootstrap_and_add:
Traceback (most recent call last):
  File "/Users/fran/.virtualenvs/cookbooks/lib/python3.10/site-packages/spicerack/_menu.py", line 234, in run
    raw_ret = runner.run()
  File "/Users/fran/wmf/cookbooks/cookbooks/wmcs/ceph/osd/bootstrap_and_add.py", line 205, in run
    new_osds = _wait_for_osds_to_show_up(
  File "/Users/fran/wmf/cookbooks/cookbooks/wmcs/ceph/osd/bootstrap_and_add.py", line 120, in _wait_for_osds_to_show_up
    return osd_tree["children"][ceph_hostname]["children"]
KeyError: 'children'

Putting up a new patch to fix this.

Change 837112 had a related patch set uploaded (by FNegri; author: FNegri):

[operations/cookbooks@wmcs] ceph.bootstrap_and_add: fix _wait_for_osds (take 2)

https://gerrit.wikimedia.org/r/837112

fnegri removed a project: Patch-For-Review.

Change 837112 merged by jenkins-bot:

[operations/cookbooks@wmcs] ceph.bootstrap_and_add: fix _wait_for_osds (take 2)

https://gerrit.wikimedia.org/r/837112