PR-1291: Initial Commit for OCFS2 SR Offering
CP-4526: Fix SR.scan.
CP-4523:  Storage Thin Provisioning: Handle OCFS2 failure

Added new OCFS specific errors and covered all error paths in OCFS operations.
CA-113313: Limiting the OCFS SR offering to OCFSoHBA and OCFSoISCSI.
CA-113314: Fixed OCFSoHBA scan error, added 3rd unused arg to vdi(),
ref. FileSR
CP-5737: Fix typo in comment

Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com>
CP-5737: Properly format output string.

Add missing operator to format a string.

Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com>
CP-5737: Avoid to mix different types during checks.

'f' was either integer or fileobject, this could cause type errors, use None
to have always an object.

Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com>
CP-5737: Find proper lvm tools directory

Directory is /usr/bin or /sbin base on distro (CentOS 6.4 uses /sbin).

Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com>
CP-5737: Add a function to silently ignore ENOENT while deleting files

This function is useful to delete a file/directory and avoiding race
conditions if another process/thread do the same thing.

Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com>
CP-5737: Ignore error while deleting LVM files if file is not present.

LVM seems to remove files faster then SM so trying to delete LVM files
ignore error if file is not present.
Catch ENOENT error instead of checking for existence to avoid race
conditions and limiting system calls.

Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com>
CP-5737: Do not use /etc/init.d scripts but service instead.

To be compatible with upstart is better to start services using service
command.

Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com>
Merge changes for CP-5737

GitHub: closes #12 on xapi-project/sm
CA-113315: Zeroing out is not needed as we allow destroy only when there
are no vdis.
CA-113316: Added snapshot and clone attributes to CAPABILITIES
CA-113315: zeroout the filesystem metadata to override existing FS check
CA-113313: Add OCFS pluggin in Makefile to pick OCFSSR.py file
CA-113317: Add multipath functionality to ocfsohba
CA-113313: Removed OCFSSR after the link creation that happens in loop
PR-1291: Added ocfsoiscsi and ohba to mpath, to store path details in
PBD. Also added a dummy probe mechanism in OCFSSR