Bug 1206109
| Summary: | [origin_devexp_510] Failed to get build dependency trees for all tags in the specified image repository | ||
|---|---|---|---|
| Product: | OKD | Reporter: | chunchen <chunchen> |
| Component: | Containers | Assignee: | Michail Kargakis <mkargaki> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | libra bugs <libra-bugs> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 3.x | CC: | mkargaki, mmccomas, wsun |
| 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: | 2015-07-07 23:45:09 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
chunchen
2015-03-26 10:39:31 UTC
Commit pushed to master at https://github.com/openshift/origin https://github.com/openshift/origin/commit/f4d8bf0237197c1d559b892aa1b7263584607870 Bug 1206109 - Default empty tag slice to 'latest' the issue is also reproduced for command "openshift ex build-chain [image-repository] --all-tags", think this command should show the build dependency trees for all tags in the specified image repository in *all* namespaces, not just in *current* namespace, could you please help to confirm if i am right? Thanks! --all-tags is only for the current namespace. Thanks for confirming, but it still does not work well, it only detects the *latest* tag instead of all tags, like below results:
# openshift ex build-chain ruby-20-centos7-2 --all-tags -n test
I0330 03:30:27.239605 16327 buildchain.go:178] test/ruby-20-centos7-2:latest has no dependencies
# openshift ex build-chain ruby-20-centos7-2:stiv1 --all-tags -n test
{
"fullname": "test/ruby-20-centos7-2",
"tags": [
"stiv1"
],
"edges": [
{
"fullname": "test/ruby-sample-build2",
"to": "test/origin-ruby-sample2"
}
],
"children": [
{
"fullname": "test/origin-ruby-sample2",
"tags": [
""
]
}
]
}
Commit pushed to master at https://github.com/openshift/origin https://github.com/openshift/origin/commit/df9ffa136f9fdbc88f33684786914c22dfda5946 Bug 1206109 - build-chain: Set tags correctly Checked the issue against devenv_fedora_1181, it's still reproduced as the same results as Comment #4. For testing, I used this application template json file [1], but edit it like below: <-----------------sinp-------------------> "imageChange": { "from": { "name": "ruby-20-centos7" }, "image": "openshift/ruby-20-centos7", "tag": "stiv1" ### set it with my defined tag instead of the "latest" tag }, <-----------------sinp-------------------> [1] https://github.com/openshift/origin/blob/master/examples/sample-app/application-template-stibuild.json Thanks! The test results w/o modifying the template are as below:
[root@ip-10-157-110-97 sample-app]# openshift ex build-chain ruby-20-centos7 --all-tags -n test
{
"fullname": "test/ruby-20-centos7",
"tags": [
"latest"
],
"edges": [
{
"fullname": "test/ruby-sample-build",
"to": "test/origin-ruby-sample"
}
],
"children": [
{
"fullname": "test/origin-ruby-sample",
"tags": [
""
]
}
]
}
I0403 02:54:13.801478 3849 buildchain.go:204] test/ruby-20-centos7:v0.4 has no dependencies
[root@ip-10-157-110-97 sample-app]# openshift ex build-chain ruby-20-centos7:latest --all-tags -n test
I0403 02:54:23.574428 3859 buildchain.go:204] test/ruby-20-centos7:v0.4 has no dependencies
{
"fullname": "test/ruby-20-centos7",
"tags": [
"latest"
],
"edges": [
{
"fullname": "test/ruby-sample-build",
"to": "test/origin-ruby-sample"
}
],
"children": [
{
"fullname": "test/origin-ruby-sample",
"tags": [
""
]
}
]
}
Great, these results on #7 are ok. Now, regarding your template change, it's invalid because we pull that image from DockerHub and there is no "stiv1" over there: https://registry.hub.docker.com/u/openshift/ruby-20-centos7/tags/manage/ So, when we run openshift ex build-chain ruby-20-centos7:stiv1 we should get nothing back. I will shortly submit a patch for this. Commit pushed to master at https://github.com/openshift/origin https://github.com/openshift/origin/commit/89413d9d0b589954632ed099114596b7726cd95f Bug 1206109: Handle specified tags that don't exist in the specified image repository Patch is live. Expected behavior with your edited template:
$ openshift ex build-chain ruby-20-centos7:stiv1 --all-tags
I0401 11:06:33.4372543202 buildchain.go:179] chun1/ruby-20-centos7:latest has no dependencies
I0401 11:06:33.4372543202 buildchain.go:179] chun1/ruby-20-centos7:v0.4 has no dependencies
since the buildconfig will not be in the chain because it is triggered by the "stiv1" tag which is not present in the imagerepository.
it's fixed, verified on devenv_fedora_1226, please refer to the below results: [root@ip-10-169-178-13 chunchen]# osc get imagerepository -n test NAME DOCKER REPO TAGS origin-ruby-sample 172.30.17.144:5000/test/origin-ruby-sample ruby-20-centos7 openshift/ruby-20-centos7 latest,v0.4 [root@ip-10-169-178-13 chunchen]# openshift ex build-chain ruby-20-centos7:stiv1 --all-tags -n test I0408 02:50:46.279967 16584 buildchain.go:211] test/ruby-20-centos7:v0.4 has no dependencies I0408 02:50:46.280034 16584 buildchain.go:211] test/ruby-20-centos7:latest has no dependencies [root@ip-10-169-178-13 chunchen]# openshift ex build-chain ruby-20-centos7 --all-tags -n test I0408 02:50:33.340398 16517 buildchain.go:211] test/ruby-20-centos7:latest has no dependencies I0408 02:50:33.340560 16517 buildchain.go:211] test/ruby-20-centos7:v0.4 has no dependencies |