Improve debugging on lxc exec failure #373
This was a really hard-to-debug issue - and even though the underlying issue turned out to be simple, I wonder if output can be improved to help others in future.
Here's the test case:
"gold-master" is a fresh ubuntu 16.04 container.
With mitogen commented out as shown, it works. With mitogen uncommented, it aborts like this:
Running with strace on top of that shows little more, but narrows it down to
The real clue is buried in
And indeed it turns out I can reproduce this at the command line:
The reason that started all this is that I have been using ansible to prepare containers, and I have been using ansible's "raw" module to install python2 in the container, before continuing with real ansible commands:
This works with normal ansible, but fails with mitogen because mitogen depends on python already being installed in the container, even for "raw" actions. Of course it's obvious when you think about it.
I think this uncovers several issues.
The text was updated successfully, but these errors were encountered:
I think the best thing we can do here, except record any future version of LXC's output, is to include a hint as part of the log? Say appending something like:
The internally logged message
Your suggestion was blindingly obvious :) Glad I asked!
The endianness issue was actually because it was logging the full wait status, I've replaced that with a neat string. All that code should eventually revert to using the subprocess package, but it's a relatively disruptive change so it's been perpetually delayed.