Bug 1264765 - Upgrade failed if some imagesteam/template doesn't exist
Summary: Upgrade failed if some imagesteam/template doesn't exist
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Cluster Version Operator
Version: 3.0.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
: ---
Assignee: Scott Dodson
QA Contact: Anping Li
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-09-21 07:19 UTC by Anping Li
Modified: 2015-11-19 23:29 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-19 23:29:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2015:2492 0 normal SHIPPED_LIVE Red Hat OpenShift Enterprise 3.1 upgrade support enhancement 2015-11-20 03:10:38 UTC

Description Anping Li 2015-09-21 07:19:18 UTC
Description of problem:

The upgrade failed if some imagestream/template doesn't exist.  Message like 'Error from server: imageStream "jenkins" not found'  was reported.

some imagestream/template may not be installed in v3.0.1. for example jenkins imagestream isn't provided by default.  Custom may also drop some imagestreams or templates. It is better to print warning message rather than abort here.

The upgrade also shouldn't use the DEPRECATED 'oc update'.

Version-Release number of selected component (if applicable):
v3.0.1.0 to v3.0.2.0

How reproducible:
Always

Steps to Reproduce:
1. install openshift v3.0.1
2. run upgrade via ansible
   ansible-playbook openshift-ansible/playbooks/adhoc/upgrades/upgrade.yml

Actual Result:
1) Upgrade abort 'Error from server: imageStream "jenkins" not found'
2) Upgrade use DEPRECATED 'oc update.

TASK: [openshift_examples | Import RHEL streams] ****************************** 
failed: [192.168.1.101] => {"changed": false, "cmd": ["oc", "update", "-n", "openshift", "-f", "/usr/share/openshift/examples/image-streams/image-streams-rhel7.json"], "delta": "0:00:00.981375", "end": "2015-09-21 13:03:15.316542", "failed": true, "failed_when_result": true, "rc": 1, "start": "2015-09-21 13:03:14.335167", "stdout_lines": ["imagestreams/ruby", "imagestreams/nodejs", "imagestreams/perl", "imagestreams/php", "imagestreams/python", "imagestreams/mysql", "imagestreams/postgresql", "imagestreams/mongodb"], "warnings": []}
stderr: W0921 13:03:14.386785    7877 cmd.go:149] update is DEPRECATED and will be removed in a future version. Use replace instead.
Error from server: imageStream "jenkins" not found
stdout: imagestreams/ruby
imagestreams/nodejs
imagestreams/perl
imagestreams/php
imagestreams/python
imagestreams/mysql
imagestreams/postgresql
imagestreams/mongodb

FATAL: all hosts have already failed -- aborting

Expected Result:

1) Upgrade doesn't abort for 'non-block' issue.
2) Upgrade install the 'non-existing imagestreams/template' or skip it.
3) Upgrade use 'oc replace **' instead of 'oc update'

Comment 1 Scott Dodson 2015-09-21 16:51:12 UTC
I've switched to oc replace, please pull the latest code and re-test, thanks.

Comment 2 Anping Li 2015-09-22 03:32:59 UTC
I can saw the 'oc replace' after pull the latest code.

How about the template/imagestream replace issue.
There are no jenkins imagestream in a prior /usr/share/openshift/examples/image-streams/image-streams-rhel7.json. so there is the strong possibility that the customer hit "Error from server: imageStream "jenkins" not found". 

Could we fix it?

Comment 3 Anping Li 2015-09-22 06:50:19 UTC
I think the sequence for 'replace imagestream/template' is illogical. it is better to replace them after package was upgraded. How do you think about that?

Comment 4 Scott Dodson 2015-09-22 15:34:30 UTC
Thanks, I've changed it such that it runs the normal install to create them later runs the update command. This should avoid the issue you're seeing while ensuring that newly created image streams are installed. Please pull the latest and give it another test.

Thanks

Comment 5 Anping Li 2015-09-23 02:45:51 UTC
The 'update is/template' work fine, no error was reported now.

Comment 7 errata-xmlrpc 2015-11-19 23:29:08 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/RHEA-2015:2492


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