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

Start VMs in normal mode instead of run_once #147

Closed
wants to merge 1 commit into from

Conversation

mika-b
Copy link
Contributor

@mika-b mika-b commented Apr 27, 2021

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

Copy link
Owner

@myoung34 myoung34 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use cases are good for creating templates etc

If you can wrap it into the config with a default of false im happy to merge it asap

ovirt.run_once = true in the config,

          vm_configuration = {
            initialization: initialization,
            placement_policy: {},
            run_once: config.run_once,
          }

then attr_accessor :run_once all that in vagrant-ovirt4/config.rb

@mika-b
Copy link
Contributor Author

mika-b commented Apr 28, 2021

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.

@myoung34
Copy link
Owner

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

@mika-b
Copy link
Contributor Author

mika-b commented Apr 30, 2021

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.

@jeremytourville
Copy link

@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

@myoung34
Copy link
Owner

I'm ok to merge this if my suggestions to make it configurable are made

@cliffe
Copy link
Contributor

cliffe commented Jun 11, 2021

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.

@jeremytourville
Copy link

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.

@cliffe
Copy link
Contributor

cliffe commented Jun 11, 2021

We are on the current release.

@tomeon
Copy link
Contributor

tomeon commented Apr 1, 2022

Popping in to note that #160 supersedes this PR.

@myoung34
Copy link
Owner

myoung34 commented Apr 4, 2022

@tomeon if you can rebase I'll cut this into a release

@tomeon
Copy link
Contributor

tomeon commented Apr 13, 2022

@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.

@myoung34 myoung34 closed this Apr 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature request: Start vm's in normal, not in runonce mode
5 participants