Bug 1336202 - RPM upgrades to 3.2 fails when in a non-Internet connected environment
Summary: RPM upgrades to 3.2 fails when in a non-Internet connected environment
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Cluster Version Operator
Version: 3.2.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Scott Dodson
QA Contact: Anping Li
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-05-15 15:08 UTC by Johan Swensson
Modified: 2016-06-13 07:51 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Non containerized upgrades from OSE 3.1 to 3.2 incorrectly attempted to pull the `openshift3/ose:latest` image. This step is only required for containerized installations and has been removed from RPM based installations eliminating the need to pull an unexpected image.
Clone Of:
Environment:
Last Closed: 2016-06-07 10:56:15 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1208 0 normal SHIPPED_LIVE Red Hat OpenShift Enterprise atomic-openshift-utils bug fix update 2016-06-07 14:55:01 UTC

Description Johan Swensson 2016-05-15 15:08:44 UTC
Description of problem:
I have configured to pull images from Satellite. 
This is a common customer scenario. It could be any internal registry.

Version-Release number of selected component (if applicable):
atomic-openshift-utils-3.0.88-1.git.0.31c3daf.el7.noarch

How reproducible:
Every time.

Steps to Reproduce:
1. Install 3.1, make sure you have the following set:
#Consume images from Satellite
oreg_url=satellite.lab.example.com:5000/lab-ose_docker_images-openshift3_ose-${component}:${version}

cli_docker_additional_registries=satellite.lab.example.com:5000
cli_docker_blocked_registries=registry.access.redhat.com,docker.io


2. Before upgrading, the cli_ variables have been renamed
Add the following before upgrade:
openshift_docker_additional_registries=satellite.lab.example.com:5000
openshift_docker_blocked_registries=registry.access.redhat.com,docker.io


3.

Actual results:

TASK: [Pull Images] *********************************************************** 
failed: [master1.lab.example.com] => (item=openshift3/ose) => {"changed": true, "cmd": ["docker", "pull", "openshift3/ose:latest"], "delta": "0:00:00.169635", "end": "2016-05-15 16:57:12.151228", "item": "openshift3/ose", "rc": 1, "start": "2016-05-15 16:57:11.981593", "warnings": []}
stderr: Error: image openshift3/ose:latest not found
stdout: Trying to pull repository satellite.lab.kupo.se:5000/openshift3/ose ... not found
failed: [master2.lab.example.com] => (item=openshift3/ose) => {"changed": true, "cmd": ["docker", "pull", "openshift3/ose:latest"], "delta": "0:00:00.227302", "end": "2016-05-15 16:57:12.235343", "item": "openshift3/ose", "rc": 1, "start": "2016-05-15 16:57:12.008041", "warnings": []}
stderr: Error: image openshift3/ose:latest not found
stdout: Trying to pull repository satellite.lab.kupo.se:5000/openshift3/ose ... not found
failed: [master3.lab.example.com] => (item=openshift3/ose) => {"changed": true, "cmd": ["docker", "pull", "openshift3/ose:latest"], "delta": "0:00:00.311991", "end": "2016-05-15 16:57:12.253718", "item": "openshift3/ose", "rc": 1, "start": "2016-05-15 16:57:11.941727", "warnings": []}
stderr: Error: image openshift3/ose:latest not found
stdout: Trying to pull repository satellite.lab.kupo.se:5000/openshift3/ose ... not found
failed: [node1.lab.example.com] => (item=openshift3/ose) => {"changed": true, "cmd": ["docker", "pull", "openshift3/ose:latest"], "delta": "0:00:00.193200", "end": "2016-05-15 16:57:12.289013", "item": "openshift3/ose", "rc": 1, "start": "2016-05-15 16:57:12.095813", "warnings": []}
stderr: Error: image openshift3/ose:latest not found
stdout: Trying to pull repository satellite.lab.kupo.se:5000/openshift3/ose ... not found
failed: [infra1.lab.example.com] => (item=openshift3/ose) => {"changed": true, "cmd": ["docker", "pull", "openshift3/ose:latest"], "delta": "0:00:00.175980", "end": "2016-05-15 16:57:12.316753", "item": "openshift3/ose", "rc": 1, "start": "2016-05-15 16:57:12.140773", "warnings": []}
stderr: Error: image openshift3/ose:latest not found
stdout: Trying to pull repository satellite.lab.kupo.se:5000/openshift3/ose ... not found

FATAL: all hosts have already failed -- aborting

Expected results:
Upgrade should succeed.

Additional info:
Looking in the upgrade playbook this is likely due to a incorrect docker pull command:

# The cli image is used by openshift_docker_facts to determine the currently installed
# version.  We need to explicitly pull the latest image to handle cases where
# the locally cached 'latest' tag is older the g_new_version.
- name: Download cli image
  hosts: oo_masters_to_config:oo_nodes_to_config
  roles:
  - { role: openshift_docker_facts }
  tasks:
  - name: Pull Images
    command: >
      docker pull {{ item }}:latest
    with_items:
    - "{{ openshift.common.cli_image }}"


Somewhere the oreg_url variable should probably be appended here if it was supplied.

Comment 1 Scott Dodson 2016-05-17 15:54:34 UTC
We'll have to do some string parsing to make that work for. For now you can set these variables 

osm_image=satellite.lab.example.com:5000/lab-ose_docker_images-openshift3_ose
osn_image=satellite.lab.example.com:5000/lab-ose_docker_images-openshift3_node
osn_ovs_image=satellite.lab.example.com:5000/lab-ose_docker_images-openshift3_openvswitch
osm_etcd_image=satellite.lab.example.com:5000/lab-ose_docker_images-rhel7_etcd

Or whatever the actual image paths are.

Comment 2 Johan Swensson 2016-05-17 16:14:47 UTC
Also worth noting, this is a rpm based install. So maybe these images shouldn't be needed to pulled at all?

Comment 3 Scott Dodson 2016-05-17 16:45:46 UTC
Oh yeah, that shouldn't be necessary. I have a pending fix for that, let me get that pushed through.

https://github.com/openshift/openshift-ansible/pull/1811

Comment 4 Johan Swensson 2016-05-17 17:44:11 UTC
Yup, that patch did the trick for me. Thanks!

Comment 6 Scott Dodson 2016-05-17 17:54:48 UTC
(Marked a previous comment private as I submitted before completing the comment)

Testing of this bug should be limited in scope to RPM installs.

If there's significant demand for extrapolating oreg_url in a way that it works for containerized installs we'll open a separate BZ for that. However, I think the workaround in comment #1 is probably sufficient for situations where that's necessary.

Comment 8 Anping Li 2016-06-01 05:14:42 UTC
Verified, the upgrade don't pull those images any more.

Comment 10 errata-xmlrpc 2016-06-07 10:56:15 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-2016:1208


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