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

oVirt: remove tmp template VM on bootstrap destroy phase #3949

Conversation

Gal-Zaidman
Copy link
Contributor

@Gal-Zaidman Gal-Zaidman commented Jul 23, 2020

This patch breaks the dependency between terraform resources:
releaseimage_template and tmp_import_vm

On ovirt before the bootstrap, masters and workers start they need to be created from a template.
The installer creates this template with the terraform template module.
As part of the process for creating the template, we create an oVirt tmp VM which should be sealed into a template for the bootstrap, masters and workers machines and then removed.
Until this PR the tmp VM will just stay in the oVirt cluster until cluster destroy is called, this is not good because it is just garbage in the oVirt cluster that the user will probably remove on its own once the installation is complete.
This PR makes bootstrap destroy command to destroy the tmp VM as well, which makes sense because it is created for bootstrapping the cluster.

Signed-off-by: Gal-Zaidman gzaidman@redhat.com

@Gal-Zaidman Gal-Zaidman changed the title oVirt: remove tmp template VM on bootstrap phase oVirt: remove tmp template VM on bootstrap destroy phase Jul 23, 2020
@dougsland
Copy link
Contributor

nice patch @Gal-Zaidman

@dougsland
Copy link
Contributor

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 23, 2020
@dougsland
Copy link
Contributor

verified locally as well. Worked like a charm, waiting oVirt CI pass for merge.

@dougsland
Copy link
Contributor

@openshift-ci-robot
ci/prow/e2e-ovirt — Job succeeded.

@dougsland
Copy link
Contributor

/approve

@dougsland
Copy link
Contributor

/assign @abhinavdahiya

@abhinavdahiya
Copy link
Contributor

I do not understand why you need to do this?

Can you please explain why you need additional step in deleting bootstrap.. outside of just deleting the bootstrap module

@Gal-Zaidman
Copy link
Contributor Author

Can you please explain why you need additional step in deleting bootstrap.. outside of just deleting the bootstrap module

Sure, On ovirt before the bootstrap, masters and workers start they need to be created from a template.
The installer creates this template with the terraform template module.
As part of the process for creating the template, we create an oVirt tmp VM which should be sealed into a template for the bootstrap, masters and workers machines and then removed.
Until this PR the tmp VM will just stay in the oVirt cluster until cluster destroy is called, this is not good because it is just garbage in the oVirt cluster that the user will probably remove on its own once the installation is complete.
This PR makes bootstrap destroy command to destroy the tmp VM as well, which make sense because it is created for bootstrapping the cluster.

@Gal-Zaidman Gal-Zaidman force-pushed the remove-tmp-template-vm-datasource branch from 6f26961 to 3c59625 Compare July 26, 2020 08:02
@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Jul 26, 2020
@abhinavdahiya
Copy link
Contributor

#3949 (comment)

Let's make sure this ends up in the commit message and PR description.

Secondly, other platforms that need it using a variable to provide the API so that this is not tied to resource name like it is right now but more to an API provided by the tf templates.

This patch breaks the dependency between terraform resources:
releaseimage_template and tmp_import_vm

On ovirt before the bootstrap, masters and workers start they need to be created from a template.
The installer creates this template with the terraform template module.
As part of the process for creating the template, we create an oVirt tmp VM which should be sealed into a template for the bootstrap, masters and workers machines and then removed.
Until this PR the tmp VM will just stay in the oVirt cluster until cluster destroy is called, this is not good because it is just garbage in the oVirt cluster that the user will probably remove on its own once the installation is complete.
This PR makes bootstrap destroy command to destroy the tmp VM as well, which make sense because it is created for bootstrapping the cluster.

Signed-off-by: Gal-Zaidman <gzaidman@redhat.com>
@Gal-Zaidman Gal-Zaidman force-pushed the remove-tmp-template-vm-datasource branch from 3c59625 to 79c7425 Compare July 30, 2020 06:56
@Gal-Zaidman
Copy link
Contributor Author

#3949 (comment)

Let's make sure this ends up in the commit message and PR description.

Edited the commit message and the PR description

Secondly, other platforms that need it using a variable to provide the API so that this is not tied to resource name like it is right now but more to an API provided by the tf templates.

I guess we can do something similar in the future but for now, I think this PR fixes the issue according to our implementation.
We can open a Jira card to track that refactoring and put it in our backlog

@Gal-Zaidman
Copy link
Contributor Author

/retest

@rgolangh
Copy link
Contributor

/lgtm

@abhinavdahiya is there a better way other than the usage of data definition to to decouple this?

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 30, 2020
@abhinavdahiya
Copy link
Contributor

/approve

@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: abhinavdahiya, dougsland

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-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 5, 2020
@openshift-bot
Copy link
Contributor

/retest

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

1 similar comment
@openshift-bot
Copy link
Contributor

/retest

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

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Aug 5, 2020

@Gal-Zaidman: The following test failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
ci/prow/e2e-metal-ipi 79c7425 link /test e2e-metal-ipi

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-robot openshift-merge-robot merged commit 4249d90 into openshift:master Aug 5, 2020
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

7 participants