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

CORS-2604: tag user-provided azure vnet #7611

Merged
merged 8 commits into from Nov 24, 2023

Conversation

flavianmissi
Copy link
Member

@flavianmissi flavianmissi commented Oct 19, 2023

Looks like tagging subnets in Azure is not supported (launch reference):

level=error
level=error msg=Error: Unsupported argument
level=error
level=error msg=  on vnet.tf line 26, in resource "azurerm_subnet" "master_subnet":
level=error msg=  26:   tags                 = "${var.cluster_id}-master-subnet"
level=error
level=error msg=An argument named "tags" is not expected here.
level=error
level=error msg=Error: Unsupported argument
level=error
level=error msg=  on vnet.tf line 39, in resource "azurerm_subnet" "worker_subnet":
level=error msg=  39:   tags                 = "${var.cluster_id}-worker-subnet"
level=error
level=error msg=An argument named "tags" is not expected here.
panic: runtime error: invalid memory address or nil pointer dereference 

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 19, 2023
@flavianmissi
Copy link
Member Author

/test e2e-azurestack

@flavianmissi flavianmissi changed the title WIP: tag azure vnet and subnet WIP: CORS-2604: tag azure vnet and subnet Oct 30, 2023
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Oct 30, 2023
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Oct 30, 2023

@flavianmissi: This pull request references CORS-2604 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target either version "4.15." or "openshift-4.15.", but it targets "openshift-4.14" instead.

In response to this:

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.

@flavianmissi flavianmissi changed the title WIP: CORS-2604: tag azure vnet and subnet WIP: CORS-2604: tag azure vnet Oct 30, 2023
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Oct 30, 2023

@flavianmissi: This pull request references CORS-2604 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target either version "4.15." or "openshift-4.15.", but it targets "openshift-4.14" instead.

In response to this:

Looks like tagging subnets in Azure is not supported.

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.

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Oct 30, 2023

@flavianmissi: This pull request references CORS-2604 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target either version "4.15." or "openshift-4.15.", but it targets "openshift-4.14" instead.

In response to this:

Looks like tagging subnets in Azure is not supported (launch reference):

level=error
level=error msg=Error: Unsupported argument
level=error
level=error msg=  on vnet.tf line 26, in resource "azurerm_subnet" "master_subnet":
level=error msg=  26:   tags                 = "${var.cluster_id}-master-subnet"
level=error
level=error msg=An argument named "tags" is not expected here.
level=error
level=error msg=Error: Unsupported argument
level=error
level=error msg=  on vnet.tf line 39, in resource "azurerm_subnet" "worker_subnet":
level=error msg=  39:   tags                 = "${var.cluster_id}-worker-subnet"
level=error
level=error msg=An argument named "tags" is not expected here.
panic: runtime error: invalid memory address or nil pointer dereference 

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.

@patrickdillon
Copy link
Contributor

Installer-created vnets are already tagged with the owned value

tags = merge(
{
"kubernetes.io_cluster.${var.cluster_id}" = "owned"
},
var.azure_extra_tags,
)

I think what the installer is missing, is tagging user provided vnets.

We do it in AWS here:
https://github.com/openshift/installer/blob/361c6aaa6667c48d6effbc66e369c47a8ff34378/pkg/asset/cluster/aws/aws.go#L36C16-L42

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 6, 2023
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 6, 2023
@flavianmissi
Copy link
Member Author

I have not tested the code here yet - I'm actually not sure how.
@patrickdillon are there any automated tests that cover the PreTerraform functionality, e2e or otherwise?

@patrickdillon
Copy link
Contributor

I have not tested the code here yet - I'm actually not sure how. @patrickdillon are there any automated tests that cover the PreTerraform functionality, e2e or otherwise?

e2e-azure-ovn-shared-vpc should be the one.

@flavianmissi
Copy link
Member Author

/test golint

@flavianmissi
Copy link
Member Author

/retest

@flavianmissi
Copy link
Member Author

/test okd-e2e-aws-ovn-upgrade

@flavianmissi flavianmissi changed the title WIP: CORS-2604: tag azure vnet CORS-2604: tag shared azure vnet Nov 8, 2023
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 8, 2023
@flavianmissi flavianmissi changed the title CORS-2604: tag shared azure vnet CORS-2604: tag user-provided azure vnet Nov 8, 2023
@flavianmissi
Copy link
Member Author

/test e2e-azurestack

@patrickdillon
Copy link
Contributor

/test e2e-azurestack

azurestack e2e is permafailing. Installs are working, but some of the e2e tests for non-installer related reasons.

Copy link
Contributor

@r4f4 r4f4 left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Nov 22, 2023
@jhixson74
Copy link
Member

/lgtm

@jhixson74
Copy link
Member

/test e2e-azure-ovn
/test e2e-azure-oven-shared-vpc

@r4f4
Copy link
Contributor

r4f4 commented Nov 23, 2023

azure-ovn-shared-vpc:

  • during install:
time="2023-11-22T16:59:29Z" level=debug msg="Tagging do-not-delete-shared-vnet-eastus with kubernetes.io_cluster.ci-op-p5pppcf3-51d74-674fk: shared"
  • during destroy:
time="2023-11-22T19:14:45Z" level=debug msg="removing shared tag from resource \"do-not-delete-shared-vnet-eastus\"" resource=do-not-delete-shared-vnet-eastus type=microsoft.network/virtualnetworks
time="2023-11-22T19:14:46Z" level=info msg="removed shared tag" resource=do-not-delete-shared-vnet-eastus type=microsoft.network/virtualnetworks

/approve

Copy link
Contributor

openshift-ci bot commented Nov 23, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: r4f4

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 Nov 23, 2023
@flavianmissi
Copy link
Member Author

/retest

@r4f4
Copy link
Contributor

r4f4 commented Nov 23, 2023

/skip

@r4f4
Copy link
Contributor

r4f4 commented Nov 23, 2023

/label acknowledge-critical-fixes-only

@openshift-ci openshift-ci bot added the acknowledge-critical-fixes-only Indicates if the issuer of the label is OK with the policy. label Nov 23, 2023
@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD e2d6013 and 2 for PR HEAD ca2d65e in total

Copy link
Contributor

openshift-ci bot commented Nov 24, 2023

@flavianmissi: 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/altinfra-e2e-aws-ovn-upi 2fd4061 link true /test altinfra-e2e-aws-ovn-upi
ci/prow/okd-e2e-aws-ovn-upgrade ca2d65e link false /test okd-e2e-aws-ovn-upgrade
ci/prow/e2e-azurestack ca2d65e link false /test e2e-azurestack

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-merge-bot openshift-merge-bot bot merged commit 1488a19 into openshift:master Nov 24, 2023
25 checks passed
@openshift-bot
Copy link
Contributor

[ART PR BUILD NOTIFIER]

This PR has been included in build ose-installer-altinfra-container-v4.15.0-202311240233.p0.g1488a19.assembly.stream for distgit ose-installer-altinfra.
All builds following this will include this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
acknowledge-critical-fixes-only Indicates if the issuer of the label is OK with the policy. approved Indicates a PR has been approved by an approver from all required OWNERS files. 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

7 participants