Bug 1575909

Summary: [ded-int-aws] Failed to push image when do build
Product: OpenShift Container Platform Reporter: wewang <wewang>
Component: BuildAssignee: Adam Kaplan <adam.kaplan>
Status: CLOSED NOTABUG QA Contact: wewang <wewang>
Severity: high Docs Contact:
Priority: high    
Version: 3.7.0CC: aos-bugs, bparees, cdaley, wewang, wzheng, yasun
Target Milestone: ---Keywords: OnlineDedicated
Target Release: ---   
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: 2022-04-13 17:40:18 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 wewang 2018-05-08 09:17:54 UTC
Description of problem:
Failed to push image: unauthorized: authentication required when do build 

Version-Release number of selected component (if applicable):
v3.7.23

How reproducible:
always

Steps to Reproduce:
1. oc new-app --template=django-psql-persistent

2.Check the build 
 $oc logs build/django-psql-persistent-1
Pushing image xxxxxx:5000/aya3l/django-psql-persistent:latest ... Registry server Address: Registry server User Name: serviceaccount Registry server Email: serviceaccount Registry server Password: <<non-empty>> error: build error: Failed to push image: unauthorized: authentication required


Actual results:
build failed
Expected results:
build should be complete

Additional info:

Comment 2 Ben Parees 2018-05-08 14:13:31 UTC
please rerun your build with --build-loglevel=5 and supply the build log.

Also supply your buildconfig yaml

Comment 3 Ben Parees 2018-05-08 14:19:31 UTC
(but it sounds like your token is not actually valid, or does not have the necessary permissions)

you can check what your token can do by running:

oc login --token=<builder service account token>
oc auth can-i update imagestream/django-psql-persistent -n yourproject

(Alexey may have some other permissions he'd like you to check)

Comment 5 Ben Parees 2018-05-08 19:12:13 UTC
we should also make sure these env vars have been removed from the registry DC:
https://github.com/openshift/openshift-ansible/pull/8112/files#diff-63574a20e5e33b5c8c5c0049028a01ab

Comment 7 wewang 2018-05-09 02:06:54 UTC
@Stefanie Forrester. build success ,verified the bug thanks