Use processutils properly

Previously this code was calling processutils.execute incorrectly,
expecting it to return the exit code. This change:

* fixes calls to processutils.execute
* fixes related tests

Change-Id: I3343f104a5a8200d53bd87a8799ff918e375b17f
(cherry picked from commit 7b5575f6602f1199077c2819c18e5d587d5704ea)
Fix HardwareManager loading order bug

The agent attempts to sort the HardwareManager implementations found
by stevedore in order of suitability. This patch fixes a bug in the
sorting order that caused the GenericHardwareManager to always be
loaded.

Fixes bug 1327923

Change-Id: I1cc20e5351a704325f0cf41dab205c9164799f6a
(cherry picked from commit 33e8c0dab2dea307a8314c8c366b0c91f9c7c671)
Perform manual error checks instead of set -e

When using set -e, if you have a command fail, even when setting a
variable, it causes the node to fail. I have removed set -e and checked
error state where unexpected everywhere. I also added additional
logging.

Closes-Bug: #1326326
Change-Id: I7d2568c3693b9c486672e4322c7f01622aeba875
(cherry picked from commit d82b8c6bc0bf0131fb4bec6d18920191f68f2b54)
Fix: partitions recently imaged not being detected

When we have just written out a whole disk image, if we do not run
partprobe none of the new partitions show up in blkid, therefore even
images with a built-in configdrive partition will have one created

Change-Id: I6ec98dc237b42bfe94ce79cf84d155332335c9f6
(cherry picked from commit d159aec4f01795726dccc2bc8ccece3655668e2f)
Better errors for execute() failures

Exceptions raised due to processutils.execute() failing now include
stdout and stderr.

Change-Id: Id5d1b5bc51d377f9f3c338cd7303ea800f76e5cd
(cherry picked from commit 7e884121cf2211a1eb29be751bf35079590f7855)