From 60c891d48ed54f0789e2b55c776343b7738fd184 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 8 Nov 2019 07:10:53 -0600 Subject: [PATCH] ceph-daemon: add --skip-pull It occurs to me there might be cases where the user *doesn't* want to pull the latest image (e.g., because it is a partially disconnected enviroment, and they know the image is already in the local registry). Signed-off-by: Sage Weil --- src/ceph-daemon | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/ceph-daemon b/src/ceph-daemon index 15033700482a..a7bf2e2fde67 100755 --- a/src/ceph-daemon +++ b/src/ceph-daemon @@ -842,8 +842,9 @@ def command_bootstrap(): if ret: raise RuntimeError('Failed to ping %s' % mon_ip) - logger.info('Pulling latest %s container...' % args.image) - call_throws([podman_path, 'pull', args.image]) + if not args.skip_pull: + logger.info('Pulling latest %s container...' % args.image) + call_throws([podman_path, 'pull', args.image]) logger.info('Extracting ceph user uid/gid from container image...') (uid, gid) = extract_uid_gid() @@ -1719,6 +1720,10 @@ def _get_parser(): '--skip-ping-check', action='store_true', help='do not verify that mon IP is pingable') + parser_bootstrap.add_argument( + '--skip-pull', + action='store_true', + help='do not pull the latest image before bootstrapping') parser_deploy = subparsers.add_parser( 'deploy', help='deploy a daemon') -- 2.47.3