-
Notifications
You must be signed in to change notification settings - Fork 72
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
Support the retirement of VM provisioned by OVF service template #684
Conversation
@lfu I'm not very familiar with this type of tagging so I'd like @tinaafitz to approve, can you point me to where this is done for standard vm provisioning? |
Hi @agrare, The out-of-the-box behavior for VM retirement is to only remove VM's from the provider if:
Here's a code snippet from the remove_from_provider Automate code: Any VM's that do not meet the above criteria will be powered off and marked as retired. There's a built policy that prevents a retired VM from starting, or powers it off if it's powered on. (I don't remember the exact policy details.) The VM's in the OVF Service were not getting removed from the provider because they were provisioned by a generic Service, so they don't have an miq_provision object. We don't normally automatically tag VMs with the lifecycle retire_full tag, but it seems like a reasonable way forward as long as we add a notification that we tagged the VM because we knew it was created by the OVF Service and we consider it "provisioned by us". Let me know if you have any questions or would like to discuss it further. |
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.
Hi @agrare,
The out-of-the-box behavior for VM retirement is to only remove VM's from the provider if:
- They're provisioned by us, or
- They're tagged with lifecycle retire_full
Here's a code snippet from the remove_from_provider Automate code:
remove_from_disk if @vm.miq_provision || @vm.tagged_with?(category, tag)
Any VM's that do not meet the above criteria will be powered off and marked as retired. There's a built policy that prevents a retired VM from starting, or powers it off if it's powered on. (I don't remember the exact policy details.)
The VM's in the OVF Service were not getting removed from the provider because they were provisioned by a generic Service, so they don't have an miq_provision object. We don't normally automatically tag VMs with the lifecycle retire_full tag, but it seems like a reasonable way forward as long as we add a notification that we tagged the VM because we knew it was created by the OVF Service and we consider it "provisioned by us".
I saw that Lucy is generating an AuditEvent. It might help to add a notification that the lifecycle tag was added.
Let me know if you have any questions or would like to discuss it further.
@tinaafitz Thanks for the explanation.
I don't think we'll need both of them. Do you prefer |
Hi @lfu, I agree we don't need both notifications. I prefer |
Tag the VM provisioned by OVF service template to enable the retirement in the future. https://github.ibm.com/IBMPrivateCloud/CP4MCM/issues/16312
1ac9020
to
6d04930
Compare
Checked commit lfu@6d04930 with ruby 2.6.3, rubocop 0.82.0, haml-lint 0.35.0, and yamllint |
Support the retirement of VM provisioned by OVF service template (cherry picked from commit 66ee8d0)
Kasparov backport details:
|
Tag the VM provisioned by OVF service template to enable the retirement in the future.
https://github.ibm.com/IBMPrivateCloud/CP4MCM/issues/16312
cc @tinaafitz