Change in vdsm[master]: virt: set correct permissions for hwrng device

nsoffer at redhat.com nsoffer at redhat.com
Wed May 11 22:38:03 UTC 2016


Nir Soffer has posted comments on this change.

Change subject: virt: set correct permissions for hwrng device
......................................................................


Patch Set 11:

(2 comments)

https://gerrit.ovirt.org/#/c/54806/11/vdsm/supervdsm_api/udev.py
File vdsm/supervdsm_api/udev.py:

Line 223: 
Line 224: @expose
Line 225: def appropriateHwrngDevice(vmId):
Line 226:     ruleFile = _UDEV_RULE_FILE_NAME % ('hwrng', vmId)
Line 227:     rule = 'RUN+="%s %s:%s %s"\n' % (
> I don't understand your concern. There is only single hwrng device, as ther
But this rule does not match this device, so it will never run. What is the purpose of a udev rule that will never run?
Line 228:         EXT_CHOWN, QEMU_PROCESS_USER, QEMU_PROCESS_GROUP, _HWRNG_PATH)
Line 229:     with open(ruleFile, "w") as rf:
Line 230:         _log.debug("Creating rule %s: %r", ruleFile, rule)
Line 231:         rf.write(rule)


Line 242:     except OSError as e:
Line 243:         if e.errno != errno.ENOENT:
Line 244:             raise
Line 245: 
Line 246:     # Check that there are no other hwrng rules in place
Why do we need multiple rules for the same device? Is this kind of reference counting using udev rules?
Line 247:     if not glob.glob(_UDEV_RULE_FILE_NAME % ('hwrng', '*')):
Line 248:         _log.debug('Changing ownership (to root:root) of device '
Line 249:                    '%s', _HWRNG_PATH)


-- 
To view, visit https://gerrit.ovirt.org/54806
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Id958a291e5a15813309928ba3d8c67828273b6c6
Gerrit-PatchSet: 11
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Polednik <mpolednik at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Polednik <mpolednik at redhat.com>
Gerrit-Reviewer: Milan Zamazal <mzamazal at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list