Fix TestHostNetworkEndpointPublishingStrategy#738
Fix TestHostNetworkEndpointPublishingStrategy#738frobware wants to merge 3 commits intoopenshift:masterfrom
Conversation
The e2e test `TestHostNetworkEndpointPublishingStrategy` is always failing. We directly need openshift/api#1097 but I bumped openshift/api to current latest. go get -u github.com/openshift/api@c3bb724c282a1ac34d7c769da99543a453ae90b9 go mod vendor go mod tidy
The API change in openshift/api#1097 means that the set of configurable ports on type HostNetworkStrategy are not marked as optional. It's not clear whether that was deliberate but without specifying these the e2e tests will always fail.
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: frobware The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
error: error creating buildah builder: initializing source docker://image-registry.openshift-image-registry.svc:5000/ci-op-c2k6zvk7/pipeline@sha256:30ea73ec25783d6c04b6648a2e2ae60022f1c5f71bd296e2c4e84b9de840841a: pinging container registry image-registry.openshift-image-registry.svc:5000: Get "https://image-registry.openshift-image-registry.svc:5000/v2/": dial tcp: i/o timeout /retest |
|
cc @arjunrn |
|
@frobware I'm not sure I understand the cause of the failures. This repo does not contain the changes I made in openshift/api. So the CRD being created in the test cluster will not have the new fields. Secondly the ports are optional implicitly IIUC. Only fields which are listed in cc @alebedev87 |
|
Anyway, there is some defaulting for the values for the controller when it's not present(due to version upgrades) in my PR #694. If that's the cause of the issue then the defaulting should help. |
Without |
This is a good point. I currently have stacked API changes. I was trying to understand why my PR #735 was failing in CI. I have bumped to include my changes, but that will pick up yours too. |
|
|
|
/test e2e-aws-operator |
2022-04-12T16:46:23.561+0100 INFO operator.ingress_controller controller/controller.go:114 reconciling {"request": "openshift-ingress-operator/host"}
2022-04-12T16:46:24.259+0100 ERROR operator.init.controller.ingress_controller controller/controller.go:266 Reconciler error {"name": "host", "namespace": "openshift-ingress-operator", "error": "failed to admit ingresscontroller: failed to update status: IngressController.operator.openshift.io \"host\" is invalid: [status.endpointPublishingStrategy.hostNetwork.httpsPort: Invalid value: 0: status.endpointPublishingStrategy.hostNetwork.httpsPort in body should be greater than or equal to 1, status.endpointPublishingStrategy.hostNetwork.statsPort: Invalid value: 0: status.endpointPublishingStrategy.hostNetwork.statsPort in body should be greater than or equal to 1, status.endpointPublishingStrategy.hostNetwork.httpPort: Invalid value: 0: status.endpointPublishingStrategy.hostNetwork.httpPort in body should be greater than or equal to 1]"}This is the error I see when creating the following: apiVersion: operator.openshift.io/v1
kind: IngressController
metadata:
creationTimestamp: "2022-04-12T15:14:20Z"
finalizers:
- ingresscontroller.operator.openshift.io/finalizer-ingresscontroller
generation: 1
name: host
namespace: openshift-ingress-operator
resourceVersion: "105051"
uid: 93e19982-6366-4345-a1fe-d3cadbd8d712
spec:
clientTLS:
clientCA:
name: ""
clientCertificatePolicy: ""
domain: foo.host.amcdermo-2022-04-12-1246.devcluster.openshift.com
endpointPublishingStrategy:
type: HostNetwork
hostNetwork:which is, as I understand things, the reason why the test fails because we don't currently specify any values for the 3 ports. |
|
@arjunrn In dff1967#diff-0c9271ea6402ecb6233e9e0a629cd72156e12bb7a2c41ef99f0d0265394d7ec4R391 we add default values if they are not specified. Why don't we allow 0 in the API and get the defaults from there? |
|
@frobware: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
|
Obsoleted by openshift/api#1175. |
The API change in openshift/api#1097 does not mark the set of configurable ports on type
HostNetworkStrategyas optional. It's not clear whether that was deliberate and/or intended but without specifying these ports the e2e testTestHostNetworkEndpointPublishingStrategy()will always fail.