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
Azure Stack Bootstrap Destroy Bug #5443
Conversation
/lgtm |
d75a2db
to
f450524
Compare
/lgtm |
Doh. I'm deleting my previous comment about this not working. My test was wrong. Hopefully you missed my incorrect comment. |
pkg/destroy/bootstrap/bootstrap.go
Outdated
// 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() |
There was a problem hiding this comment.
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.
installer/pkg/terraform/stages/azure/stages.go
Lines 20 to 22 in ec1c830
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(): |
There was a problem hiding this comment.
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.
f450524
to
194b9c2
Compare
ea768d5
to
2e09f53
Compare
/retest |
@@ -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. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
2e09f53
to
a237ef3
Compare
Updated. Ready for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve
[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 |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
18 similar comments
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/skip |
@patrickdillon: The following tests failed, say
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. |
There was a bug where the wrong platform name was being set for Azure Stack Hub bootstrap destroy.