Skip to content
This repository has been archived by the owner on Feb 2, 2018. It is now read-only.

buildConfig for some apps fails while pushing image #42

Open
kadel opened this issue Mar 21, 2016 · 7 comments
Open

buildConfig for some apps fails while pushing image #42

kadel opened this issue Mar 21, 2016 · 7 comments

Comments

@kadel
Copy link
Collaborator

kadel commented Mar 21, 2016

For mlbparks:
Importing BuildConfig triggers build that fails on this error:

Copying all WAR and EAR artifacts from /home/jboss/source/target directory into /opt/eap/standalone/deployments for later deployment...
Copying all WAR and EAR artifacts from /home/jboss/source/deployments directory into /opt/eap/standalone/deployments for later deployment...
'/home/jboss/source/deployments/ROOT.war' -> '/opt/eap/standalone/deployments/ROOT.war'
I0321 17:07:25.288691       1 sti.go:259] No push secret provided
I0321 17:07:25.289032       1 sti.go:261] Pushing 172.30.50.40:5000/java-import/mlbparks:latest image ...
F0321 17:07:25.331696 1 builder.go:204] Error: build error: Failed to push image. Response from registry is: Post https://172.30.50.40:5000/v2/java-import/mlbparks/blobs/uploads/: no basic auth credentials
@kadel
Copy link
Collaborator Author

kadel commented Mar 21, 2016

There is more problems with BuildConfigs.

o2n exports finished images (result of BuildConfig) with DeploymentConfigs.
When such BuildConfig is imported (and it build is successful) new image from BC is not used, instead of this, image from imported DC is used.
For example this happens for ruby hello world example (oc new-app centos/ruby-22-centos7~https://github.com/openshift/ruby-hello-world.git)

@kadel kadel changed the title Importing buildConfig fails What is proper way to handle BuildConfigs? Mar 21, 2016
@kadel
Copy link
Collaborator Author

kadel commented Mar 21, 2016

I see two options what to do here.

1) stop exporting images (pull/push to external registry)
If we can figure out shy exactly some imported builds fails we can skip exporting images and really on buildconfigs only.
Benefit of this is that it would make thinks much easier when we don't have to deal with openshifts internal docker registry.

2) Stop exporting BuildConfigs and really only on finished images.
We have to still export images from openshift docker registry. With all the complications with requiring another external registry

Or we can do both.
When user wants to export images we do not export BuildConfigs, if user don't want to export images we do export BuildConfigs.

Your thoughts @surajssd ?

@kadel
Copy link
Collaborator Author

kadel commented Mar 22, 2016

I just done couple more test with ruby-hello-world,
I exported it with --export-images=all

When deploying exported app the following happens:

  • DeploymentConfig is created with image from external registry
  • BuildConfig starts building
  • when BuildConfig is finished DeploymentConfig is reloaded with new image that was just build by BC

At first this behavior might be confusing, but it is basically OK :-)

But I've still not be able to figure out why some applications BuildConfigs fails (like mlbaparks) with following error

F0321 17:07:25.331696 1 builder.go:204] Error: build error: Failed to push image. Response from registry is: Post https://172.30.50.40:5000/v2/java-import/mlbparks/blobs/uploads/: no basic auth credentials

and other BuildConfigs are ok - like ruby-hello-world

@kadel kadel changed the title What is proper way to handle BuildConfigs? buildConfig for some apps fails while pushing image Mar 23, 2016
@kadel kadel modified the milestone: v0.1.0 Mar 23, 2016
@kadel
Copy link
Collaborator Author

kadel commented Apr 4, 2016

This seems to be timing issue. It fails when BuildConfig is created before ImageStream.

This is already reported in Origin openshift/origin#4518

@kadel
Copy link
Collaborator Author

kadel commented Apr 4, 2016

It could be fixed by deploying artifacts in right order. But AtomicApp is not currently deploying artifacts in same order as they appear in Nulecule file.

Related issue: projectatomic/atomicapp#669

@kadel
Copy link
Collaborator Author

kadel commented Apr 4, 2016

One workaround for this would be using List with artifacts in right order, but this is not possible due to this: projectatomic/atomicapp#612

@kadel
Copy link
Collaborator Author

kadel commented Apr 5, 2016

Until we can specify order in Nulecule, only workaround for this is to restart build manually.
It is going to work, because ImageStream is already created when restarting build again.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant