Bug #55555
closedcephadm: bootstrap with --skip-admin-label causes KeyError traceback for --apply-spec
0%
Description
When --skip-admin-label
is passed to cephadm
together with --apply-spec cluster.yaml
there is a traceback:
cephadm --image 'https://registry.example.com/ceph' bootstrap --config ceph.conf --ssh-private-key /root/cephadm-key --ssh-public-key /root/cephadm-key.pub --allow-fqdn-hostname --registry-url https://registry.example.com --registry-username cephadm --registry-password password --cluster-network 192.0.2.0/24 --initial-dashboard-user ceph --initial-dashboard-password ceph --mon-ip 10.0.0.101 --apply-spec cluster.yaml --skip-firewalld --dashboard-password-noupdate --dashboard-key cert.key --dashboard-crt cert.crt --skip-ssh --skip-admin-label [...] Applying cluster.yaml to cluster Traceback (most recent call last): File "/usr/sbin/cephadm", line 8634, in <module> main() File "/usr/sbin/cephadm", line 8622, in main r = ctx.func(ctx) File "/usr/sbin/cephadm", line 1938, in _default_image return func(ctx) File "/usr/sbin/cephadm", line 5137, in command_bootstrap for spec in parse_yaml_objs(f): File "/usr/sbin/cephadm", line 4920, in parse_yaml_objs objs.append(_parse_yaml_obj(d)) File "/usr/sbin/cephadm", line 4907, in _parse_yaml_obj obj[current_key] += line.strip() KeyError: ''
SSH keys and firewall are managed separately. Cephadm is from https://raw.githubusercontent.com/ceph/ceph/quincy/src/cephadm/cephadm
The spec file has been linted without errors and such an error is not seen without --skip-admin-label
. The --skip-admin-label
switch is being tried because without it cephadm
errors at trying to add admin
label to "nonexisting" host which could be a subject for another story....
Files
Updated by Voja Molani almost 2 years ago
Seems editing the issue is impossible. After adding debugging prints to cephadm
, it seems the issue is not related to --skip-admin-label
- it chokes parsing the SSL certificate.
Additionally the private key may be in wrong format in the attached cluster.yaml
but the error persists even when the certificate is moved after the public key and changed to format:
-----BEGIN PRIVATE KEY----- -----END PRIVATE KEY-----
Updated by Voja Molani almost 2 years ago
It seems like cephadm
is not ready for bootstrapping ingress at all: if I understand correctly any line containing ---
somewhere on it is considered a change of doc:
if '---' in line:
This should probably instead check if the line is exactly ---
.
But after doing that change the cluster.yaml
still does not apply:
Unable to parse cluster.yaml succesfully
Updated by Redouane Kachach Elhichou almost 2 years ago
- Status changed from New to In Progress
- Assignee set to Redouane Kachach Elhichou
Updated by Redouane Kachach Elhichou almost 2 years ago
- Status changed from In Progress to Fix Under Review
- Pull request ID set to 46207
Updated by Redouane Kachach Elhichou almost 2 years ago
- Status changed from Fix Under Review to Resolved
Updated by Redouane Kachach Elhichou almost 2 years ago
- Status changed from Resolved to Pending Backport
Updated by Redouane Kachach Elhichou almost 2 years ago
- Backport set to quincy,pacific
Updated by Redouane Kachach Elhichou almost 2 years ago
- Status changed from Pending Backport to Resolved