Skip to content

Commit 9958bec

Browse files
authored
Merge branch 'master' into pr-osparc-remove-zero-pull-rate
2 parents dce4252 + e1354ea commit 9958bec

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

scripts/maintenance/computational-clusters/autoscaled_monitor/cli.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
DEFAULT_COMPUTATIONAL_EC2_FORMAT_WORKERS,
1414
DEFAULT_DYNAMIC_EC2_FORMAT,
1515
DEPLOY_SSH_KEY_PARSER,
16+
UNIFIED_SSH_KEY_PARSE,
1617
wallet_id_spec,
1718
)
1819
from .ec2 import autoscaling_ec2_client, cluster_keeper_ec2_client
@@ -78,16 +79,12 @@ def main(
7879

7980
# locate ssh key path
8081
for file_path in deploy_config.glob("**/*.pem"):
81-
if any(_ in file_path.name for _ in ["license", "pkcs8"]):
82-
continue
83-
# very bad HACK where the license file contain openssh in the name
84-
if (
85-
any(_ in f"{file_path}" for _ in ("sim4life.io", "osparc-master"))
86-
and "openssh" not in f"{file_path}"
87-
):
82+
if any(_ in file_path.name for _ in ["license", "pkcs8", "dask"]):
8883
continue
8984

90-
if DEPLOY_SSH_KEY_PARSER.parse(f"{file_path.name}") is not None:
85+
if DEPLOY_SSH_KEY_PARSER.parse(
86+
f"{file_path.name}"
87+
) is not None or UNIFIED_SSH_KEY_PARSE.parse(f"{file_path.name}"):
9188
rich.print(
9289
f"will be using following ssh_key_path: {file_path}. "
9390
"TIP: if wrong adapt the code or manually remove some of them."

scripts/maintenance/computational-clusters/autoscaled_monitor/constants.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ def wallet_id_spec(text) -> None | int:
2222
DEPLOY_SSH_KEY_PARSER: Final[parse.Parser] = parse.compile(
2323
r"{prefix}-{random_name}.pem"
2424
)
25+
UNIFIED_SSH_KEY_PARSE: Final[parse.Parser] = parse.compile("sshkey.pem")
2526

2627
MINUTE: Final[int] = 60
2728
HOUR: Final[int] = 60 * MINUTE

0 commit comments

Comments
 (0)