Bug 1627005

Summary: oc cluster up better to always pull the latest images instead of using previous pulled ones
Product: OpenShift Container Platform Reporter: zhou ying <yinzhou>
Component: ocAssignee: Juan Vallejo <jvallejo>
Status: CLOSED NOTABUG QA Contact: Xingxing Xia <xxia>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.11.0CC: aos-bugs, deads, jokerman, mfojtik, mmccomas, yinzhou
Target Milestone: ---Keywords: Regression
Target Release: 3.11.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: 2018-09-11 17:55:57 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 zhou ying 2018-09-10 09:21:38 UTC
Description of problem:
When use `oc cluter up` command failed with 400 error. 

Version-Release number of selected component (if applicable):
oc v3.11.0-0.32.0
kubernetes v1.11.0+d4cacc0

How reproducible:
always

Steps to Reproduce:
1. Use command `oc cluster up --image='brew-pulp-docker01.web.prod.ext.phx2.redhat.com:8888/openshift3/ose-${component}:${version}' --loglevel=6`


Actual results:
1. Failed with 400 error.


Expected results:
1. Succeed without any error.


Additional info:
I0910 04:58:30.852011   24841 web_console_operator.go:65] polling for web-console availability ...
I0910 04:58:30.885121   24841 round_trippers.go:405] GET https://127.0.0.1:8443/apis/apps/v1/namespaces/openshift-web-console/deployments/webconsole 200 OK in 32 milliseconds
I0910 04:58:31.851986   24841 web_console_operator.go:65] polling for web-console availability ...
I0910 04:58:31.883109   24841 round_trippers.go:405] GET https://127.0.0.1:8443/apis/apps/v1/namespaces/openshift-web-console/deployments/webconsole 200 OK in 30 milliseconds
I0910 04:58:31.933095   24841 round_trippers.go:405] GET https://127.0.0.1:8443/apis/webconsole.operator.openshift.io/v1alpha1/openshiftwebconsoleconfigs/instance 200 OK in 47 milliseconds
I0910 04:58:32.025133   24841 round_trippers.go:405] PUT https://127.0.0.1:8443/apis/webconsole.operator.openshift.io/v1alpha1/openshiftwebconsoleconfigs/instance 200 OK in 89 milliseconds
I0910 04:58:32.025368   24841 interface.go:41] Finished installing "openshift-image-registry" "rhel-imagestreams" "sample-templates" "persistent-volumes" "openshift-router" "openshift-web-console-operator"
I0910 04:58:33.047074   24841 round_trippers.go:405] GET https://127.0.0.1:8443/apis/user.openshift.io/v1/users/developer 503 Service Unavailable in 1020 milliseconds
W0910 04:58:33.073131   24841 up.go:1064] error checking user: the server is currently unable to handle the request (get users.user.openshift.io developer)
Login to server ...
I0910 04:58:33.073863   24841 loader.go:359] Config loaded from file /root/openshift.local.clusterup/kube-apiserver/admin.kubeconfig
I0910 04:58:33.123130   24841 round_trippers.go:405] HEAD https://127.0.0.1:8443/ 403 Forbidden in 48 milliseconds
I0910 04:58:33.133072   24841 round_trippers.go:405] GET https://127.0.0.1:8443/.well-known/oauth-authorization-server 200 OK in 9 milliseconds
I0910 04:58:33.152107   24841 round_trippers.go:405] GET https://127.0.0.1:8443/oauth/authorize?client_id=openshift-challenging-client&code_challenge=TMlgnBuN3wYrrHYPTyil32QQ5icTeYoyf1Vy4mAnabw&code_challenge_method=S256&redirect_uri=https%3A%2F%2F127.0.0.1%3A8443%2Foauth%2Ftoken%2Fimplicit&response_type=code 400 Bad Request in 18 milliseconds

Comment 2 zhou ying 2018-09-11 02:59:13 UTC
After delete the exist images, then `oc cluster up` succeed.

Comment 3 David Eads 2018-09-11 17:05:34 UTC
@mfojtik as I recall this behavior is intentional.  If you specify exactly which images to use, we assume that you want something in particular and we do *not* repull them.  We do the same thing when --tag is specified.

Choosing exactly which images to use is a very advanced usage.

Comment 4 Michal Fojtik 2018-09-11 17:55:57 UTC
Yes, if the tag is not latest, we do IfNotExists pull policy, I would close this as not a bug.