[CP-6333][CP-6334]: rm dm-multipath-dm-event, dm-multipath-disable-udev-rules

This patch is the counterpart of 2 patches removed in
dm-multipath (formerly dm-multipath in guest-packages.hg):
- dm-multipath-disable-udev-rules
- dm-multipath-dm-event

This patch basically does the following:
- ship and override multipath udev rules from sm RPM
- add rules to invoke mpathcount from udev

Note: for udev to catch the relevant events, the kernel must have
      DM_UEVENT enabled

Signed-off-by: Germano Percossi <germano.percossi@citrix.com>
Reviewed-by: Vineeth Thampi Raveendran <vineeth.thampi@citrix.com>

GitHub: closes #40 on xapi-project/sm
CA-111813: race condition setting "iscsi_sessions" in other_conf

This changeset basically reinstate previous code,
backing out "changeset:   1555:ac091775c8ea" in the Mercurial
repository.
To be safe, we remove the key before adding, just in case.

Signed-off-by: Germano Percossi <germano.percossi@citrix.com>
Reviewed-by: Vineeth Thampi Raveendran <vineeth.thampi@citrix.com>

GitHub: closes #41 on xapi-project/sm
CP-5050: Notify XAPI about critical coalesce errors

The rate XAPI is notified is throttled to avoid spamming (currently
defaults to one message per hour, per SR). This rate can be overridden
by setting the "coalesce-error-rate" key in an SR's other-config.

Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
Suggested-by: Andrei Lifchits <andrei.lifchits@citrix.com>
Reviewed-by: Germano Percossi <germano.percossi@citrix.com>

GitHub: closes #38 on xapi-project/sm
CA-106886: Don't update vhd-blocks during SR.scan

Don't bother updating the vhd-blocks in the XAPI database as this is
owned by the GC and there's no synchronisation for this.

Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
Reviewed-by: Vineeth Thampi Raveendran <vineeth.thampi@citrix.com>

GitHub: closes #37 on xapi-project/sm
CP-6335: Removal of dm-multipath-init patch

This functionality has stopped being a patch to upstream
multipath and it is shipped in its own startup script
provided by sm RPM

Signed-off-by: Germano Percossi <germano.percossi@citrix.com>
Reviewed-by: Vineeth Thampi Raveendran <vineeth.thampi@citrix.com>

GitHub: closes #42 on xapi-project/sm
CA-118762: Bring self.ty back

My previous pylint change 96e56bf7 replaced self.ty as it was not defined
anywhere in the VDI object. But this breaks some horrible hack in the
underlying layer, which was probably implementated that way for backward
"compatability" reason by itself.

Signed-off-by: Zheng Li <zheng.li@eu.citrix.com>
Reviewed-by: Vineeth Thampi Raveendran <vineeth.thampi@citrix.com>
CA-118781: Initialize parent class first

Another incompatability issue introduced by my pylint serie. On the
other hand, the root cause was some bad code manifested due by this
change.

In some subclass of VDI.VDI, we set some fields before initializting
the VDI.VDI parent class, so that these fields might be overwritten
during the parent class initialization.

As a common rule of thumb, we should generally do parent class
initialization first and then do overwritten and extention in
the following steps in the children initializor.

And any information essential for parent class initialization should
be defined as a parameter of the parent __init__ method. E.g. uuid
is a predefined parameter of the initialization method in the parent
class (VDI.VDI), but many children classes still don't use this
parameter, and instead do uuid assignment in the children classes
instead and then call the parent initializor. This patchset doesn't
correct these issues for the moment, but we should pay attention to
this, otherwise we might get bitten in the future.

Signed-off-by: Zheng Li <zheng.li@eu.citrix.com>
Reviewed-by: Vineeth Thampi Raveendran <vineeth.thampi@citrix.com>

GitHub: closes #43 on xapi-project/sm