Project

General

Profile

Actions

Bug #55555

closed

cephadm: bootstrap with --skip-admin-label causes KeyError traceback for --apply-spec

Added by Voja Molani about 2 years ago. Updated almost 2 years ago.

Status:
Resolved
Priority:
Normal
Category:
cephadm
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
quincy,pacific
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

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

cluster.yaml (1.75 KB) cluster.yaml Voja Molani, 05/05/2022 11:51 AM
Actions

Also available in: Atom PDF