def command_bootstrap(ctx):
# type: (CephadmContext) -> int
+ ctx.error_code = 0
+
if not ctx.output_config:
ctx.output_config = os.path.join(ctx.output_dir, CEPH_CONF)
if not ctx.output_keyring:
out = cli(['orch', 'apply', '-i', '/tmp/spec.yml'], extra_mounts=mounts)
logger.info(out)
except Exception:
+ ctx.error_code = -errno.EINVAL
logger.info('\nApplying %s to cluster failed!\n' % ctx.apply_spec)
save_cluster_config(ctx, uid, gid, fsid)
'For more information see:\n\n'
'\thttps://docs.ceph.com/docs/master/mgr/telemetry/\n')
logger.info('Bootstrap complete.')
- return 0
+ return ctx.error_code
##################################