Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion automation_library/checks/functions/repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ def download_omnia_sh() -> Dict:
}

# Try tag URL
rc, _, _ = run_command(["curl", "-f", "-o", f"{clone_path}/omnia.sh", tag_url], timeout=60)
rc, _, _ = run_command(["curl", "-f", "-o", f"{clone_path}/omnia.sh", tag_url], timeout=300)
if rc == 0:
_log(f"omnia.sh downloaded from tag: {omnia_branch}", "OK")
return {
Expand Down
12 changes: 9 additions & 3 deletions automation_library/provision/functions/ldap_func.py
Original file line number Diff line number Diff line change
Expand Up @@ -495,8 +495,10 @@ def _verify_ldap_user_login(host, run_func) -> Dict[str, Any]:

user_result = {"user": ldap_user, "success": False, "message": ""}

# Properly escape password for shell - use double quotes and escape special chars
escaped_password = ldap_password.replace('\\', '\\\\').replace('"', '\\"').replace('$', '\\$').replace('`', '\\`')
ssh_cmd = (
f"sshpass -p '{ldap_password}' ssh -o StrictHostKeyChecking=no "
f'sshpass -p "{escaped_password}" ssh -o StrictHostKeyChecking=no '
f"-o UserKnownHostsFile=/dev/null -o ConnectTimeout=10 "
f"{ldap_user}@{admin_ip} 'echo LOGIN_SUCCESS' 2>&1"
)
Expand Down Expand Up @@ -600,8 +602,10 @@ def verify_pam_slurm_adopt(host) -> Dict[str, Any]:
}

# SSH login using sshpass - should be blocked by PAM
# Properly escape password for shell - use double quotes and escape special chars
escaped_password = ldap_password.replace('\\', '\\\\').replace('"', '\\"').replace('$', '\\$').replace('`', '\\`')
ssh_cmd = (
f"sshpass -p '{ldap_password}' ssh -o StrictHostKeyChecking=no "
f'sshpass -p "{escaped_password}" ssh -o StrictHostKeyChecking=no '
f"-o UserKnownHostsFile=/dev/null -o ConnectTimeout=10 "
f"{ldap_user}@{admin_ip} 'echo LOGIN_SUCCESS' 2>&1"
)
Expand Down Expand Up @@ -864,8 +868,10 @@ def verify_pam_slurm_adopt_session_termination(host) -> Dict[str, Any]:
details_lines.append(f" ✓ Job {job_id}: RUNNING on {actual_compute_hostname} (IP: {actual_compute_ip})")

# Login to the actual compute node as ldapuser during active job
# Properly escape password for shell - use double quotes and escape special chars
escaped_password = ldap_password.replace('\\', '\\\\').replace('"', '\\"').replace('$', '\\$').replace('`', '\\`')
login_cmd = (
f"sshpass -p '{ldap_password}' ssh {SSH_OPTS} "
f'sshpass -p "{escaped_password}" ssh {SSH_OPTS} '
f"{ldap_user}@{actual_compute_ip} 'echo LOGIN_SUCCESS' 2>&1"
)
cmd = run_on_oim(host, login_cmd)
Expand Down
Loading