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
Submariner ServiceExport does not have unique condition types to wait for readiness #714
Comments
|
Multiple conditions with |
It seems condition types are intended to be singletons, ie only retain the last state. I didn't realize that at the time and implemented it as a historical trace which I think also has some merit however I think we should utilize conditions as intended. |
|
Yeah, while historical trace helps with troubleshooting and was immensly helpful during early development of lighthouse, it breaks the condition checks. For historical trace, it is better done as different types, like we do with addon. |
Condition types are expected to be singelton and only last state of a given condition type shoud be maintained. We currently maintain a list of all transitions to a state as a list with max of 10. This causes problems with condition check APIs. Currently support just one type, Valid. Fixes submariner-io#714 Signed-off-by: Vishal Thapar <5137689+vthapar@users.noreply.github.com>
Yup. I'll take care of this for 0.13. |
Condition types are expected to be singelton and only last state of a given condition type shoud be maintained. We currently maintain a list of all transitions to a state as a list with max of 10. This causes problems with condition check APIs. Currently support just one type, Valid. Fixes #714 Signed-off-by: Vishal Thapar <5137689+vthapar@users.noreply.github.com>
Condition types are expected to be singelton and only last state of a given condition type shoud be maintained. We currently maintain a list of all transitions to a state as a list with max of 10. This causes problems with condition check APIs. Currently support just one type, Valid. Fixes submariner-io#714 Signed-off-by: Vishal Thapar <5137689+vthapar@users.noreply.github.com>
Condition types are expected to be singelton and only last state of a given condition type shoud be maintained. We currently maintain a list of all transitions to a state as a list with max of 10. This causes problems with condition check APIs. Currently support just one type, Valid. Fixes #714 Signed-off-by: Vishal Thapar <5137689+vthapar@users.noreply.github.com>
What happened:
After creating service export with subctl, ther's no way to validate it with kubectl/oc wait command,
since Submariner ServiceExport does not have unique condition types to wait for readiness (all types are the same "Valid").
For example, on a working service export status it failed on:
$ oc wait serviceexport nginx-cl-bc --for=condition=Valid
error: timed out waiting for the condition on serviceexports/nginx-cl-bc
What you expected to happen:
If the service export is working, it should return something like:
multicluster.x-k8s.io/ServiceExportList condition met
How to reproduce it (as minimally and precisely as possible):
Create a service export:
$ oc get serviceexport
NAME AGE
nginx-cl-bc 3h5m
$ oc get serviceexport -o yaml
apiVersion: v1
items:
apiVersion: multicluster.x-k8s.io/v1alpha1
kind: ServiceExport
metadata:
creationTimestamp: "2022-03-21T08:25:40Z"
generation: 1
name: nginx-cl-bc
namespace: test-submariner
resourceVersion: "115495575"
selfLink: /apis/multicluster.x-k8s.io/v1alpha1/namespaces/test-submariner/serviceexports/nginx-cl-bc
uid: 7af4a9ae-24f6-4d1d-9ac5-100664e03dd9
status:
conditions:
lastTransitionTime: "2022-03-21T08:25:39Z"
message: Service doesn't have a global IP yet
reason: ServiceGlobalIPUnavailable
status: "False"
type: Valid
lastTransitionTime: "2022-03-21T08:25:39Z"
message: Awaiting sync of the ServiceImport to the broker
reason: AwaitingSync
status: "False"
type: Valid
lastTransitionTime: "2022-03-21T08:25:39Z"
message: Service was successfully synced to the broker
reason: ""
status: "True"
type: Valid
lastTransitionTime: "2022-03-21T09:59:32Z"
message: Service to be exported doesn't exist
reason: ServiceUnavailable
status: "False"
type: Valid
lastTransitionTime: "2022-03-21T09:59:32Z"
message: Service doesn't have a global IP yet
reason: ServiceGlobalIPUnavailable
status: "False"
type: Valid
lastTransitionTime: "2022-03-21T09:59:33Z"
message: Awaiting sync of the ServiceImport to the broker
reason: AwaitingSync
status: "False"
type: Valid
lastTransitionTime: "2022-03-21T09:59:35Z"
message: Service was successfully synced to the broker
reason: ""
status: "True"
type: Valid
lastTransitionTime: "2022-03-21T10:20:16Z"
message: Service to be exported doesn't exist
reason: ServiceUnavailable
status: "False"
type: Valid
lastTransitionTime: "2022-03-21T10:20:16Z"
message: Service doesn't have a global IP yet
reason: ServiceGlobalIPUnavailable
status: "False"
type: Valid
kind: List
metadata:
resourceVersion: ""
selfLink: ""
$ oc wait serviceexport nginx-cl-bc --for=condition=Valid
error: timed out waiting for the condition on serviceexports/nginx-cl-bc
Anything else we need to know?:
Environment:
Submariner version 0.12.0
subctl diagnose all):subctl gather):The text was updated successfully, but these errors were encountered: