Ramesh N has posted comments on this change.
Change subject: gluster: set selinux labels while creating bricks ......................................................................
Patch Set 2:
(1 comment)
https://gerrit.ovirt.org/#/c/62773/2/vdsm/gluster/storagedev.py File vdsm/gluster/storagedev.py:
Line 321: Line 322: rc, out, err = commands.execCmd([_restoreconCommandPath.cmd, Line 323: '-Rv', mountPoint]) Line 324: if rc: Line 325: raise ge.GlusterHostFailedToRunRestorecon(mountPoint, rc, out, err)
Good point. Is there way to tell the user that selinux labels where not set
It will be anyway handled by the engine via exception handling. There will be specific error shown saying failed to set selinux labels on the brick. So I hope its ok.
Note: I moved this as the last step in latest patch set. Also it should be executed only when selinux is enabled(either enforcing or permissive). Line 326: Line 327: # bz#1230495: lvm devices are invisible and appears only after vgscan Line 328: # Workaround: Till the bz gets fixed, We use vgscan to refresh LVM devices Line 329: rc, out, err = commands.execCmd([_vgscanCommandPath.cmd])