Bug 2066267 - Submariner ServiceExport does not have unique condition types to wait for readiness
Summary: Submariner ServiceExport does not have unique condition types to wait for rea...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Advanced Cluster Management for Kubernetes
Classification: Red Hat
Component: Submariner
Version: rhacm-2.5
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: rhacm-2.6
Assignee: Vishal Thapar
QA Contact: Noam Manos
Christopher Dawson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-03-21 11:49 UTC by Noam Manos
Modified: 2022-10-03 20:21 UTC (History)
5 users (show)

Fixed In Version: ACM 2.6
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-10-03 20:21:49 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github stolostron backlog issues 20963 0 None None None 2022-03-21 12:26:08 UTC
Github submariner-io lighthouse issues 714 0 None closed Submariner ServiceExport does not have unique condition types to wait for readiness 2022-03-29 10:30:50 UTC
Github submariner-io lighthouse pull 715 0 None Merged Only retain last state for condition types 2022-07-07 12:54:57 UTC

Description Noam Manos 2022-03-21 11:49:14 UTC
**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


**Environment**:
- Submariner version v0.12.0

Comment 1 Stephen Kitt 2022-03-21 14:09:53 UTC
Is there any way to sync this to Lighthouse rather than the addon?

Comment 2 Noam Manos 2022-03-21 14:16:54 UTC
I don't think so, because in Bugzilla the only sub-component of ACM is Submariner.

Comment 3 Noam Manos 2022-03-21 14:20:49 UTC
(no other sub-components for Submariner)

Comment 4 bot-tracker-sync 2022-03-22 11:58:38 UTC
G2Bsync 1075028033 comment 
 skitt Tue, 22 Mar 2022 11:00:32 UTC 
 G2BSync @vthapar could you look into this, and open an issue in Lighthouse if necessary?

Comment 5 Nir Yechiel 2022-03-29 10:30:28 UTC
This is merged upstream in Submariner devel (so will be shipped in ACM 2.6). I don't think this is critical enough to be backported.

Comment 6 Maxim Babushkin 2022-08-02 11:43:55 UTC
The wait for condition for service export has been successfully verified on acm 2.6 / submariner 0.13.0


Note You need to log in before you can comment on or make changes to this bug.