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

Azure Stack Bootstrap Destroy Bug #5443

Merged

Conversation

patrickdillon
Copy link
Contributor

There was a bug where the wrong platform name was being set for Azure Stack Hub bootstrap destroy.

@rna-afk
Copy link
Contributor

rna-afk commented Dec 2, 2021

/lgtm
I'm now wondering how my bootstrap destroy code fix was working :(

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Dec 2, 2021
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Dec 2, 2021
@squidboylan
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Dec 2, 2021
@patrickdillon
Copy link
Contributor Author

Doh. I'm deleting my previous comment about this not working. My test was wrong. Hopefully you missed my incorrect comment.

// tfvars file is still terraform.azure.auto.tfvars.json in the case of Azure Stack.
if platform == typesazure.Name && metadata.Azure.CloudName == typesazure.StackCloud {
platform = "azurestack"
platform = typesazure.StackCloud.Name()
Copy link
Contributor

@staebler staebler Dec 3, 2021

Choose a reason for hiding this comment

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

I don't think that this is the best solution. We put the tf files under data/data/azurestack, so we call the platform "azurestack" in the stages.

stages.NewStage(azurestack, "vnet"),
stages.NewStage(azurestack, "bootstrap", stages.WithNormalDestroy()),
stages.NewStage(azurestack, "cluster"),

So I think we should call the platform "azurestack" here as well, for consistency. We should instead change the following line to "azurestack".
case azuretypes.StackCloud.Name():

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@staebler, your point makes sense. I ended up going a bit further and eliminated the use of the "azurestack" magic string. IMHO, it is better to nip this in the bud and clean it up now (mess I introduced); but if you think this is overkill let me know.

@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Dec 8, 2021
@patrickdillon patrickdillon force-pushed the azurestack-destroy-bug branch 2 times, most recently from ea768d5 to 2e09f53 Compare December 9, 2021 15:43
@patrickdillon
Copy link
Contributor Author

/retest

pkg/asset/cluster/cluster.go Outdated Show resolved Hide resolved
pkg/terraform/stages/azure/stages.go Outdated Show resolved Hide resolved
pkg/types/azure/doc.go Outdated Show resolved Hide resolved
@@ -41,7 +41,7 @@ func Destroy(dir string) (err error) {
// Set platform to azurestack after setting tfPlatformVarsFileName, because the
// tfvars file is still terraform.azure.auto.tfvars.json in the case of Azure Stack.
Copy link
Contributor

Choose a reason for hiding this comment

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

Not for this PR, but we should consider whether there is any benefit in using a different name for the tfvars file for each platform. We never have tfvars for multiple platforms simultaneously, so we could just always use the name terraform.platform.auto.tfvars.json for the file.

Copy link
Contributor

Choose a reason for hiding this comment

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

Removes the use of the "azurestack" magic string and replaces it
with a constant in the Azure Stack type package. Revise the generation
of both Azure and Azure Stack stages accordingly.
@patrickdillon
Copy link
Contributor Author

Updated. Ready for review.

Copy link
Contributor

@staebler staebler left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Dec 10, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 10, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: staebler

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 Dec 10, 2021
@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

18 similar comments
@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@patrickdillon
Copy link
Contributor Author

/skip

@openshift-merge-robot openshift-merge-robot merged commit 3c98b1f into openshift:master Dec 11, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 11, 2021

@patrickdillon: 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-aws-single-node a237ef3 link false /test e2e-aws-single-node
ci/prow/e2e-aws-fips a237ef3 link false /test e2e-aws-fips
ci/prow/e2e-crc a237ef3 link false /test e2e-crc
ci/prow/e2e-aws-workers-rhel8 a237ef3 link false /test e2e-aws-workers-rhel8
ci/prow/e2e-libvirt a237ef3 link false /test e2e-libvirt

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.

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

6 participants