]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
cephadm: check if file exists when passing `--apply_spec` 56817/head
authorGuillaume Abrioux <gabrioux@ibm.com>
Wed, 10 Apr 2024 13:00:21 +0000 (15:00 +0200)
committerGuillaume Abrioux <gabrioux@ibm.com>
Wed, 10 Apr 2024 13:45:27 +0000 (15:45 +0200)
commit2ede1484925452c1ba717de0b9e8f9310c128bfb
treeee7e87b3989782ad726be158da7263adad415ed3
parent97cb38d4da1472d533a7ccc00fa88192379f5191
cephadm: check if file exists when passing `--apply_spec`

cephadm deploys the cluster, fails and does a rollback.
If the passed file doesn't exist we can make the CLI fail early instead.

```

... omitted output ...

Applying ../host-spec.yaml to cluster
FileNotFoundError: [Errno 2] No such file or directory: '../host-spec.yaml'

        ***************
        Cephadm hit an issue during cluster installation. Current cluster files will be deleted automatically.
        To disable this behaviour you can pass the --no-cleanup-on-failure flag. In case of any previous
        broken installation, users must use the following command to completely delete the broken cluster:

        > cephadm rm-cluster --force --zap-osds --fsid <fsid>

        for more information please refer to https://docs.ceph.com/en/latest/cephadm/operations/#purging-a-cluster
        ***************

Deleting cluster with fsid: 6e6a2dbe-f73a-11ee-8262-98be948800fd
Traceback (most recent call last):
  File "/usr/lib64/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib64/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/tmp/tmpive4g9gs.cephadm.build/app/__main__.py", line 5615, in <module>
  File "/tmp/tmpive4g9gs.cephadm.build/app/__main__.py", line 5603, in main
  File "/tmp/tmpive4g9gs.cephadm.build/app/__main__.py", line 2693, in _rollback
  File "/tmp/tmpive4g9gs.cephadm.build/app/__main__.py", line 445, in _default_image
  File "/tmp/tmpive4g9gs.cephadm.build/app/__main__.py", line 2958, in command_bootstrap
FileNotFoundError: [Errno 2] No such file or directory: '../host-spec.yaml'
```

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
src/cephadm/cephadm.py