Bug 1264765 - Upgrade failed if some imagesteam/template doesn't exist
Upgrade failed if some imagesteam/template doesn't exist
Product: OpenShift Container Platform
Classification: Red Hat
Component: Upgrade (Show other bugs)
Unspecified Unspecified
high Severity medium
: ---
: ---
Assigned To: Scott Dodson
Anping Li
Depends On:
  Show dependency treegraph
Reported: 2015-09-21 03:19 EDT by Anping Li
Modified: 2015-11-19 18:29 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2015-11-19 18:29:08 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Anping Li 2015-09-21 03:19:18 EDT
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:

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: [] => {"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

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 12:51:12 EDT
I've switched to oc replace, please pull the latest code and re-test, thanks.
Comment 2 Anping Li 2015-09-21 23:32:59 EDT
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 02:50:19 EDT
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 11:34:30 EDT
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.

Comment 5 Anping Li 2015-09-22 22:45:51 EDT
The 'update is/template' work fine, no error was reported now.
Comment 7 errata-xmlrpc 2015-11-19 18:29:08 EST
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.


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