Bug 1999835 - ConsoleCLIDownload | wrong path in virtctl archive URL
Summary: ConsoleCLIDownload | wrong path in virtctl archive URL
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: Installation
Version: 4.9.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 4.9.0
Assignee: Erkan Erol
QA Contact: ibesso
URL:
Whiteboard:
: 1999112 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-08-31 19:04 UTC by ibesso
Modified: 2021-11-02 16:01 UTC (History)
4 users (show)

Fixed In Version: hco-bundle-registry-container-v4.9.0-192
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-11-02 16:00:55 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github kubevirt hyperconverged-cluster-operator pull 1519 0 None None None 2021-09-09 06:57:15 UTC
Github kubevirt hyperconverged-cluster-operator pull 1520 0 None None None 2021-09-09 06:57:15 UTC
Red Hat Product Errata RHSA-2021:4104 0 None None None 2021-11-02 16:01:03 UTC

Description ibesso 2021-08-31 19:04:55 UTC
Description of problem:
----------------------
When trying to download virtctl following one of the URLs in ConsoleCLIDownload virtctl-clidownloads-kubevirt-hyperconverged yaml, I get 404 NOT FOUND.


Version-Release number of selected component (if applicable):
------------------------------------------------------------
HCO: 4.9.0-155


How reproducible:
----------------
100%


Steps to Reproduce:
------------------
1. oc get ConsoleCLIDownload virtctl-clidownloads-kubevirt-hyperconverged -ojson |jq '.spec.links'
2. Try to download one of the links.


Actual results:
--------------
HTTP 404 Not Found.


Expected results:
----------------
The archive file should be downloaded successfully.


Additional info:
---------------
Adding "/achives" to the URL path before /amd64 will make the URL valid and the archive file will be downloaded successfully.

Comment 1 Erkan Erol 2021-08-31 19:20:05 UTC
I found the root cause of the bug. It is because of a wrong "COPY" command in the dockerfile of virt-artifacts-server image. A fix will be provided soon. 
.

Comment 4 Simone Tiraboschi 2021-09-02 09:38:07 UTC
*** Bug 1999112 has been marked as a duplicate of this bug. ***

Comment 6 Denis Ollier 2021-09-04 13:41:56 UTC
Hi Erkan,

I think the .gz suffix should be added to the tarball name since it is compressed (i.e: virtctl.tar.gz):

> curl -ksSL https://hyperconverged-cluster-cli-download-openshift-cnv.apps.${cluster_name}.${cluster_domain}/amd64/linux/virtctl.tar \
>   | tar -xf -
> 
> tar: Archive is compressed. Use -z option
> tar: Error is not recoverable: exiting now
> curl: (23) Fail2021-09-04T13:34:58.840396069Z ed writing body (1268 != 12582)

Regards,

Denis

Comment 7 Erkan Erol 2021-09-06 06:59:35 UTC
Hi Denis,

Thanks for reporting this issue. You are right. We should either add ".gz" into the file name or remove "-z" option while creating the tar file.  See https://github.com/kubevirt/hyperconverged-cluster-operator/blob/main/build/Dockerfile.artifacts#L16

I checked how OCP does it. It doesn't compress the file and the file name is "oc.tar"

On the other hand, we gain significant amount of storage when compressing it. 

-rw-rw-r--.  1 eerol eerol  49M Sep  1 17:11 virtctl
-rw-rw-r--.  1 eerol eerol  49M Sep  6 09:53 virtctl.tar
-rw-rw-r--.  1 eerol eerol  19M Sep  6 09:52 virtctl.tar.gz


@stirabos I think we should go with compressed file by adding ".gz" suffix. What do you think?

Comment 8 Simone Tiraboschi 2021-09-07 12:15:10 UTC
(In reply to Erkan Erol from comment #7)
> @stirabos I think we should go with compressed file by adding
> ".gz" suffix. What do you think?

+1

Comment 11 ibesso 2021-09-30 09:30:19 UTC
Verified with the latest 4.9.0 build.
The automation tests passed and all links are downloadable.

Comment 14 errata-xmlrpc 2021-11-02 16:00:55 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: OpenShift Virtualization 4.9.0 Images security and bug fix update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2021:4104


Note You need to log in before you can comment on or make changes to this bug.