repositories: Attach pool if not already done + detach function

Currently whenever a call is made to attach_pool_rh_cdn(), edeploy
tries to attach to it even though it has already been attached, leading
to a fail build. This commit aims to verify if the pool is already attached
before attaching to it. This commit also provide a function detach_poll_rh_cdn()
cardiff: Saving group differences in diff files

When specifing the '-o <dir>' option to cardiff, cardiff will save the
differences between groups in the selected directory.

It will create in it :
- ".def" files which represent the hardware configuration of a given group of servers represented by their serial number
- ".diff" files computing the differences between those groups

This will be an helper to ease the understanding between groups for a
given component.

A typical output file looks like :

Logical_Disks_C8250FD55M802ZZ.def
Logical_Disks_C8250FD55M802FF_C8250FD22M802RR_C8250FD55M802JJ.def
Logical_Disks.diff

... and the diff file looks like .. :

--- plop/Logical_Disks_C8250FD55M802FF_C8250FD55M802RR_C8250FD55M802JJ.def      2014-10-30 10:02:18.668475862 +0100
+++ plop/Logical_Disks_C8250FD55M802ZZ.def      2014-10-30 10:02:18.671475892 +0100
@@ -1 +1,8 @@
-[]
+[('disk', 'sda', 'Read Cache Disable', '0'),
+ ('disk', 'sda', 'Write Cache Enable', '1'),
+ ('disk', 'sda', 'model', 'afakedevice'),
+ ('disk', 'sda', 'optimal_io_size', '0'),
+ ('disk', 'sda', 'physical_block_size', '512'),
+ ('disk', 'sda', 'rev', '3232'),
+ ('disk', 'sda', 'size', '32'),
+ ('disk', 'sda', 'vendor', 'ATA')]
cardiff: Delete .def files when no diff exists

If a single group exists for a component, there is no need to keep the
def files.

This way, the output dir only features the def & diff files from groups
where issues exists.
cardiff: Ignoring cpu temperatures

When grouping hosts, we have to ignore the current temperature to avoid
unexpected sub-grouping.
cardiff: Let's print empty groups

It's important to have an explict reporting of empty groups unless we
don't really understand what's going on.
cardiff: Adding pdisk support for Megaraid

Cardiff was lacking of megaraid physical disk support.
cardiff: Adding override list

When we want to keep a single item from a component, we can exclude
everything but the stuff we want.

So if an item match from the exclude list, it's enough to consider it
even if it could match from the include or exclude list.
cardiff: Don't compare SMART attributes but when_failed

Don't try to group per SMART properties except from the when_failed
attribute
Merge pull request #150 from enovance/sm_utilities

repositories: Attach pool if not already done + detach function
tools/jenkins-build.sh: copy vmlinuz health.pxe initrd.pxe from the base dir to target dir
detect: pdisk shall be reported in GB

Up to now, the pdisk size were not reported in consistent units. For
example, we had :
    ('pdisk', 'disk3', 'size', '3.637'),

This is perfectly incorrect since its a 3 TB disk drive.

To avoid this, the size shall be passed through the size_in_gb()
function to insure the unit to be GB.
detect: Fixing size_in_gb() behavior with float TB

pdisk sizes does report float numbers of storage like :  3.637 TB

Adding three zero (0) at the end of this number would turn it in
3.637000 GB which is wrong.

This patch does consider this field as float numbers, multiple it by
1000 and convert it back to a string representation of the integer
value.

As a result, the 3.637 TB becomes 3637 GB an not 3.637
detect: Reporting sum of all physical disk size

When looking for a host, it could be interesting having the sum of all
physical disks detected.
detect: Printing all disk size in %.2f format

This avoid stupid reporting like :
    ('disk', 'all', 'size',1680.3000000000002),
base: Add setroubleshoot-server for base install

Add the setroubleshoot-server package for the RH/CentOS base install
in order to be able to debug selinux related issues.
edeploy.prof: Using pci=bfsort by default

We have a case where two hosts of the same kind reports the
same hardware devices in a different order.

As as result, eth0,1,2,3 from host1 is mapped on eth0,2,3,1 on the 2nd
one.

I've been investigating the difference an nothing except the naming is
different. This is not an issue for eDeploy but it is for health/cardiff
when trying to group system by similar properties.

This patch is adding pci=bfsort to insure than pci devices are always
reported in the same order.
detect: Adding AHCI flags detection

AHCI features could be very different regarding the bios setup.
Let's detect the flags from the dmesg to report them. This way we can
detect such difference at cardiff time.

This commit fixes issue #150.

Note that we store the dmesg in /tmp/dmesg for performance issues.
We'll surely have to add more dmesg parsing, so reading a file on the
filesystem will be faster than calling dmesg all the time.
detect: Removing timestamp from dmesg

If dmesg is using timestamp, let's remove them to ease the parsing
test: Adding sample_dmesg

Adding missing file required for test target.
detect: Prevent wrong parsing of dmesg

Let's only remove [] if it's for the first word. We do check then if
words remains before searching for items in dmesg.