Skip to content
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

Support the conditions GatewayConnectionReady and AutoSnatEnabled during reconciling VPC #672

Merged
merged 1 commit into from
Aug 19, 2024

Conversation

heypnus
Copy link
Contributor

@heypnus heypnus commented Aug 7, 2024

Workflow

Testing done:

1. check the conditions:
    - lastTransitionTime: "2024-08-14T15:09:39Z"
      status: "True"
      type: GatewayConnectionReady
    - lastTransitionTime: "2024-08-14T15:09:40Z"
      status: "True"
      type: AutoSnatEnabled
2. Clean the conditions, go to "Transit Gateways" view in UI and remove
   "gatewayconnection1" in "External Connection" property, then restart
   the NSX Operator and check the conditions:
    - lastTransitionTime: "2024-08-15T02:42:51Z"
      reason: GatewayConnectionNotSet
      status: "False"
      type: GatewayConnectionReady
    - lastTransitionTime: "2024-08-15T02:42:55Z"
      status: "True"
      type: AutoSnatEnabled
3. Re-add "gatewayconnection1" in "External Connection" for the project transit
   gateway and check the condition GatewayConnectionReady can recover to ready
   after about 60 seconds:
    - lastTransitionTime: "2024-08-15T02:45:00Z"
      status: "True"
      type: GatewayConnectionReady
    - lastTransitionTime: "2024-08-15T02:42:55Z"
      status: "True"
      type: AutoSnatEnabled
4. Clean the conditions, clean the "Edge Clusters" in "Manage Projects" view,
   restart the NSX operator and check the conditions:
    - lastTransitionTime: "2024-08-15T02:49:17Z"
      reason: EdgeMissingInProject
      status: "False"
      type: GatewayConnectionReady
    - lastTransitionTime: "2024-08-15T02:49:19Z"
      status: "True"
      type: AutoSnatEnabled
5. Revert step 4 and update /orgs/default/projects/project-quality/vpc-connectivity-profiles/default
   to remove the service gateway field, then check the conditions:
    - lastTransitionTime: "2024-08-15T02:49:50Z"
      status: "True"
      type: GatewayConnectionReady
    - lastTransitionTime: "2024-08-15T03:01:43Z"
      status: "False"
      type: AutoSnatEnabled
6. Remove "gatewayconnection1" in "External Connection" for
   the transit gateway. Then edit project to change from "gatewayconnection1"
   to "gateway-101" (path: "/infra/distributed-vlan-connections/gateway-101") in
   "External Connection for transit gateway". Add the "gateway-101" in the project
   transit gateway then clean the conditions and restart the NSX operator to
   check them again:
    - lastTransitionTime: "2024-08-15T03:04:04Z"
      reason: DistributedGatewayConnectionNotSupported
      status: "False"
      type: GatewayConnectionReady
    - lastTransitionTime: "2024-08-15T03:04:40Z"
      status: "False"
      type: AutoSnatEnabled

pkg/nsx/services/vpc/vpc.go Outdated Show resolved Hide resolved
pkg/nsx/services/vpc/vpc.go Outdated Show resolved Hide resolved
@heypnus heypnus force-pushed the feature/day0 branch 3 times, most recently from ccbda38 to 3fbf83f Compare August 15, 2024 03:23
@heypnus
Copy link
Contributor Author

heypnus commented Aug 15, 2024

/e2e

zhengxiexie
zhengxiexie previously approved these changes Aug 16, 2024
Copy link
Contributor

@zhengxiexie zhengxiexie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

dantingl
dantingl previously approved these changes Aug 17, 2024
lxiaopei
lxiaopei previously approved these changes Aug 17, 2024
@heypnus heypnus dismissed stale reviews from lxiaopei and dantingl via 02b93ee August 18, 2024 13:40
@heypnus heypnus force-pushed the feature/day0 branch 3 times, most recently from c24177a to ba425f6 Compare August 18, 2024 14:00
@heypnus
Copy link
Contributor Author

heypnus commented Aug 18, 2024

/e2e

@heypnus
Copy link
Contributor Author

heypnus commented Aug 18, 2024

/e2e

1 similar comment
@heypnus
Copy link
Contributor Author

heypnus commented Aug 18, 2024

/e2e

@heypnus heypnus force-pushed the feature/day0 branch 2 times, most recently from e08e156 to 5662da3 Compare August 18, 2024 16:45
@heypnus
Copy link
Contributor Author

heypnus commented Aug 18, 2024

/e2e

…ing reconciling VPC

Testing done:

1. check the conditions:
    - lastTransitionTime: "2024-08-14T15:09:39Z"
      status: "True"
      type: GatewayConnectionReady
    - lastTransitionTime: "2024-08-14T15:09:40Z"
      status: "True"
      type: AutoSnatEnabled
2. Clean the conditions, go to "Transit Gateways" view in UI and remove
   "gatewayconnection1" in "External Connection" property, then restart
   the NSX Operator and check the conditions:
    - lastTransitionTime: "2024-08-15T02:42:51Z"
      reason: GatewayConnectionNotSet
      status: "False"
      type: GatewayConnectionReady
    - lastTransitionTime: "2024-08-15T02:42:55Z"
      status: "True"
      type: AutoSnatEnabled
3. Re-add "gatewayconnection1" in "External Connection" for the project transit
   gateway and check the condition GatewayConnectionReady can recover to ready
   after about 60 seconds:
    - lastTransitionTime: "2024-08-15T02:45:00Z"
      status: "True"
      type: GatewayConnectionReady
    - lastTransitionTime: "2024-08-15T02:42:55Z"
      status: "True"
      type: AutoSnatEnabled
4. Clean the conditions, clean the "Edge Clusters" in "Manage Projects" view,
   restart the NSX operator and check the conditions:
    - lastTransitionTime: "2024-08-15T02:49:17Z"
      reason: EdgeMissingInProject
      status: "False"
      type: GatewayConnectionReady
    - lastTransitionTime: "2024-08-15T02:49:19Z"
      status: "True"
      type: AutoSnatEnabled
5. Revert step 4 and update /orgs/default/projects/project-quality/vpc-connectivity-profiles/default
   to remove the service gateway field, then check the conditions:
    - lastTransitionTime: "2024-08-15T02:49:50Z"
      status: "True"
      type: GatewayConnectionReady
    - lastTransitionTime: "2024-08-15T03:01:43Z"
      status: "False"
      type: AutoSnatEnabled
6. Remove "gatewayconnection1" in "External Connection" for
   the transit gateway. Then edit project to change from "gatewayconnection1"
   to "gateway-101" (path: "/infra/distributed-vlan-connections/gateway-101") in
   "External Connection for transit gateway". Add the "gateway-101" in the project
   transit gateway then clean the conditions and restart the NSX operator to
   check them again:
    - lastTransitionTime: "2024-08-15T03:04:04Z"
      reason: DistributedGatewayConnectionNotSupported
      status: "False"
      type: GatewayConnectionReady
    - lastTransitionTime: "2024-08-15T03:04:40Z"
      status: "False"
      type: AutoSnatEnabled
@heypnus heypnus merged commit 19e5011 into vmware-tanzu:main Aug 19, 2024
2 checks passed
updateFail(r, &ctx, obj, &err, r.Client, nil)
return common.ResultRequeueAfter10sec, err
}
vpcNetworkConfiguration := &v1alpha1.VPCNetworkConfiguration{}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#730 related

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants