lxc 0.7.5 lxc-info -q doesn't work as advertised nj9:~ # lxc-info -q -n vps001 && echo yes || echo no state: RUNNING pid: 3619 yes nj9:~ # lxc-info -q -n vps004 && echo yes || echo no state: STOPPED pid: -1 yes nj9:~ #
I have an init script that parses the output of lxc-info, which broke after upgrading to lxc 0.7.5. Since there is now an lxc-version, output format changes are only a minor annoyance because I can make the script detect at least <0.7.5 and individual versions 0.7.5 and later and adjust as needed. But obviously since lxc-info now has a -q, I'd like it to suppress output if given -q, but more importantly, regardless of -q or no -q, I'd like it to set meaningful exit values. Then my init script can stop doing: S=`lxc-info -n $CN` echo "$S" [[ "${S##* }" = "RUNNING" ]] ... and will no longer be broken by mere changes in output format. The box the above paste comes from was just upgraded from 0.7.4 to 0.7.5 while some containers were running. The host hasn't been rebooted yet. If this is only expected to work after stopping and restarting containers with the new lxc-start, then I'll be doing that later anyways. -- bkw ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense. http://p.sf.net/sfu/splunk-d2dcopy1 _______________________________________________ Lxc-users mailing list Lxc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-users