Ramesh N has posted comments on this change.
Change subject: gluster: set selinux labels while creating bricks
......................................................................
Patch Set 4:
(4 comments)
https://gerrit.ovirt.org/#/c/62773/4/lib/vdsm/gluster/exception.py
File lib/vdsm/gluster/exception.py:
Line 481:
Line 482: class GlusterHostFailedToSetSelinuxContext(GlusterHostException):
Line 483: code = 4420
Line 484:
Line 485: def __init__(self, brickMountPoint=None, rc=0, out=(), err=()):
why having default None? the print will be redundant when its None
actually it can't be done. Let me remove the default.
Line 486: self.rc = rc
Line 487: self.out = out
Line 488: self.err = err
Line 489: self.message = "Failed to set selinux context on the brick :
%s" \
https://gerrit.ovirt.org/#/c/62773/4/vdsm/gluster/storagedev.py
File vdsm/gluster/storagedev.py:
Line 57: _semanageCommandPath = utils.CommandPath("semanage",
Line 58: "/sbin/semanage",
Line 59: "/usr/sbin/semanage",)
Line 60: _restoreconCommandPath = utils.CommandPath("restorecon",
Line 61: "/sbin/restorecon",
in gluster/api.py you use selinux.restorecon . why here you don't
use the s
Thank you for pointing it out. I can use the selinux package.
Line 62: "/usr/sbin/restorecon",)
Line 63:
Line 64: # All size are in MiB unless otherwise specified
Line 65: DEFAULT_CHUNK_SIZE_KB = 256
Line 58: "/sbin/semanage",
Line 59: "/usr/sbin/semanage",)
Line 60: _restoreconCommandPath = utils.CommandPath("restorecon",
Line 61: "/sbin/restorecon",
Line 62: "/usr/sbin/restorecon",)
we also have RESTORECON_PATH - maybe you can fix
RESTORECON_PATH's paths an
not needed if I use the selinux package.
Line 63:
Line 64: # All size are in MiB unless otherwise specified
Line 65: DEFAULT_CHUNK_SIZE_KB = 256
Line 66: DEFAULT_METADATA_SIZE_KB = 16777216
Line 331:
Line 332: rc, out, err = commands.execCmd([_restoreconCommandPath.cmd,
Line 333: '-Rv', mountPoint])
Line 334: if rc:
Line 335: raise ge.GlusterHostFailedToRunRestorecon(mountPoint, rc, out, err)
maybe this should be part of vdsm-tool configure sebool
(configurators/sebo
this is not possible with gluster. We don't maintain the
bricks list in vdsm. So if selinux was disabled while creating brick but enabled
afterwards, then user may have to manually run these commands for all the bricks.
Line 336:
--
To view, visit
https://gerrit.ovirt.org/62773
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I1ca5fec80831073643635875095b88c1c4c2132e
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ramesh N <rnachimu(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Ramesh N <rnachimu(a)redhat.com>
Gerrit-Reviewer: Sahina Bose <sabose(a)redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
Gerrit-HasComments: Yes