Skip to content
This repository has been archived by the owner on Nov 24, 2022. It is now read-only.

Fix lxc-info state regex for recent lxc versions #217

Closed
wants to merge 1 commit into from

Conversation

fpletz
Copy link
Contributor

@fpletz fpletz commented Feb 10, 2014

Recent versions of lxc-info (some pre-1.0 alpha or beta) use a different output format than prior versions (0.9).

Instead of

state:RUNNING

the output is now

State:          RUNNING

This patches adjusts the regex that parses this output to match both output formats and adds a unit test.

See the lxc code at https://github.com/lxc/lxc/blob/master/src/lxc/lxc_info.c#L303 for reference.

Recent versions of lxc-info (some pre-1.0 alpha or beta) use a different
output format than prior versions (0.9).

Instead of

    state:RUNNING

the output is now

    State:          RUNNING

This patches adjusts the regex that parses this output to match both
output formats and adds a unit test.
@fgrehm fgrehm added this to the v0.8.0 milestone Feb 10, 2014
@fgrehm
Copy link
Owner

fgrehm commented Feb 11, 2014

Thanks! There are other PRs targetting that and I'll try to merge yours or one of them and cut a new release as soon as I have a chance :-)

@fgrehm
Copy link
Owner

fgrehm commented Feb 11, 2014

Oh sorry, actually this has been merged with #197, I'll keep this around as I want to bring those specs in :-) If you are interested on building the plugin from sources, please have a look at the next branch of the project.

Thanks!

@fgrehm
Copy link
Owner

fgrehm commented Feb 12, 2014

I've added a spec to make sure the state detection is case insentive and I pushed to the next branch. I'll keep working on things from that branch and I hope to cut a new release soon :-)

Thanks for putting up this PR!

@fgrehm fgrehm closed this Feb 12, 2014
@fpletz
Copy link
Contributor Author

fpletz commented Feb 12, 2014

Thanks for merging and your explanations. I have some more fixes for current versions of LXC which I hope to get in shape to submit a PR soon.

@fgrehm
Copy link
Owner

fgrehm commented Feb 12, 2014

Oh, the plugin is broken on latest 1.0 beta? :-( I've set up a Saucy VBox VM with 1.0 beta3 to try things out but haven't had a chance to do that yet.

Just so you know, the next version of the plugin will be the last one to support vagrant < 1.4 and it would be great to have it working without issues with recent lxc versions so that people are not forced to upgrade their vagrant installations. If you are able to submit that PR or LMK what problems you are facing over there it'll be awesome :-)

@fpletz
Copy link
Contributor Author

fpletz commented Feb 13, 2014

It's not really broken on recent betas, we just need to work around some odd behaviour changes. I've opened #222 with the one that annoys me most.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants