Skip to content

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

Open

Description

@eighthave

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
 ~ $ 

Activity

  1. konstruktoid commented on Apr 4, 2022

    @konstruktoid
    Collaborator

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

  2. eighthave commented on Apr 4, 2022

    @eighthave
    ContributorAuthor
  3. konstruktoid commented on Apr 4, 2022

    @konstruktoid
    Collaborator

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

  4. added a commit that references this issue on Jul 12, 2022
    c4f6589
  5. eighthave commented on Jul 12, 2022

    @eighthave
    ContributorAuthor
  6. added 2 commits that reference this issue on Jul 12, 2022
    ac08da2
    fe28810
  7. added a commit that references this issue on Aug 24, 2022
    9e2c80d
  8. added a commit that references this issue on Oct 13, 2022
    9404dcb
  9. sangdrax8 commented on Aug 14, 2024

    @sangdrax8

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions