Nir Soffer has posted comments on this change.

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


Patch Set 4:

(2 comments)

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

Line 66:     with open(ruleFile, "w") as rf:
Line 67:         _log.debug("Creating rule %s: %r", ruleFile, rule)
Line 68:         rf.write(rule)
Line 69: 
Line 70:     _udevTrigger(subsystem_matches=('misc',))
> we do this already for other subsystem, AFAIR it's as race-free as we could
Do you mean that another call triggered a udev event for the same subsystem, 
before your tule was written?

Before writing the rule, this call will have no effect on your device. After 
the rule exists, multiple calls are safe.

But it would be better to trigger a specific device instead of the entire 
subsystem, we can add this to our todo list.
Line 71: 
Line 72: 
Line 73: @expose
Line 74: def rmAppropriateHwrngDevice(vmId):


Line 84:         cmd = [EXT_CHOWN, 'root:root', _HWRNG_PATH]
Line 85:         rc, out, err = commands.execCmd(cmd)
Line 86:         if err:
Line 87:             raise OSError(errno.EINVAL, 'Could not change ownership'
Line 88:                           'out %s\nerr %s' % (out, err))
Are we using this logic for other rules? This looks like generic function that 
can be reused.
Line 89: 
Line 90: 
Line 91: @expose
Line 92: def appropriateMultipathDevice(guid, thiefId):


-- 
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: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Polednik <mpoled...@redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com>
Gerrit-Reviewer: Francesco Romani <from...@redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Polednik <mpoled...@redhat.com>
Gerrit-Reviewer: Nir Soffer <nsof...@redhat.com>
Gerrit-Reviewer: gerrit-hooks <automat...@ovirt.org>
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to