CA-119099: Don't rely on existence of mount point for SR auto-attach

Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
Signed-off-by: Chandrika Srinivasan <chandrika.srinivasan@citrix.com>
Reviewed-by: Vineeth Thampi Raveendran <vineeth.thampi@citrix.com>
Imported-by: Siddharth Vinothkumar <siddharth.vinothkumar@citrix.com>

(cherry picked from commit b643275944d5912305bd9ff2e3f1ee5a0d16b803)

GitHub: closes #126 on xapi-project/sm
CA-95928: Xapi lists and attempts to mount directories as isos

Signed-off-by: Sugandha Aggarwal <sugandha.aggarwal@citrix.com>
Acked-by: Thanos Makatos <thanos.makatos@citrix.com>
Reviewed-by: Vineeth Raveendran <vineeth.thampi@citrix.com>
Imported-by: Thanos Makatos <thanos.makatos@citrix.com>

GitHub: closes #130 on xapi-project/sm
CA-99235: Keep trying to remove the tag forever

In the error handling path of VDI.activate, if the connection with the
master is lost, the slave cannot remove the tag from sm-config. When the
connection is restored, the VDI is left in undefined state. To avoid
this we keep trying to remove the tag until we succeed (the connection
with the host has been restored).

Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
Reviewed-by: Vineeth Thampi <vineeth.thampi@citrix.com>
Imported-by: Siddharth Vinothkumar <siddharth.vinothkumar@citrix.com>

(cherry picked from commit e32cc329cdd62ec157dc5337c95b06556de62ebd)

GitHub: closes #132 on xapi-project/sm
CA-115035: mpath-boot and multipathed host other-config keys missing

Before upgrading to the new kernel, the output of
multipath -k"show maps"
and
echo "show maps" |multipathd -k
were different.

Now they are the same but previous code in mpathcount.py was
relying exclusively on the wrong output in the previous version.

Now it is fixed in both cases

Signed-off-by: Germano Percossi <germano.percossi@citrix.com>
Reviewed-by: Chandrika Srinivasan <chandrika.srinivasan@citrix.com>

(cherry picked from commit ede80beecc85793f2f83371ab58a6f94df3e0620)
Imported-by: Germano Percossi <germano.percossi@citrix.com> for [CA-130639]

GitHub: closes #125 on xapi-project/sm
CA-107031: IntelliCache cleanup script fails when VDI is not in XAPI database

Signed-off-by: Andrei Lifchits <andrei.lifchits@citrix.com>
Imported-by: Thanos Makatos <thanos.makatos@citrix.com>
Reviewed-by: Chandrika Srinivasan <chandrika.srinivasan@citrix.com>

GitHub: closes #124 on xapi-project/sm
[CA-122950] & [CA-107572]: Ignore invalid VDI handle exceptions in SR.scan

Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
Signed-off-by: Sisimon Soman <sisimon.soman@citrix.com>
Acked-by: Thanos Makatos <thanos.makatos@citrix.com>
Reviewed-by: Zheng Li <zheng.log@citrix.com>
Imported-by: Siddharth Vinothkumar <siddharth.vinothkumar@citrix.com>

(cherry picked from commit d410004)
(cherry picked from commit c75ea33)