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

Libvirt LXC: allow to check for container existence and status #585

Merged
merged 1 commit into from Oct 11, 2016

Conversation

@agx
Copy link
Contributor

agx commented Oct 4, 2016

This is similar to LXC but libvirt-lxc containers are implemented
differently and need the libvirt tools to check existence and status.

agx added a commit to agx/serverspec that referenced this pull request Oct 4, 2016
@agx agx mentioned this pull request Oct 4, 2016
@mizzy
Copy link
Owner

mizzy commented Oct 5, 2016

Please modify lib/specinfra/command/linux/base/lxc_container.rb like this.

    def check_exists(container)
      [
       "lxc-ls -1 | grep -w #{escape(container)}",
        "virsh -c lxc:/// list --all --name | grep -w '^#{escape(container)}$'"
      ].join(' || ')
    end
@agx agx force-pushed the agx:libvirt-lxc branch from 54629d7 to 3253eb2 Oct 7, 2016
@agx
Copy link
Contributor Author

agx commented Oct 7, 2016

@mizzy updated.

@agx
Copy link
Contributor Author

agx commented Oct 7, 2016

Not needed when we handle LibvirtLXC in LXC as @mizzy suggested.

@agx agx closed this Oct 7, 2016
@agx agx reopened this Oct 8, 2016
@agx
Copy link
Contributor Author

agx commented Oct 8, 2016

Argh, i closed the wrong one. Meant to close the one on serverspec. Sorry

@mizzy
Copy link
Owner

mizzy commented Oct 11, 2016

Thanks!

@mizzy mizzy merged commit f5bb203 into mizzy:master Oct 11, 2016
1 of 2 checks passed
1 of 2 checks passed
continuous-integration/appveyor/pr AppVeyor build failed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@mizzy
Copy link
Owner

mizzy commented Oct 11, 2016

Released as v2.63.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.