sumaform icon indicating copy to clipboard operation
sumaform copied to clipboard

Update `terraform-libvirt-provider`

Open rjmateus opened this issue 3 years ago • 20 comments

We have to wait until the submissions of 4.3.1 before merging.

This PR will only be merged after agreement with QA team, since it can temporarily crash all test environments.

What does this PR change?

Updates sumaform to use terraform loibvirt provider latest provider from terraform registry. We will be using the upstream provider since all patches were included in the latest released version. We will keep the repository and provider for uyuni in case we need to add another patch in the future.

When this PR is merged, we need to:

  • Send email to the mailing list
  • Adapt CI terraform files to cope with the change: https://github.com/SUSE/susemanager-ci/pull/432
  • Clean CI environment to cope with the changes
  • Remove package from all our CI worker machines.
  • Update the terraform-provider-libvirt/terraform together with that in the OBS if necessary/wanted

How to upgrade

  • Un-install the provider's package zypper rm terraform-provider-libvirt
  • In you main.tf, change the provider version to 0.6.14
  • If you want to keep the same state file, see keeping state file. Otherwise just clan the environment and remove the terraform.tfstate, .terraform.lock.hcl and .terraform
  • Run terraform init

Keeping state file

  • Open theterraform.tfstate
  • Search for all cpu keys. The value should now be an array of objects. To change it just surround the existing content with square brackets ([ {....} ] )
  • Run terraform init -upgrade

rjmateus avatar Dec 27 '21 13:12 rjmateus

@juliogonzalez we need to remove because the way the plugin is provided will change. With version 0.6.3 it was provided by a package built by us on OBS. For version 0.6.12 we are relying on the terraform registry service and getting the provider directly from the official location.

When this PR is merged, we need to:

  • Send email to mailing list
  • Adapte CI terraform files to cope with the cahnge (PR already opened)
  • Clean CI environment to cope with the changes
  • Remove package from al lour CI worker machines.

rjmateus avatar Jan 10 '22 15:01 rjmateus

@juliogonzalez we need to remove because the way the plugin is provided will change. With version 0.6.3 it was provided by a package built by us on OBS. For version 0.6.12 we are relying on the terraform registry service and getting the provider directly from the official location.

100% correct. I didn't remember we were working on this before the holidays :-D

When this PR is merged, we need to:

  • Send email to mailing list
  • Adapte CI terraform files to cope with the cahnge (PR already opened)
  • Clean CI environment to cope with the changes
  • Remove package from al lour CI worker machines.

PR LGTM. I am approving now. Feel free to merge as soon as QE is happy about it.

juliogonzalez avatar Jan 10 '22 15:01 juliogonzalez

As per https://github.com/uyuni-project/sumaform/pull/1017#issuecomment-1031422221 we should update this once again if we don't want to get trouble with our SSH Servers.

SchoolGuy avatar Feb 07 '22 12:02 SchoolGuy

Some more context here: https://github.com/dmacvicar/terraform-provider-libvirt/issues/916 (provieded by @nodeg )

Background: The current provider will not work with an updated ssh (from version 8.8) and machines will not be accessible.

nkrinner avatar Feb 11 '22 10:02 nkrinner

@nkrinner I updated the PR to use the latest version of the provider (0.6.14), which should solve this problem according to the release notes [1]. Now I would say that we can merge as soon as QA gives the OK to merge it. I can prepare the release e-mail with the steps for all stakeholders to get a working sumaform with these changes.

[1] https://github.com/dmacvicar/terraform-provider-libvirt/releases/tag/v0.6.14

rjmateus avatar Feb 11 '22 12:02 rjmateus

Sorry to be that bad guy, but I think that starting Beta submissions, it might not be the right moment for risky changes or big refactors, I would wait until we release 4.3

srbarrios avatar Feb 18 '22 10:02 srbarrios

Since 4.3 FCS is coming soon, we can give this another try after it. I found https://github.com/dmacvicar/terraform-provider-libvirt/issues/939 which seems a regression of 0.6.14. I have not tried it myself but if we find the same issues we should switch to 0.6.13 instead of 0.6.14.

nodeg avatar Jun 10 '22 09:06 nodeg

Since 4.3 FCS is coming soon, we can give this another try. I found dmacvicar/terraform-provider-libvirt#939 which seems a regression of 0.6.14. I have not tried it myself but if we find the same issues we should switch to 0.6.13 instead of 0.6.14.

After FCS 👍🏼

srbarrios avatar Jun 10 '22 09:06 srbarrios

The SUMA kick off is nearly over. What about doing this next week?

nodeg avatar Jul 15 '22 11:07 nodeg

@rjmateus Could you update https://github.com/SUSE/susemanager-ci/pull/432 to be up to date with this one?

nodeg avatar Jul 20 '22 12:07 nodeg

@nodeg CI PR is updated. We can merge it. I would recommend do it on monday, so we can react on any problem.

rjmateus avatar Jul 22 '22 12:07 rjmateus

Thanks @rjmateus Sorry, I missed this notification until now. I just saw we need the updated package in systemsmanagement/sumaform in the OBS. There is still the old 0.6.3 version there. @juliogonzalez we should update the version there, too before merging this.

nodeg avatar Jul 27 '22 07:07 nodeg

Ok so in our QE retro we discussed that we have to wait until the submissions of 4.3.1 before merging.

nodeg avatar Jul 27 '22 07:07 nodeg

Ok so in our QE retro we discussed that we have to wait until the submissions of 4.3.1 before merging.

Feel free to merge it now. We can revert if it cause any trouble.

srbarrios avatar Nov 30 '22 07:11 srbarrios

We should consider updating directly to 0.7.0 which was released in October.

nodeg avatar Nov 30 '22 08:11 nodeg

agree with @nodeg we should update to the latest. After merge we should solve the problems and not revert it

rjmateus avatar Nov 30 '22 10:11 rjmateus

Thank you @rjmateus I agree, after merging we should solve potential issues and not just revert. If you need help, let me know.

nodeg avatar Dec 01 '22 09:12 nodeg

agree with @nodeg we should update to the latest. After merge we should solve the problems and not revert it

Sure. But please be sure you reserve time to fix it with urgency if it fails, avoid merging if you will not have time or you will be away.

srbarrios avatar Dec 01 '22 09:12 srbarrios

But I would suggest first try to run this with the on-PR testsuite. You can change nearly everything in that job and point to branches of susemanager-ci, terraform, sumaform, etc. You should be able to give it a try there first.

mcalmer avatar Dec 01 '22 10:12 mcalmer

Hey just a reminder that this needs some adjusting and testing again on PR testsuites. It would be the right time to merge these changes in the year otherwise we might delay it until next year again

ktsamis avatar Jan 10 '23 08:01 ktsamis