Skip to content

Commit

Permalink
Increase sleep time for oc extract
Browse files Browse the repository at this point in the history
Signed-off-by: Shylesh Kumar Mohan <[email protected]>
  • Loading branch information
shylesh committed May 22, 2024
1 parent 3e2290a commit 333dab1
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions ocs_ci/deployment/acm.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import shutil
import requests
import time
import subprocess

import semantic_version
import platform
Expand Down Expand Up @@ -190,19 +191,23 @@ def download_downstream_binary(self):
f'--path="/dist/subctl-{version_str}*-linux-{binary_pltfrm}.tar.xz":/tmp --confirm'
)
run_cmd(cmd)
# Wait till image extract happens and subctl dir appears
time.sleep(30)
decompress = (
f"tar -C /tmp/ -xf /tmp/subctl-{version_str}*-linux-{binary_pltfrm}.tar.xz"
)
run_cmd(decompress)
p = subprocess.run(decompress, stdout=subprocess.PIPE, shell=True)
if p.returncode:
logger.error("Failed to untar subctl")
raise CommandFailed
else:
logger.info(p.stdout)
target_dir = os.path.expanduser("./bin")
install_cmd = (
f"install -m744 /tmp/subctl-{version_str}*/subctl-{version_str}*-linux-{binary_pltfrm} "
f"{target_dir} "
)
run_cmd(install_cmd, shell=True)
run_cmd(f"mv {target_dir}/subctl-* {target_dir}/subctl", shell=True)
os.environ["PATH"] = os.environ["PATH"] + ":" + os.path.abspath(f"{target_dir}")

def submariner_configure_upstream(self):
"""
Expand Down

0 comments on commit 333dab1

Please sign in to comment.