if image comes from a authenticated registry and login has not been done yet the traceback should be hidden and only show the error message
Signed-off-by: Daniel Pivonka <dpivonka@redhat.com>
(cherry picked from commit
4c1c656d009230894674d33efed9c31b2bc2581d)
@infer_image
def command_version(ctx):
# type: (CephadmContext) -> int
- out = CephContainer(ctx, ctx.image, 'ceph', ['--version']).run()
- print(out.strip())
- return 0
+ c = CephContainer(ctx, ctx.image, 'ceph', ['--version'])
+ out, err, ret = call(ctx, c.run_cmd(), desc=c.entrypoint)
+ if not ret:
+ print(out.strip())
+ return ret
##################################