Bug 1689796 - "oreg_url" does not work on disconnected installation using Satellite
Summary: "oreg_url" does not work on disconnected installation using Satellite
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 3.11.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 3.11.z
Assignee: Joseph Callen
QA Contact: Johnny Liu
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-03-18 07:05 UTC by Daein Park
Modified: 2019-06-26 09:08 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: Satellite image url pattern is different with a usual docker registry. Consequence: The etcd image can not pull, when you install using Satellite registy. Fix: Added guidance and example to specify etcd image url using "osm_etcd_image" in the associated documentation. Result: You can specify correctly etcd image url of Satellite registry using "osm_etcd_image".
Clone Of:
Environment:
Last Closed: 2019-06-26 09:07:55 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:1605 0 None None None 2019-06-26 09:08:04 UTC

Internal Links: 1689848

Description Daein Park 2019-03-18 07:05:49 UTC
Description of problem:

When you work disconnected install,

"oreg_url" does not work if the "oreg_url" format as "hostname/imagename".

Because "<hostname>/<subpath>/<imagename>" format is forced by "(len(oreg_parts) >= 3" in "lib_utils_oo_oreg_image" filter[0].

BUT, Satellite usually uses "hostname/imagename" url for container registry, as following manner.
It's required on the disconnected installation using Satellite.

  <HOSTNAME>/<ORGANIZATION>-<PRODUCT>-<REPOSITORY>
  
  For instance, if "registry.redhat.com/rhel7/etcd" image publish on the Satellite (register to Satellite as "rhel7/etcd" ),
  then the URL will be changed to "satellite.example.com/<ORGANIZATION>-<PRODUCT>-rhel7_etcd" format, and "/" is replaced with "_" on the Satellite.

Refer [1] and [2], OpenShift articles are written as prerequisite of availability "<hostname>/<imagename>" registry url on the Satellite.


[0] [ https://github.com/openshift/openshift-ansible/blob/release-3.11/roles/lib_utils/filter_plugins/oo_filters.py#L658-L663 ]
  ~~~
  oreg_parts = oreg_url.rsplit('/', 2)
  if len(oreg_parts) < 2:
      raise errors.AnsibleFilterError("oreg_url malformed: {}".format(oreg_url))
  if not (len(oreg_parts) >= 3 and '.' in oreg_parts[0]):
      # oreg_url does not include host information; we'll just return etcd default
  return image_default
  ~~~

[1] Preparing Satellite 6 for a disconnected installation 
    [https://blog.openshift.com/using-satellite-6-server-disconnect-openshift-container-platform-install/]
  ~~~
  Next, the script will supply the appropriate installation vars to insert into the OCP install playbooks:

    oreg_url: sat6.e2e.bos.redhat.com:5000/default_organization-ocp36-openshift3_ose-${component}:${version}
  ~~~
    
[2]  [https://bugzilla.redhat.com/show_bug.cgi?id=1506267#c2]
  ~~~
  As your output is saying that images like "sat6.e2e.bos.redhat.com:5000/default_organization-ocp3_disconnected-openshift3_deployer:v3.6.173.0.21" are missing I would guess that your oreg_url is including the registry, something like:
  oreg_url=sat6.e2e.bos.redhat.com:5000/default_organization-ocp3_disconnected-openshift3_${component}:${version}
  ~~~


Version-Release number of the following components:
rpm -q openshift-ansible
openshift-ansible-3.11.82-3.git.0.9718d0a.el7.noarch

rpm -q ansible
ansible-2.6.14-1.el7ae.noarch

ansible --version
ansible 2.6.14
  config file = /usr/share/ansible/openshift-ansible/ansible.cfg
  configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.5 (default, Sep 12 2018, 05:31:16) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)]


How reproducible:
Always, when you configure oreg_url=<hostname>/<imagename> using Satellite.


Steps to Reproduce:
1.
2.
3.

Actual results:
Some component(etcd) that used "lib_utils_oo_oreg_image" filter for oreg_url for replacement, the component is failed to pull image from "oreg_url".

Expected results:
All the image path is replaced correctly with "oreg_url" you specified on the system using Satellite.

Additional info:

Comment 2 Manabu Ori 2019-03-18 07:36:32 UTC
Hi Daein,

Thank you for raising this bz.
As for '"/" is replaced with "_" on the Satellite.' part, my colleague of Satellite expert finds the replacement seems to occur in [3].

[3] https://github.com/Katello/bastion/blob/master/app/assets/javascripts/bastion/utils/form-utils.service.js

Comment 3 Daein Park 2019-03-18 13:33:21 UTC
Hi, 

We recommend Satellite as image registry when OCP deploy as disconnected installation as follows.
So we should provide concrete solutions for a customer who is using Satellite, such as ansible playbooks that is supported for Satellite env.
v3.11 will be supported more longer than other 3.x versions, it's important either.

* Disconnected installation - Prerequisites
  [ https://docs.openshift.com/container-platform/3.11/install/disconnected_install.html#disconnected-prerequisites ]
  ~~~
    Using a Red Hat Satellite 6.1 server that acts as a container image registry.
  ~~~

Comment 5 Joseph Callen 2019-03-22 13:11:46 UTC
Merged https://github.com/openshift/openshift-ansible/pull/11363

Comment 7 Daein Park 2019-03-25 00:40:45 UTC
Hi @Joseph,

Thank you for working on this BZ. 
Additionally Could you tell us if you can work to fix these BZ within CU's deadline ?

Comment 18 Johnny Liu 2019-04-08 03:04:28 UTC
Per comment 15, 16, and 17, move this bug to VERIFIED.

Comment 19 Kathryn Alexander 2019-04-08 14:22:58 UTC
The docs change is live on docs.openshift: https://docs.openshift.com/container-platform/3.11/install/disconnected_install.html#disconnected-installing-openshift

Comment 21 errata-xmlrpc 2019-06-26 09:07: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, 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/RHBA-2019:1605


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