diskimage-builder/diskimage_builder/elements
Ian Wienand f068e6aa6e Fix package-installs-v2 output
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
2017-04-07 13:48:53 +10:00
..
apt-conf Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
apt-preferences Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
apt-sources Release 1.25.2 2017-02-02 11:20:00 +11:00
architecture-emulation-binaries Merge remote-tracking branch 'origin/master' into merge-branch 2016-11-29 07:43:46 +11:00
baremetal Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
base Merge branch 'master' into merge-branch 2017-02-09 13:35:53 +11:00
bootloader Fix typo in CMDLINE env var for bootloader 2017-03-22 12:02:37 +01:00
cache-url Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
centos Run dib-run-parts out of /tmp 2017-04-05 13:11:22 +10:00
centos7 Merge "Run dib-run-parts out of /tmp" 2017-04-05 10:18:55 +00:00
centos-minimal Release 1.27.0 2017-02-03 11:49:45 +11:00
cleanup-kernel-initrd Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
cloud-init Merge branch 'master' into merge-branch 2017-02-09 13:35:53 +11:00
cloud-init-datasources Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
cloud-init-disable-resizefs Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
cloud-init-nocloud Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
debian Use sphinx warning-is-error 2017-03-14 14:49:49 +11:00
debian-minimal Use sphinx warning-is-error 2017-03-14 14:49:49 +11:00
debian-systemd Semi-automatic doc generation of element dependency 2017-02-09 09:50:30 +11:00
debian-upstart Semi-automatic doc generation of element dependency 2017-02-09 09:50:30 +11:00
debootstrap Run dib-run-parts out of /tmp 2017-04-05 13:11:22 +10:00
deploy-baremetal Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
deploy-kexec Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
deploy-targetcli Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
deploy-tgtadm Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
devuser Release 1.25.2 2017-02-02 11:20:00 +11:00
dhcp-all-interfaces Release 1.27.0 2017-02-03 11:49:45 +11:00
dib-init-system Fix dib-init-system for Debian Jessie and Debian Stretch 2017-03-11 14:04:13 +00:00
dib-python Release 1.21.1 2017-02-02 20:36:23 +11:00
dib-run-parts Run dib-run-parts out of /tmp 2017-04-05 13:11:22 +10:00
disable-selinux/post-install.d Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
dkms Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
docker Run dib-run-parts out of /tmp 2017-04-05 13:11:22 +10:00
dpkg Semi-automatic doc generation of element dependency 2017-02-09 09:50:30 +11:00
dracut-network Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
dracut-ramdisk Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
dynamic-login Release 1.25.2 2017-02-02 11:20:00 +11:00
element-manifest Release 1.24.0 2017-01-31 14:14:19 +11:00
enable-serial-console Release 1.25.2 2017-02-02 11:20:00 +11:00
epel Add flag to disable EPEL 2017-04-05 05:59:40 +10:00
fedora Run dib-run-parts out of /tmp 2017-04-05 13:11:22 +10:00
fedora-minimal Release 1.27.0 2017-02-03 11:49:45 +11:00
gentoo Run dib-run-parts out of /tmp 2017-04-05 13:11:22 +10:00
growroot Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
grub2 Fix #1627402: fix grub2 element for ubuntu xenial 2017-02-11 18:44:18 +00:00
hpdsa Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
hwburnin Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
hwdiscovery Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
ilo Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
install-bin Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
install-static Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
install-types Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
ironic-agent Release 1.27.0 2017-02-03 11:49:45 +11:00
iso Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
local-config Merge remote-tracking branch 'origin/master' into merge-branch 2016-11-29 07:43:46 +11:00
manifests Merge branch 'master' into merge-branch 2017-02-09 13:35:53 +11:00
mellanox Merge remote-tracking branch 'origin/master' into merge-branch 2016-11-29 07:43:46 +11:00
modprobe-blacklist Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
no-final-image Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
oat-client Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
openssh-server Release 1.21.1 2017-02-02 20:36:23 +11:00
opensuse Run dib-run-parts out of /tmp 2017-04-05 13:11:22 +10:00
opensuse-minimal Typo fix: curent => current 2017-03-23 15:02:20 +08:00
package-installs Fix package-installs-v2 output 2017-04-07 13:48:53 +10:00
pip-and-virtualenv Merge branch 'master' into merge-branch 2017-03-02 13:49:29 +11:00
pip-cache Release 1.25.2 2017-02-02 11:20:00 +11:00
pkg-map Fix package-installs-v2 output 2017-04-07 13:48:53 +10:00
posix Merge remote-tracking branch 'origin/master' into merge-branch 2016-11-29 07:43:46 +11:00
proliant-tools Release 1.27.0 2017-02-03 11:49:45 +11:00
pypi Release 1.27.0 2017-02-03 11:49:45 +11:00
python-brickclient Merge branch 'master' into merge-branch 2017-02-09 13:35:53 +11:00
ramdisk Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
ramdisk-base Release 1.25.2 2017-02-02 11:20:00 +11:00
rax-nova-agent Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
redhat-common Merge branch 'master' into merge-branch 2017-02-09 13:35:53 +11:00
rhel Run dib-run-parts out of /tmp 2017-04-05 13:11:22 +10:00
rhel7 Run dib-run-parts out of /tmp 2017-04-05 13:11:22 +10:00
rhel-common Merge remote-tracking branch 'origin/master' into merge-branch 2016-11-18 13:53:56 +11:00
rpm-distro Adding aarch64 support for CentOS7 2017-03-22 10:46:54 -04:00
runtime-ssh-host-keys Release 1.21.1 2017-02-02 20:36:23 +11:00
select-boot-kernel-initrd Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
selinux-permissive Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
simple-init Have simple-init enable network.service 2017-03-28 19:28:51 +11:00
source-repositories Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
stable-interface-names Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
svc-map Release 1.27.0 2017-02-03 11:49:45 +11:00
sysctl Release 1.25.2 2017-02-02 11:20:00 +11:00
uboot Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
ubuntu Run dib-run-parts out of /tmp 2017-04-05 13:11:22 +10:00
ubuntu-common Merge branch 'master' into merge-branch 2017-02-09 13:35:53 +11:00
ubuntu-core Run dib-run-parts out of /tmp 2017-04-05 13:11:22 +10:00
ubuntu-minimal Merge "Use correct Ubuntu distro url on non-x86 arches" 2017-03-24 04:42:59 +00:00
ubuntu-signed Use sphinx warning-is-error 2017-03-14 14:49:49 +11:00
vm Add default PPC block-device layout 2017-03-23 09:44:01 +11:00
yum Merge branch 'master' into merge-branch 2017-02-09 13:35:53 +11:00
yum-minimal Run dib-run-parts out of /tmp 2017-04-05 13:11:22 +10:00
zypper Merge remote-tracking branch 'origin/master' into merge-branch 2016-11-29 07:43:46 +11:00
zypper-minimal Run dib-run-parts out of /tmp 2017-04-05 13:11:22 +10:00