Bug 1925620

Summary: cURL fix and add instructions for image cache
Product: OpenShift Container Platform Reporter: Brian J. Beaudoin <bbeaudoi>
Component: DocumentationAssignee: John Wilkins <jowilkin>
Status: CLOSED CURRENTRELEASE QA Contact: Xiaoli Tian <xtian>
Severity: medium Docs Contact: Tomas 'Sheldon' Radej <tradej>
Priority: low    
Version: 4.6CC: aos-bugs, augol, aygarg, jokerman
Target Milestone: ---   
Target Release: 4.6.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-08-03 15:16:08 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Brian J. Beaudoin 2021-02-05 17:27:41 UTC
Document URL: https://docs.openshift.com/container-platform/4.6/installing/installing_bare_metal_ipi/ipi-install-installation-workflow.html

Section Number and Name: ipi-install-creating-an-rhcos-images-cache_ipi-install-installation-workflow

Describe the issue: Missing documentation on how to use the cache for the installation in a disconnected environment

Suggestions for improvement: Fix the curl and add instructions

Additional information: 
Full fix for cURL and image cache instructions in my PR:
https://github.com/openshift/openshift-docs/pull/29155

There was a partial fix (just the cURL) in this PR from another contributor:
https://github.com/openshift/openshift-docs/pull/27650

Comment 1 aygarg 2021-02-08 05:21:39 UTC
Hello,

In one of my cases, the customer is facing the same issue. I am sharing the exact information that the customer shared with me.

~~~
As per the below IPI installation steps
https://docs.openshift.com/container-platform/4.6/installing/installing_bare_metal_ipi/ipi-install-installation-workflow.html

curl -L ${RHCOS_PATH}${RHCOS_QEMU_URI} -o /home/kni/rhcos_image_cache
curl -L ${RHCOS_PATH}${RHCOS_OPENSTACK_URI} -o /home/kni/rhcos_image_cache

When I try the steps below it would fail like 

[kni@provisioner ~]$ curl -L ${RHCOS_PATH}${RHCOS_QEMU_URI} -o /home/kni/rhcos_image_cache
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:--  0:00:02 --:--:--     0
100   161  100   161    0     0     25      0  0:00:06  0:00:06 --:--:--    36
  0     0    0     0    0     0      0      0 --:--:--  0:00:12 --:--:--     0Warning: Failed to create the file /home/kni/rhcos_image_cache: Is a directory
  0  847M    0  1642    0     0    128      0  80d 07h  0:00:12  80d 07h   352
curl: (23) Failed writing body (0 != 1642)
[kni@provisioner ~]$ curl -L ${RHCOS_PATH}${RHCOS_OPENSTACK_URI} -o /home/kni/rhcos_image_cache
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   161  100   161    0     0     26      0  0:00:06  0:00:06 --:--:--    41
  0  846M    0     0    0     0      0      0 --:--:--  0:00:12 --:--:--     0Warning: Failed to create the file /home/kni/rhcos_image_cache: Is a directory
  0  846M    0   618    0     0     50      0 205d 10h  0:00:12 205d 10h   154
curl: (23) Failed writing body (0 != 618)

However, when I try with a filename inside /home/kni/rhcos_image_cache, the it would succeed. Pay closer attention to the directory name and also the file 

[kni@provisioner ~]$  curl -L ${RHCOS_PATH}${RHCOS_QEMU_URI} -o /home/kni/rhcos_image_cache/rhcos_image_cache_1
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   161  100   161    0     0     26      0  0:00:06  0:00:06 --:--:--    34
100  847M  100  847M    0     0  5824k      0  0:02:28  0:02:28 --:--:-- 8492k

[kni@provisioner ~]$ curl -L ${RHCOS_PATH}${RHCOS_OPENSTACK_URI} -o /home/kni/rhcos_image_cache/rhcos_image_cache_2
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   161  100   161    0     0     26      0  0:00:06  0:00:06 --:--:--    35
100  846M  100  846M    0     0  3200k      0  0:04:30  0:04:30 --:--:-- 3843k
~~~

Comment 3 Amit Ugol 2021-07-01 15:02:34 UTC
Yes this is the correct usage for curl.