ceph-salt icon indicating copy to clipboard operation
ceph-salt copied to clipboard

Better reporting of "cephadm bootstrap" failure

Open smithfarm opened this issue 4 years ago • 1 comments

Currently, when "cephadm bootstrap" fails, ceph-salt deploy reports the failure like this:

    admin: [2020-03-06 15:21:46.702005] [admin.octopus.co] [STEP ] [BEGIN] Run cephadm bootstrap
    admin: [2020-03-06 15:25:48.233319] [admin.octopus.co] Finished with failures
    admin:
    admin: Failure in minion: admin.octopus.com
    admin: __id__: run cephadm bootstrap
    admin: __run_num__: 48
    admin: __sls__: ceph-salt.cephbootstrap
    admin: changes:
    admin:   pid: 14075
    admin:   retcode: 1
    admin:   stderr: ''
    admin:   stdout: ''
    admin: comment: "Command \"CEPHADM_IMAGE=registry.opensuse.org/filesystems/ceph/octopus/images/ceph/ceph\
    admin:   \ \\\ncephadm --verbose bootstrap --mon-ip 10.20.103.200 \\--config /root/ceph.conf\
    admin:   \ \\\n        --initial-dashboard-user admin \\\n        --output-keyring /etc/ceph/ceph.client.admin.keyring\   
    admin:   \ \\\n        --output-config /etc/ceph/ceph.conf \\\n        --skip-prepare-host\
    admin:   \ \\\n        --skip-ssh > /var/log/ceph/cephadm.log 2>&1\n\" run"
    admin: duration: 241522.823
    admin: name: "CEPHADM_IMAGE=registry.opensuse.org/filesystems/ceph/octopus/images/ceph/ceph\
    admin:   \ \\\ncephadm --verbose bootstrap --mon-ip 10.20.103.200 \\--config /root/ceph.conf\
    admin:   \ \\\n        --initial-dashboard-user admin \\\n        --output-keyring /etc/ceph/ceph.client.admin.keyring\
    admin:   \ \\\n        --output-config /etc/ceph/ceph.conf \\\n        --skip-prepare-host\
    admin:   \ \\\n        --skip-ssh > /var/log/ceph/cephadm.log 2>&1\n"
    admin: result: false
    admin: start_time: '16:21:46.696049'
    admin: state: "cmd_|-run cephadm bootstrap_|-CEPHADM_IMAGE=registry.opensuse.org/filesystems/ceph/octopus/images/ceph/ceph\
    admin:   \ \\\ncephadm --verbose bootstrap --mon-ip 10.20.103.200 \\--config /root/ceph.conf\
    admin:   \ \\\n        --initial-dashboard-user admin \\\n        --output-keyring /etc/ceph/ceph.client.admin.keyring\
    admin:   \ \\\n        --output-config /etc/ceph/ceph.conf \\\n        --skip-prepare-host\
    admin:   \ \\\n        --skip-ssh > /var/log/ceph/cephadm.log 2>&1\n_|-run"
    admin: Finished execution of ceph-salt formula
    admin: Summary: Total=1 Succeeded=0 Failed=1

I see two problems with this:

first, why am I seeing the command thrice? (This was a single-node deployment, and even with multiple nodes "cephadm bootstrap" is run only once.)

second, the command is shown with lots of escaped whitespace (\ \\\n, etc.). Could the command be shown all on a single line, without newlines and without whitespace-escaping?

smithfarm avatar Mar 06 '20 15:03 smithfarm