From 0093fa0b872ff6be9ee59e854cefbb3c70e3c3f7 Mon Sep 17 00:00:00 2001 From: Sara Thon Date: Fri, 5 Jun 2026 11:43:12 +0200 Subject: [PATCH 1/2] Fix spelling --- cf_remote/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cf_remote/main.py b/cf_remote/main.py index d97f016..d994777 100644 --- a/cf_remote/main.py +++ b/cf_remote/main.py @@ -504,7 +504,7 @@ def validate_command(command, args): if command in ["sudo", "run"]: if len(args.remote_command) != 1: raise CFRExitError( - "cf-remote sude/run requires exactly 1 command (use quotes)" + "cf-remote sudo/run requires exactly 1 command (use quotes)" ) args.remote_command = args.remote_command[0] From 5afb5ffa95bce525ad41a6b62fd29309b3eddc3e Mon Sep 17 00:00:00 2001 From: Sara Thon Date: Fri, 5 Jun 2026 11:45:39 +0200 Subject: [PATCH 2/2] CFE-4661: cf-remote hangs when specifying wrong names in --clients Ticket: CFE-4661 --- cf_remote/main.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/cf_remote/main.py b/cf_remote/main.py index d994777..503a580 100644 --- a/cf_remote/main.py +++ b/cf_remote/main.py @@ -613,6 +613,17 @@ def get_cloud_hosts(name, bootstrap_ips=False): return ret +def _get_cloud_group_names(): + if not os.path.exists(paths.CLOUD_STATE_FPATH): + return [] + state = read_json(paths.CLOUD_STATE_FPATH) + if not state: + return [] + for key in state: + if key.startswith("@"): + return key[1:] + + def resolve_hosts(string, single=False, bootstrap_ips=False): log.debug("resolving hosts from '{}'".format(string)) if is_file_string(string): @@ -628,6 +639,14 @@ def resolve_hosts(string, single=False, bootstrap_ips=False): ret.extend(hosts) log.debug("found in cloud, adding '{}'".format(hosts)) else: + if "." not in name and "@" not in name: + available = _get_cloud_group_names() + if available: + raise CFRUserError( + "'{}' not found in cloud state. Available groups: {}".format( + name, ", ".join(available) + ) + ) ret.append(name) if single: