diff --git a/sky/cli.py b/sky/cli.py index ca1e8a20c3e..7f30d48d2db 100644 --- a/sky/cli.py +++ b/sky/cli.py @@ -1691,6 +1691,10 @@ def status(all: bool, refresh: bool, ip: bool, show_spot_jobs: bool, If CLUSTERS is given, show those clusters. Otherwise, show all clusters. + If --ip is specified, show the IP address of the head node of the cluster. + Only available when CLUSTERS contains exactly one cluster, e.g. + ``sky status --ip mycluster``. + The following fields for each cluster are recorded: cluster name, time since last launch, resources, region, zone, hourly price, status, autostop, command. @@ -1751,6 +1755,10 @@ def status(all: bool, refresh: bool, ip: bool, show_spot_jobs: bool, limit_num_jobs_to_show=not all, is_called_by_user=False)) if ip: + if refresh: + raise click.UsageError( + 'Using --ip with --refresh is not supported for now. ' + 'To fix, refresh first, then query the IP.') if len(clusters) != 1: with ux_utils.print_exception_no_traceback(): plural = 's' if len(clusters) > 1 else ''