f068e6aa6e
The current output for package-installs-v2 is inscrutable [1] The problem starts with process_output() which is not capturing stderr. This means that any stderr output is dislocated from any stdout output around it. This is *really* confusing as you get a bunch of seemingly meaningless stderr output from any calls before you see any stdout (e.g. in [1] you can see random yum error output that should have been with the yum call)). The simplest thing to do is to redirect stderr to stdout which keeps everything in sync. This causes a slight problem, however, because pkg-map outputs both status information and errors on stderr. To work around this but maintain compatibility, we add a "--prefix" argument that prepends mapped packages from pkg-map with a value we can match on. The existing status/debug output from pkg-map is low-value; modify the call so that it will be traced only at higher debug levels (e.g. -x -x). The current loop is also calling pkg-map for every package in every element (this is why in [1] the same message is repeated over and over). This is unnecessary; it only needs to pkg-map once for each element, giving the package list as the arguments. Create package lists by element and pass those to pkg-map. As a cleanup, there is no point in printing e.output if the process_output fails for the install because we are already tracing it; i.e. the output, even for failures, is already in the logs. Printing it again just duplicates the output. [2] is an extract showing what I feel is a much more understandable log output for a fairly complex install. [1] http://paste.openstack.org/show/595118/ [2] http://paste.openstack.org/show/595303/ Change-Id: Ia74602a5d2db032a476481caec0e45dab013d54f |
||
---|---|---|
.. | ||
pkg-map |