Open kadel opened 8 years ago
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
)
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 ?
I just done couple more test with ruby-hello-world,
I exported it with --export-images=all
When deploying exported app the following happens:
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
This seems to be timing issue. It fails when BuildConfig is created before ImageStream.
This is already reported in Origin https://github.com/openshift/origin/issues/4518
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: https://github.com/projectatomic/atomicapp/issues/669
One workaround for this would be using List with artifacts in right order, but this is not possible due to this: https://github.com/projectatomic/atomicapp/issues/612
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.
For mlbparks: Importing BuildConfig triggers build that fails on this error: