init: do_reboot and do_halt umount the discs themselves now
Merge pull request #137 from gerhardqux/no-double-umount

do_reboot and do_halt umount the discs themselves now
init: If no METADATA_URL, GRUB1 shall still have its boot params

When METADATA_URL wasn't set up, the GRUB1 was not having any boot
parameter....
init: Logging resulting Boot arguments

It's pretty useful to get the final boot arguments used for a particular
host.
init: Fixing lvmetad path

lvmetad is in /sbin not /usr/sbin
init: Improving command line detection

In fact, "| x |" is as just correct as "|x|" while the latter didn't got
detected....

Fixing that in that patch as I search for 1 hour why my parameter wasn't
properly added at boot time :/
init: Fixing /run/lvm socket creation

commit 50b904c2eb7975e9cb3d2876dcd1b5226f63faf0 was perfectly wrong.

/run is mounted virtually to creating /run/lvm is useless.
So let's create it once /run is mounted, not before.
init: Mounting /run before installing grub

We need this to be done to insure grub (which is running lv/vg commands)
to find the socket we created in the /run of the deploiement OS.
init: Adding grub2 LVM support

When booting on direct attached disks, you could be in a situation where
the /boot is located on a LVM device. If so, you have to tell Grub to
load its lvm module to reach the /boot.
verify-cmdb : fixup fake generate() must return a list not a tuple
server/upload.py: when computing dictionary to be sent to configure
scripts, make the info coming from the hardware detection the most
priority.

Fixes #140
detect: Saving wwn & scsi IDs separately

When getting disk's properties, we were saving the scsi & wwn IDs in the
same variable name called "id".

That wasn't really useful as in bug like #139, we should be in position
to identify the wwn of a particular disk to avoid disk's renaming.

Using the wwn IDs allow you to keep a constant path to reach this
particular disk by using the /dev/disk/by-id/<wwn-id> path.

Thanks to this patch, you can now write such matching rule in a
spec:

....
('disk', '$first_disk', 'www-id', '$fist_disk_wwn_id')
....

In a configure script, instead of doing the usual:
  my_disk_path = '/dev/ + var['first_disk']

You can write
  my_disk_path = '/dev/disk/by-id/' + var['first_disk_wwn_id']

This is perfectly targeting the same disk, the 2nd way of writing the
code makes it more robust to dynamic disks renaming like reported in the
issue #139

This fix is closing #139
src/detect.py: fix some pylint warnings
init: Fixing indent
init: Adding LLDP support to init

This patch is one the serie to get LLDP information being reported by eDeploy.

This patch is making the lldp service running and waits until the lldp
status is reported as ok.

It will wait up to 45 seconds to get this LLDP report being done.

As the LLDP is started at the same time as the nic configuration, we
have a good chance the NIC will have received some LLDP packets during
the DHCP requests.
detect: Reporting current LLDP configuration per interface

When detecting the hardware, let's report what is the LLDP information
reported by the switch.

It is now possible to match some hardware based of its low-level network configuration (port location, switch name, available VLANs, ...)

The reported information are really depending from the switch model/version and its configuration.
This patch will report everything found from the "lldaptool -n -t -i <interface>" output under the following format:
    'lldp', '<nic_name>', 'header, 'value'

The default parsing of lldaptool is turned into a 2 field reporting.
If multiple levels are found, they will be turned into "x/y" format in the header.

A typical output looks like:
 ('lldp', 'eth3', 'Chassis ID/MAC', 'f8:b1:56:15:e6:c6'),
 ('lldp', 'eth3', 'Port ID/Ifname', 'gi3_4'),
 ('lldp', 'eth3', 'Time to Live', '120'),
 ('lldp', 'eth3', 'MAC_PHY Configuration Status', 'Auto-negotiation supported and enabled'),
 ('lldp', 'eth3', 'MAC_PHY Configuration Status/PMD auto-negotiation capabilities', '0x6c01'),
 ('lldp', 'eth3', 'MAC_PHY Configuration Status/PMD auto-negotiation capabilities/MAU type', '1000 BaseTFD'),
 ('lldp', 'eth3', 'Port Description', 'gigabitethernet3_4'),
 ('lldp', 'eth3', 'System Name', 'Switch POD'),
 ('lldp', 'eth3', 'System Description', 'R1-2401 VRTX 1Gb Switch Module'),
 ('lldp', 'eth3', 'System Capabilities/System capabilities', ' Bridge'),
 ('lldp', 'eth3', 'System Capabilities/System capabilities/Enabled capabilities', 'Bridge'),
detect: Adding test code for lldp parsing

As the output could be weird, let's add some code to handle the
testability of it
base.install: Add kexec tools and kernel debug packages for Debian likes and RedHat likes

Signed-off-by: Gaetan Trellu <gaetan.trellu@enovance.com>
health: Implementing distributed storage benchmark

Storage was the last remaining hardware device to test in a distribution
fashion.

The dahc/storage.yaml provides the sample way to make such benchmark and
the associated options
health: Fixing coding style