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

OCPBUGS-9404: azure: skip LB creation when not needed #7063

Merged
merged 1 commit into from Jul 12, 2023

Conversation

r4f4
Copy link
Contributor

@r4f4 r4f4 commented Apr 4, 2023

When one creates an IPI Azure cluster with an internal publishing method, it creates a standard load balancer with an empty definition. This load balancer doesn't serve a purpose since the configuration is completely empty. Because it doesn't have a public IP address and backend pools it's not providing any outbound connectivity, and there are no frontend IP configurations for ingress connectivity to the cluster.

@openshift-ci-robot openshift-ci-robot added jira/severity-low Referenced Jira bug's severity is low for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Apr 4, 2023
@openshift-ci-robot
Copy link
Contributor

@r4f4: This pull request references Jira Issue OCPBUGS-9404, which is invalid:

  • expected the bug to target the "4.14.0" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

When one creates an IPI Azure cluster with an internal publishing method, it creates a standard load balancer with an empty definition. This load balancer doesn't serve a purpose since the configuration is completely empty. Because it doesn't have a public IP address and backend pools it's not providing any outbound connectivity, and there are no frontend IP configurations for ingress connectivity to the cluster.

Instructions 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.

@r4f4
Copy link
Contributor Author

r4f4 commented Apr 4, 2023

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Apr 4, 2023
@openshift-ci-robot
Copy link
Contributor

@r4f4: This pull request references Jira Issue OCPBUGS-9404, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.14.0) matches configured target version for branch (4.14.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @jinyunma

In response to this:

/jira refresh

Instructions 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.

@r4f4
Copy link
Contributor Author

r4f4 commented Apr 4, 2023

/hold
Needs #7064 for the CI jobs to run.

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 4, 2023
@zaneb
Copy link
Member

zaneb commented Apr 5, 2023

/retest
/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 5, 2023
Copy link
Contributor

@patrickdillon patrickdillon left a comment

Choose a reason for hiding this comment

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

When one creates an IPI Azure cluster with an internal publishing method, it creates a standard load balancer with an empty definition. This load balancer doesn't serve a purpose since the configuration is completely empty. Because it doesn't have a public IP address and backend pools it's not providing any outbound connectivity, and there are no frontend IP configurations for ingress connectivity to the cluster.

It looks like the way we provide outbound connectivity to VMs when the install is private and not using user-defined routing, is by attaching an outbound rule to the load balancer:

resource "azurerm_lb_outbound_rule" "public_lb_outbound_rule_v4" {
count = var.use_ipv4 && var.azure_private && ! var.azure_outbound_user_defined_routing ? 1 : 0
name = "outbound-rule-v4"
loadbalancer_id = azurerm_lb.public.id
backend_address_pool_id = azurerm_lb_backend_address_pool.public_lb_pool_v4[0].id
protocol = "All"
frontend_ip_configuration {
name = local.public_lb_frontend_ip_v4_configuration_name
}
}

Which leaves me with the question: how are VMs getting outbound connectivity in this scenario?

I was under the impression that we could only remove the LB if using user-defined routing.

data/data/azure/vnet/public-lb.tf Show resolved Hide resolved
@patrickdillon
Copy link
Contributor

We don't have any CI testing that performs a private install. I am floating openshift/release#38408 as an option. Have you done any local testing of this? I'm not sure what the expectations are for the cloud provider.

@r4f4
Copy link
Contributor Author

r4f4 commented Apr 17, 2023

We don't have any CI testing that performs a private install. I am floating openshift/release#38408 as an option. Have you done any local testing of this? I'm not sure what the expectations are for the cloud provider.

It was pre-merge tested by @jinyunma before I addressed your comments. I haven't found the time to retest it yet after the update.

@patrickdillon
Copy link
Contributor

We don't have any CI testing that performs a private install. I am floating openshift/release#38408 as an option. Have you done any local testing of this? I'm not sure what the expectations are for the cloud provider.

It was pre-merge tested by @jinyunma before I addressed your comments. I haven't found the time to retest it yet after the update.

Excellent! And sorry I missed that pre-merge testing in the bug. I'm not concerned about testing the recent update. Thank you!

@patrickdillon
Copy link
Contributor

@jinyunma Thanks for doing the pre-merge testing on this. I see that the testing was done with user-defined routing. That makes sense and it seems like we should be able to remove the LB in that case.

Are you able to test without user-defined routing? I believe in that case we still need to keep the LB, because the installer applies it's own rule to enable outbound internet access. If the install succeeds with the current changes, we want to double check to make sure Azure is not enabling default outbound access.

@jinyunma
Copy link
Contributor

That makes sense and it seems like we should be able to remove the LB in that case.

yes, external LB is removed on fully private cluster (fully private cluster ( publish: Internal + outboundType: UserDefinedRouting), and no function impact.

Are you able to test without user-defined routing? I believe in that case we still need to keep the LB, because the installer applies it's own rule to enable outbound internet access. If the install succeeds with the current changes, we want to double check to make sure Azure is not enabling default outbound access.

pre-merge testing on the latest update, install private cluster successfully ( publish: Internal wihtout user-defined routing), external LB is created, and outbound rules is explicitly defined, using the frontend IP address of external LB for outbound.

# az network lb list -g jima7673-18b-slv6v-rg -otable
Location    Name                         ProvisioningState    ResourceGroup          ResourceGuid
----------  ---------------------------  -------------------  ---------------------  ------------------------------------
eastus      jima7673-18b-slv6v           Succeeded            jima7673-18b-slv6v-rg  8d5b10d7-9b15-4961-8968-00673ba6de33
eastus      jima7673-18b-slv6v-internal  Succeeded            jima7673-18b-slv6v-rg  a547ee2b-701c-4ada-9048-79df4b31ceac

# az network lb show --name jima7673-18b-slv6v -g jima7673-18b-slv6v-rg --query outboundRules
[
  {
    "allocatedOutboundPorts": 1024,
    "backendAddressPool": {
      "id": "/subscriptions/53b8f551-f0fc-4bea-8cba-6d1fefd54c8a/resourceGroups/jima7673-18b-slv6v-rg/providers/Microsoft.Network/loadBalancers/jima7673-18b-slv6v/backendAddressPools/jima7673-18b-slv6v",
      "resourceGroup": "jima7673-18b-slv6v-rg"
    },
    "enableTcpReset": false,
    "etag": "W/\"5b6a9854-dfa1-4972-999f-3475b70623e2\"",
    "frontendIpConfigurations": [
      {
        "id": "/subscriptions/53b8f551-f0fc-4bea-8cba-6d1fefd54c8a/resourceGroups/jima7673-18b-slv6v-rg/providers/Microsoft.Network/loadBalancers/jima7673-18b-slv6v/frontendIPConfigurations/public-lb-ip-v4",
        "resourceGroup": "jima7673-18b-slv6v-rg"
      }
    ],
    "id": "/subscriptions/53b8f551-f0fc-4bea-8cba-6d1fefd54c8a/resourceGroups/jima7673-18b-slv6v-rg/providers/Microsoft.Network/loadBalancers/jima7673-18b-slv6v/outboundRules/outbound-rule-v4",
    "idleTimeoutInMinutes": 4,
    "name": "outbound-rule-v4",
    "protocol": "All",
    "provisioningState": "Succeeded",
    "resourceGroup": "jima7673-18b-slv6v-rg",
    "type": "Microsoft.Network/loadBalancers/outboundRules"
  }
]

@r4f4
Copy link
Contributor Author

r4f4 commented May 11, 2023

@patrickdillon any other concerns?

@patrickdillon
Copy link
Contributor

/approve

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 22, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: patrickdillon

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 22, 2023
When one creates an IPI Azure cluster with an `internal` publishing
method, it creates a standard load balancer with an empty definition.
This load balancer doesn't serve a purpose since the configuration is
completely empty. Because it doesn't have a public IP address and
backend pools it's not providing any outbound connectivity, and there
are no frontend IP configurations for ingress connectivity to the
cluster.
@r4f4
Copy link
Contributor Author

r4f4 commented Jun 22, 2023

Update: no functional changes, just reusing a tf variable.

@jhixson74
Copy link
Member

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jul 6, 2023
@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD 30838d9 and 2 for PR HEAD 4c9d13d in total

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD a58142c and 1 for PR HEAD 4c9d13d in total

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD f8975eb and 0 for PR HEAD 4c9d13d in total

@openshift-ci-robot
Copy link
Contributor

/hold

Revision 4c9d13d was retested 3 times: holding

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 8, 2023
@r4f4
Copy link
Contributor Author

r4f4 commented Jul 10, 2023

/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 10, 2023
@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD ff1f452 and 2 for PR HEAD 4c9d13d in total

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD 5409f2e and 1 for PR HEAD 4c9d13d in total

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD a4604b0 and 0 for PR HEAD 4c9d13d in total

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 11, 2023

@r4f4: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-azurestack 4c9d13d link false /test e2e-azurestack
ci/prow/e2e-azure-ovn-shared-vpc 4c9d13d link false /test e2e-azure-ovn-shared-vpc

Full PR test history. Your PR dashboard.

Instructions 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.

@openshift-ci-robot
Copy link
Contributor

/hold

Revision 4c9d13d was retested 3 times: holding

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 11, 2023
@r4f4
Copy link
Contributor Author

r4f4 commented Jul 11, 2023

/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 11, 2023
@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD 3bc9b24 and 2 for PR HEAD 4c9d13d in total

@openshift-merge-robot openshift-merge-robot merged commit d3dc62b into openshift:master Jul 12, 2023
21 of 23 checks passed
@openshift-ci-robot
Copy link
Contributor

@r4f4: Jira Issue OCPBUGS-9404: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-9404 has been moved to the MODIFIED state.

In response to this:

When one creates an IPI Azure cluster with an internal publishing method, it creates a standard load balancer with an empty definition. This load balancer doesn't serve a purpose since the configuration is completely empty. Because it doesn't have a public IP address and backend pools it's not providing any outbound connectivity, and there are no frontend IP configurations for ingress connectivity to the cluster.

Instructions 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.

@r4f4
Copy link
Contributor Author

r4f4 commented Jul 12, 2023

/cherry-pick release-4.13

@openshift-cherrypick-robot

@r4f4: new pull request created: #7322

In response to this:

/cherry-pick release-4.13

Instructions 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. jira/severity-low Referenced Jira bug's severity is low for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants