-
Notifications
You must be signed in to change notification settings - Fork 166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Download subctl downstream if not present #9657
Download subctl downstream if not present #9657
Conversation
Signed-off-by: Shylesh Kumar Mohan <[email protected]>
ocs_ci/deployment/acm.py
Outdated
subctl_ver = config.ENV_DATA["subctl_version"] | ||
cmd = ( | ||
f"oc image {constants.SUBCTL_DOWNSTREAM_URL}{subctl_ver} " | ||
f'--path="/dist/{subctl_ver}*-linux-amd64.tar.xz":/tmp --confirm' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should get this amd64 dynamically based on currently running platform. As we can run ocs-ci on Apple Silicone chips like M1 - M2 ... we should consider to support also this arm64 binairies.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for now just added the conditional statement for x86_64 processor, I think we need a list of all supported ocs-ci platform names, ofcourse we need to check platforms for which binaries are available.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM, just one possible typo.
ocs_ci/deployment/acm.py
Outdated
f'--path="/dist/{subctl_ver}*-linux-amd64.tar.xz":/tmp --confirm' | ||
) | ||
run_cmd(cmd) | ||
decompress = f"tar -C /tmp/ -xf /tmp/{subctl_ver}*--linux-amd64.tar.xz" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The two dashes (--linux
) are there intentionally?
decompress = f"tar -C /tmp/ -xf /tmp/{subctl_ver}*--linux-amd64.tar.xz" | |
decompress = f"tar -C /tmp/ -xf /tmp/{subctl_ver}*-linux-amd64.tar.xz" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dahorak , ya typo while copy pasting
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Signed-off-by: Shylesh Kumar Mohan <[email protected]>
@@ -1,2 +1,3 @@ | |||
ENV_DATA: | |||
submariner_source: "downstream" | |||
subctl_version: "subctl-rhel8:v0.16" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Latest version is 0.17 and it should be subctl-rhel9
for 0.17
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as we are still running on CentOS stream 8 , this might cause the compatibility issues to run on RHEL 8 based system as we recently saw with glibc issue.
We are going to move in matter of weeks to CentOS stream9 , but cannot say when exactly.
It can run without an issue, but might not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tried this on centos stream rlease 9 and its working
ocs_ci/deployment/acm.py
Outdated
if processor == "x86_64": | ||
binary_pltfrm = "amd64" | ||
cmd = ( | ||
f"oc image {constants.SUBCTL_DOWNSTREAM_URL}{subctl_ver} " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing extract option in the cmd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will need to use:
--filter-by-os
With value
linux/arm64 - Apple M chips
linux/amd64 - regular x86_64
Some example from local testing:
$ oc image extract --filter-by-os linux/arm64 --registry-config ./path-to/pull-secret-ocs-ci registry.redhat.io/rhacm2/subctl-rhel8:v0.14 --confirm --path "/dist/subctl-v0.14*-linux-*.tar.xz":./
$ ls -l
total 43752
-rw-r-----@ 1 pbalogh staff 11M Nov 16 00:32 subctl-v0.14.7-linux-amd64.tar.xz
-rw-r-----@ 1 pbalogh staff 9.9M Nov 16 00:31 subctl-v0.14.7-linux-arm64.tar.xz
The previous file was subctl-v0.14.7-linux-amd64.tar.xz
was actually downloaded before when I tried without specifying the --filter-by-os linux/arm64
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Signed-off-by: Shylesh Kumar Mohan <[email protected]>
@shylesh @sidhant-agrawal can you pls verify this PR so we can merge the changes? |
cbd3eb4
Signed-off-by: Shylesh Kumar Mohan <[email protected]>
cbd3eb4
to
755e05a
Compare
Signed-off-by: Shylesh Kumar Mohan <[email protected]>
@shylesh - is this verified please? |
03:24:16 - MainThread - ocs_ci.utility.utils - INFO - C[amagrawa-pr-hub] - Executing command: ./bin/subctl |
done |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: am-agrawa, petr-balogh, shylesh, sidhant-agrawal The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
* Download subctl downstream if not present * Address review comments * Address review comments: Update subctl version for rhel9 * Fix subctl download issue * fix /bin/subctl path issues --------- Signed-off-by: Shylesh Kumar Mohan <[email protected]>
* Download subctl downstream if not present * Address review comments * Address review comments: Update subctl version for rhel9 * Fix subctl download issue * fix /bin/subctl path issues --------- Signed-off-by: Shylesh Kumar Mohan <[email protected]>
* Download subctl downstream if not present * Address review comments * Address review comments: Update subctl version for rhel9 * Fix subctl download issue * fix /bin/subctl path issues --------- Signed-off-by: Shylesh Kumar Mohan <[email protected]>
No description provided.