Closed mika-b closed 2 years ago
I think I need to look more into this.
The original issue I had was that things configured with cloud-init disappeared when guests were shutdown and later restarted. Setting run_once false seemed to fix it. Now I'm unable to reproduce the issue and run_once doesn't seem to have any effect at all. Rebasing and rebuilding changed ovirt-engine-sdk from 4.0 to 4.4 (and I'm using ovirt 4.3) that could effect something.
Ansible has a setting 'cloud_init_persists' don't know how that's implemented but sounds familiar regarding the issue I had.
I don't mind this being postponed to some future release if you're about to make one now.
For your question, im not familiar with the ovirt ansible plugin but a quick search turned up this which looks like a bool to set run_once as true or false, so same idea as here by a different name
That's basically what I tried to say. Your link is to the source format of the documentation I linked in my previous comment. :) I wasn't actually asking anything about it.
The thing is that even when I set run_once: false
the configuration on oVirt side claims:
<run_once>true</run_once>
In the original bug report the description of the issue seems a bit off. At least on oVirt 4.3 the exclamation mark is shown when guest agent hasn't responded yet or is not even installed. It's actually the blue circle that indicates the run once mode.
Since I can't reproduce the issue of disappearing configuration I don't see much to gain here.
@myoung34 @cliffe @mika-b
A general comment - I too have been having issues with the run once config for the ovirt plugin. I am using the SecGen project. When I run vagrant up the VMs are starting in run once config. This causes the scenario for SecGen to never finish as it waits for the VM to be ready/available.
oVirt Open Virtualization Manager Software Version:4.4.2.6-1.el8
I'm ok to merge this if my suggestions to make it configurable are made
Just FYI, we've not seen this issue with SecGen in our own oVirt infrastructure. Having said that we don't really make use of cloud-init, so maybe that's why.
Just FYI, we've not seen this issue with SecGen in our own oVirt infrastructure. Having said that we don't really make use of cloud-init, so maybe that's why.
I'm not using cloud-init either. What version of oVirt are you running? I think that might be the common issue.
We are on the current release.
Popping in to note that #160 supersedes this PR.
@tomeon if you can rebase I'll cut this into a release
@myoung34
[I]f you can rebase I'll cut this into a release
PR #147 is no longer needed, now that #160 is merged (#160 covers everything in this PR, and also provides the configurability you requested). IMO this PR can be closed.
I can't think of any viable use case where run_once mode would be useful with vagrant. This causes VMs to be created in normal mode. I can make it configurable if it's preferred or there's a use case for it. Doesn't affect cloud-init.
Fixes #127
https://www.rubydoc.info/gems/ovirt-engine-sdk/OvirtSDK4/Vm#run_once=-instance_method