Bug 1303015

Summary: [devexp_public_843]Failed to recognize secret location when destinationDir defined via oc new-build --build-secret
Product: OKD Reporter: Wenjing Zheng <wzheng>
Component: BuildAssignee: Slava Semushin <vsemushi>
Status: CLOSED CURRENTRELEASE QA Contact: Wenjing Zheng <wzheng>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.xCC: aos-bugs, mfojtik
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-05-12 17:11:17 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:

Description Wenjing Zheng 2016-01-29 10:04:34 UTC
Description of problem:
Build failed when descrinationDir defined via build-secret:
Step 10 : ADD ./mysecret1 /secrets
F0129 09:45:26.008644       1 builder.go:185] Error: build error: mysecret1: no such file or directory

Version-Release number of selected component (if applicable):
openshift v1.1.1-287-g313292a
kubernetes v1.2.0-alpha.4-851-g4a65fa1
etcd 2.2.2

How reproducible:
always

Steps to Reproduce:
1. Create a project
2. Create two secrets
3. Create resources
$oc new-build --image=ruby:2.2 https://github.com/wzheng1/build-secret.git --strategy=docker --build-secret testsecret1:mysecret1 --build-secret testsecret2
4. Check build status and build log

Actual results:
Below warning appears:
Step 10 : ADD ./mysecret1 /secrets
F0129 09:45:26.008644       1 builder.go:185] Error: build error: mysecret1: no such file or directory

Expected results:
Build should succeed.

Additional info:

Comment 1 Michal Fojtik 2016-01-29 10:11:46 UTC
Just tried the steps on latest master, got: https://gist.github.com/mfojtik/5707899c2c14363c11de

Can we re-test this on latest AMI when it will be build?

Comment 2 Michal Fojtik 2016-01-29 10:18:15 UTC
Slava can actually reproduce this. Note that I have to create the 2 secrets first. I changed the "name" of the secrets to "testsecret1" and "testsecret2".

Comment 3 Slava Semushin 2016-02-01 12:12:30 UTC
This happens because of using outdated builder image. After rebuilding images (make release) and re-running Openshift with --latest-images options the build finished successfully.

Comment 4 Wenjing Zheng 2016-02-02 03:12:58 UTC
Yes, after adding --latest-images options when running openshift, build is successful, so verifying this bug now.