Skip to content

upgrade terraform to 0.14.6#4837

Closed
staebler wants to merge 6 commits intoopenshift:masterfrom
staebler:update_terraform
Closed

upgrade terraform to 0.14.6#4837
staebler wants to merge 6 commits intoopenshift:masterfrom
staebler:update_terraform

Conversation

@staebler
Copy link
Copy Markdown
Contributor

@staebler staebler commented Apr 9, 2021

This updates the installer to use Terraform 0.14.6.

Terraform 0.13.x updated the on-disk layout of the plugins directory, how to access offline plugins, and a lock file used for plugin versions. plugin_versions_generate.go has been added which generates plugin_versions.go. All terraform plugin files the installer uses have been updated to use the plugin version. All terraform config files have been updated to use the local providers. A terraform.rc file has been added to specify where the local providers are.

A temporary vendor path for terraform is in this PR that allows the location of the new plugin version lock file to be overridden. Once I can get everything green it will be added to our local terraform fork.

https://issues.redhat.com/browse/CORS-1520

https://www.terraform.io/docs/language/providers/requirements.html
https://www.terraform.io/docs/language/dependency-lock.html

This brings together the changes from #4729 and #4822.
/cc @jhixson74 @rna-afk

Update terraform-provider-aws to 3.1.0
Update terraform-provider-azure to 2.48.0
Update terraform-provider-google to 3.40.0
Update plugin directory to use new terraform plugin paths. Add environment
variable that sets location of terraform.rc so that local terraform plugins can
be used.

New terraform provider requirements are documented here:

https://www.terraform.io/docs/language/providers/requirements.html
Add terraform.rc and update terraform modules to specify terraform version and
local provider locations.
Terraform 0.13 has a module count feature that can be set to instruct
terraform to create the exact number of copies of the module in the
cloud provider. This feature can be used to control the creation and
deletion of the bootstrap resources needed for cluster.

Adding the count field in all the bootstrap modules of all cloud
providers in order to make it easy to destroy bootstrap after
nodes have been created. This field would also make it easy to
destroy the resources without having to check for the cloud
platform and have a separate destroy logic for each of the platforms.
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please ask for approval from staebler after the PR has been reviewed.

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

Details 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

@staebler
Copy link
Copy Markdown
Contributor Author

staebler commented Apr 9, 2021

/test e2e-gcp
/test e2e-azure

@rna-afk
Copy link
Copy Markdown
Contributor

rna-afk commented Apr 9, 2021

/retest

@rna-afk
Copy link
Copy Markdown
Contributor

rna-afk commented Apr 9, 2021

/test e2e-vsphere
/test e2e-kubevirt

@staebler
Copy link
Copy Markdown
Contributor Author

staebler commented Apr 9, 2021

/test e2e-vsphere

@staebler
Copy link
Copy Markdown
Contributor Author

staebler commented Apr 9, 2021

The ovirt install is failing to delete the template during bootstrap destroy.

�[31mERRO�[0m[2021-04-09T16:14:01Z] level=error msg=Error: Error removing Template (d66bc985-e095-48e5-ad86-4dc29631b719): Fault reason is "Operation Failed". Fault detail is "[Cannot delete Template. Template is being used by the following VMs: *****12-qbkhq-worker-rpgxq.]". HTTP response code is "409". HTTP response message is "409 Conflict". 

@staebler
Copy link
Copy Markdown
Contributor Author

staebler commented Apr 9, 2021

Failures with pip.
/test e2e-kubevirt
/test e2e-vsphere

@rna-afk
Copy link
Copy Markdown
Contributor

rna-afk commented Apr 9, 2021

For the ovirt, I was trying to remove this case statement by adding the boostrapping variable to the components.

@staebler
Copy link
Copy Markdown
Contributor Author

staebler commented Apr 9, 2021

The ovirt install is also deleting the master VMs during bootstrap destroy. Presumably that is because it is deleting the template, which the master VMs depend upon.

time="2021-04-09T15:57:07Z" level=debug msg="module.masters.*****_vm.master[0]: Destroying... [id=ac3a17fe-43b6-4bde-a4bb-01aa3cee4f48]"

With terraform v0.14, deleting the temporary VM cascades to deletes
of the final template and the master VMs, since there are dependencies
between them. For the short-term, do not delete the temporary VM.
@staebler
Copy link
Copy Markdown
Contributor Author

staebler commented Apr 9, 2021

The ovirt install is also deleting the master VMs during bootstrap destroy. Presumably that is because it is deleting the template, which the master VMs depend upon.

time="2021-04-09T15:57:07Z" level=debug msg="module.masters.*****_vm.master[0]: Destroying... [id=ac3a17fe-43b6-4bde-a4bb-01aa3cee4f48]"

I added a commit that retains the temporary template. This is a workaround that I will raise a BZ for the ovirt team to address.

@staebler
Copy link
Copy Markdown
Contributor Author

staebler commented Apr 9, 2021

/test e2e-gcp
/test e2e-azure
/test e2e-kubevirt
/test e2e-vsphere

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Apr 9, 2021

@staebler: The following tests failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
ci/prow/e2e-kubevirt 83c036a link /test e2e-kubevirt
ci/prow/e2e-ovirt 83c036a link /test e2e-ovirt
ci/prow/e2e-aws 83c036a link /test e2e-aws
ci/prow/e2e-aws-workers-rhel7 83c036a link /test e2e-aws-workers-rhel7
ci/prow/e2e-metal-ipi-ovn-ipv6 83c036a link /test e2e-metal-ipi-ovn-ipv6
ci/prow/e2e-azure 83c036a link /test e2e-azure
ci/prow/e2e-vsphere 83c036a link /test e2e-vsphere
ci/prow/e2e-aws-fips 83c036a link /test e2e-aws-fips
ci/prow/e2e-crc 83c036a link /test e2e-crc

Full PR test history. Your PR dashboard.

Details

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 openshift-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 11, 2021
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@staebler: PR needs rebase.

Details

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.

@staebler
Copy link
Copy Markdown
Contributor Author

/close

@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@staebler: Closed this PR.

Details

In response to this:

/close

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

needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants