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

support --no-destroy-on-error for up() #122

Open
eighthave opened this issue Apr 1, 2022 · 5 comments
Open

support --no-destroy-on-error for up() #122

eighthave opened this issue Apr 1, 2022 · 5 comments

Comments

@eighthave
Copy link
Contributor

vagrant up has the option --no-destroy-on-error which is very helpful for debugging. It would be nice if python-vagrant supported it, and it looks simple to add. I would just add destroy_on_error=True as an arg to vagrant.up() then pass the right arg depending on that value, something like:

    if not destroy_on_error:
        destroy_on_error_arg = "--no-destroy-on-error"

Here's a reference:

 ~ $ vagrant up --help
Usage: vagrant up [options] [name|id]

Options:

        --[no-]provision             Enable or disable provisioning
        --provision-with x,y,z       Enable only certain provisioners, by type or by name.
        --[no-]destroy-on-error      Destroy machine if any fatal error happens (default to true)
        --[no-]parallel              Enable or disable parallelism if provider supports it
        --provider PROVIDER          Back the machine with a specific provider
        --[no-]install-provider      If possible, install the provider if it isn't installed
    -h, --help                       Print this help
 ~ $ 
@konstruktoid
Copy link
Collaborator

Hi @eighthave, you basically got a PR all done already, want to submit one as well? :)

@eighthave
Copy link
Contributor Author

eighthave commented Apr 4, 2022 via email

@konstruktoid
Copy link
Collaborator

Sure thing, seems like an option that can come in handy.

eighthave added a commit to eighthave/python-vagrant that referenced this issue Jul 12, 2022
@eighthave
Copy link
Contributor Author

#129

eighthave added a commit to eighthave/python-vagrant that referenced this issue Jul 12, 2022
eighthave added a commit to eighthave/python-vagrant that referenced this issue Jul 14, 2022
eighthave added a commit to eighthave/python-vagrant that referenced this issue Aug 24, 2022
eighthave added a commit to eighthave/python-vagrant that referenced this issue Oct 13, 2022
@sangdrax8
Copy link

I just ran into this today, and it would be really helpful to still have. I was testing Talos with vagrant and using ansible to make API calls to it. When I got to build it in molecule, there is always a failure to log in because it doesn't support ssh. If I could just tell it to ignore the failure everything would work. As it is now (with libvirt) it deletes the VM and I can't get around it.

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 a pull request may close this issue.

3 participants