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

TASK [ceph-osd : wait for all osd to be up] #5400

Closed
ds2d opened this issue May 28, 2020 · 4 comments
Closed

TASK [ceph-osd : wait for all osd to be up] #5400

ds2d opened this issue May 28, 2020 · 4 comments

Comments

@ds2d
Copy link

ds2d commented May 28, 2020

Ubuntu 18.04.3
ceph_stable_release:nautilus

  • master

fatal: [node3]: FAILED! =>
msg: 'The conditional check ''(wait_for_all_osds_up.stdout | from_json)["osdmap"]["num_osds"] | int > 0'' failed. The error was: error while evaluating conditional ((wait_for_all_osds_up.stdout | from_json)["osdmap"]["num_osds"] | int > 0): ''dict object'' has no attribute ''num_osds'''

@dsavineau
Copy link
Contributor

Please use the right ceph-ansible version for deploying Ceph Nautilus.

You're currently using the master branch which isn't compatible with nautilus.
You should use the stable-4.0 branch.

https://docs.ceph.com/ceph-ansible/master/#releases

@mafonso
Copy link

mafonso commented Jun 4, 2020

I saw this with ceph version 15.2.1 (9fd2f65f91d9246fae2c841a6222d34d121680ee) octopus (stable) and the stable-5.0 branch.

The issue seems to be that osdmap is nested into another osdmap

ceph -s -f json | jq '.osdmap'
{
  "osdmap": {
    "epoch": 411,
    "num_osds": 4,
    "num_up_osds": 4,
    "num_in_osds": 4,
    "num_remapped_pgs": 0
  }
}

so I patched it with

-    - (wait_for_all_osds_up.stdout | from_json)["osdmap"]["num_osds"] | int > 0
-    - (wait_for_all_osds_up.stdout | from_json)["osdmap"]["num_osds"] == (wait_for_all_osds_up.stdout | from_json)["osdmap"]["num_up_osds"]
+    - (wait_for_all_osds_up.stdout | from_json)["osdmap"]["osdmap"]["num_osds"] | int > 0
+    - (wait_for_all_osds_up.stdout | from_json)["osdmap"]["osdmap"]["num_osds"] == (wait_for_all_osds_up.stdout | from_json)["osdmap"]["osdmap"]["num_up_osds"]

@dsavineau
Copy link
Contributor

dsavineau commented Jun 4, 2020

I saw this with ceph version 15.2.1 (9fd2f65f91d9246fae2c841a6222d34d121680ee) octopus (stable) and the stable-5.0 branch.

That could not be true.

The double nested osdmap is present only until nautilus (included). The change in ceph has been introduced in octopus and available since 15.1.0 [1]. This has been adapted in ceph-ansible via [2] and only present in stable-5.0 and master branches.

So if you see this with stable-5.0 branch then that mean you're not using octopus.

[1] ceph/ceph@f222c7b
[2] a5e359e

@mafonso
Copy link

mafonso commented Jun 7, 2020

So if you see this with stable-5.0 branch then that mean you're not using octopus.

And I wasn't :)
I was using an octopus ceph client, but against a server that had not been upgraded yet.
All was as it supposed to be.

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

No branches or pull requests

3 participants