-
Notifications
You must be signed in to change notification settings - Fork 1.2k
test: Add check for Openshift registry image stream import, update tests to Openshift 1.5 #6398
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: Add check for Openshift registry image stream import, update tests to Openshift 1.5 #6398
Conversation
67c5d69
to
72b5225
Compare
Unfortunately Openshift has regressed in various ways with the latest update :S |
See #6381. Needs:
And also |
Thanks Stef. I (locally still) added naughty overrides for the selfLink issue on F25 and F26 and updated the s/list/watch/. There's still a third failure:
investigating that one. |
The duplicated images are because {
"/oapi/v1/images/sha256:ccd219a3f04c6f49099555236d5f0f04161e5d002b9b0fe87ce846214c3be8a6": {
"metadata": {
"name": "sha256:ccd219a3f04c6f49099555236d5f0f04161e5d002b9b0fe87ce846214c3be8a6",
},
"/oapi/v1/imagessha256%3Accd219a3f04c6f49099555236d5f0f04161e5d002b9b0fe87ce846214c3be8a6": {
"kind": "Image",
"apiVersion": "v1",
"metadata": {
"name": "sha256:ccd219a3f04c6f49099555236d5f0f04161e5d002b9b0fe87ce846214c3be8a6",
"selfLink": "/oapi/v1/imagessha256%3Accd219a3f04c6f49099555236d5f0f04161e5d002b9b0fe87ce846214c3be8a6",
}
} So this apparently is yet another fallout from broken selfLinks. This is visible with this debugging statement: --- a/pkg/kubernetes/views/image-listing.html
+++ b/pkg/kubernetes/views/image-listing.html
@@ -38,6 +38,7 @@
<td listing-panel kind="ImageStream" colspan="4"></td>
</tr>
</tbody>
+ <p ng-repeat="tag in stream.status.tags track by tag.tag">{{ tag }} imageByTag: {{ imageByTag(tag) }}</p>
<tbody ng-repeat="tag in stream.status.tags track by tag.tag"
ng-init="iid = sid + ':' + tag.tag" data-id="{{ iid }}"
ng-class="{open: listing.expanded(iid), last: $last, first: $first}">
|
Next one up is the same test if it hits the race of seeing the first image (only) and then stumbling over:
|
The missing "ADD file:" is because openshift 1.5's However, what confuses me is that even with the current master Openshift image, neither the visible page nor the HTML source has any trace of "ADD file:" -- it just shows the layers with their sha and size, but not the manifest: <registry-image-layers image="image" layers="layers" class="ng-isolate-scope"><ul class="registry-image-layers"> <!-- ngRepeat: layer in layers --><li ng-repeat="layer in layers" class="hint-other"> <span title="32" class="ng-binding">32 byte</span> <p class="ng-binding">sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4</p> </li><!-- end ngRepeat: layer in layers --><li ng-repeat="layer in layers" class="hint-add"> <span title="701102" class="ng-binding">684.7 KiB</span> <p class="ng-binding">sha256:04176c8b224aa0eb9942af765f66dae866f436e75acef028fe44b8a98e045515</p> </li><!-- end ngRepeat: layer in layers --> </ul></registry-image-layers> (there is no "ADD file" anywhere else either) After some waiting or other external events I'm not aware of, the "ADD file" and command suddenly appear on the page, but I don't know how to reproduce this interactively as user. As such, it appears to me that this feature is rather broken even with the current images? |
It only works an an Openshift user that has the "system:admin" role. And yes it is rather broken. We should open an issue upstream and/or ask for how to replace that functionality with something that works. |
That's not it - our openshift test image does have that, and I can't even see it after adding a |
Wah, there is more fallout from the broken selfLinks, like "Error: [ngRepeat:dupes] Duplicates in a repeater are not allowed.". |
Wah, there is more fallout from the broken selfLinks, like |
In the meeting today we decided to not stall Openshift at 1.4, but update to 1.5 and add appropriate overrides. |
/tmp is not being cleaned out by zero-disk.setup. Do the build in a subdirectory, which is easier to clean up and also makes it easier to build other Docker images with different contexts.
This will be used for testing container and image stream imports into OpenShift. We don't want tests to talk to the real hub.docker.com, so we'll set up our own mini registry to pull from. Openshift's image registry does not accept docker registry TLS certificates signed by Openshift's CA by default, and there is no way to properly configure it to do so. So rebuild the registry docker image with the Openshift CA included in /etc/pki/. See <openshift/origin#1753>.
Add tests for importing a docker tag into an Openshift image stream, both for pulling all and for pulling selected tags only. The latter reproduces https://bugzilla.redhat.com/show_bug.cgi?id=1373332 (it still pulls all tags in the latter case), so comment out these assertions for now. Set up a local docker registry instance to avoid having to go to the network. Closes cockpit-project#6398
In "check-openshift TestOpenshift.testConnect", the new Openshift version now responds with "cannot watch all persistentvolumes in the cluster", instead of "list", so update the expected string.
Adjust "check-openshift TestRegistry.testImages" for not expecting the the docker manifest commands of an image tag any more, as Openshift 1.5 does not deliver that any more as part of "get images". Now just verify that it shows the size of the layers. This feature is rather brittle with the current Openshift (1.4) image even and almost impossible to see manually, so it's not a big loss of functionality.
da486f5
to
48c134f
Compare
I went ahead and added overrides. I'm happy to see some progress upstream on that matter at last, openshift/origin#14001 just got posted. \o/. |
48c134f
to
18559a4
Compare
Since all of that is racy, another variant (slightly later) popped up:
I re-pushed with generalizing the pattern accordingly. |
Regression in Openshift 1.5 in Fedora/CentOS/RHEL: cockpit-project#6381 This is being fixed in openshift/origin#14001. This breaks Cockpit's Openshift interface really hard, but nevertheless 1.5 is what is delivered to the world now.
The fedora-26 failure is unrelated, and still affected by #6354, so I think this is ready to go now. |
This will be used for testing container and image stream imports into OpenShift. We don't want tests to talk to the real hub.docker.com, so we'll set up our own mini registry to pull from. Openshift's image registry does not accept docker registry TLS certificates signed by Openshift's CA by default, and there is no way to properly configure it to do so. So rebuild the registry docker image with the Openshift CA included in /etc/pki/. See <openshift/origin#1753>. Closes #6398 Reviewed-by: Stef Walter <[email protected]>
Add tests for importing a docker tag into an Openshift image stream, both for pulling all and for pulling selected tags only. The latter reproduces https://bugzilla.redhat.com/show_bug.cgi?id=1373332 (it still pulls all tags in the latter case), so comment out these assertions for now. Set up a local docker registry instance to avoid having to go to the network. Closes #6398 Reviewed-by: Stef Walter <[email protected]>
In "check-openshift TestOpenshift.testConnect", the new Openshift version now responds with "cannot watch all persistentvolumes in the cluster", instead of "list", so update the expected string. Closes #6398 Reviewed-by: Stef Walter <[email protected]>
Adjust "check-openshift TestRegistry.testImages" for not expecting the the docker manifest commands of an image tag any more, as Openshift 1.5 does not deliver that any more as part of "get images". Now just verify that it shows the size of the layers. This feature is rather brittle with the current Openshift (1.4) image even and almost impossible to see manually, so it's not a big loss of functionality. Closes #6398 Reviewed-by: Stef Walter <[email protected]>
Regression in Openshift 1.5 in Fedora/CentOS/RHEL: #6381 This is being fixed in openshift/origin#14001. This breaks Cockpit's Openshift interface really hard, but nevertheless 1.5 is what is delivered to the world now. Closes #6398 Reviewed-by: Stef Walter <[email protected]>
Add tests for importing a docker tag into an Openshift image stream, both for pulling all and for pulling selected tags only. The latter reproduces https://bugzilla.redhat.com/show_bug.cgi?id=1373332 (it still pulls all tags in the latter case), so comment out these assertions for now. (I'll look at that bug later)
Set up a local docker registry instance to avoid having to go to the network.
This requires installing the docker registry container on Openshift image, thus a new image (uploading right now). That container is ~ 33 MB, so an acceptable increase IMHO.
Making the Openshift registry accept that local docker registry requires jumping through some hoops.
Rebuilding the Openshift image now updates it from 1.4 to 1.5, which introduces some functional changes and a major regression, so this requires some test adjustments and naughty overrides.