Antoni Segura Puimedon has posted comments on this change.

Change subject: netinfo: Retrieve bonding options differing from defaults (WIP)
......................................................................


Patch Set 3:

(1 comment)

http://gerrit.ovirt.org/#/c/24456/3/lib/vdsm/netinfo.py
File lib/vdsm/netinfo.py:

Line 537: def _getDefaultBondingOptions():
Line 538:     teeCmd = _TEE_BINARY.cmd
Line 539: 
Line 540:     rc, _, err = execCmd([teeCmd, BONDING_MASTERS],
Line 541:                          data='+' + DUMMY_BOND, sudo=True)
> normal vdsm user does not have the permissions to run `sudo tee`. You have 
+1 for hard coding with unit test. The only other alternative that I thought 
about was that we'd "hard code" it at "compile time" but IIRC it is not that 
legal in most linux packaging to perform privileged actions like creating and 
removing a bond.

You can find the current defaults in the linux source tree in:
drivers/net/bonding/bond_options.c

Note that the defaults are marked by BOND_VALFLAG_DEFAULT.
Line 542:     if rc:
Line 543:         raise OSError('Creating a reference bond failed: %s.', err)
Line 544: 
Line 545:     try:


-- 
To view, visit http://gerrit.ovirt.org/24456
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ief6d366b1b761627c7203cf236b75ef538af3e26
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ondřej Svoboda <osvob...@redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegu...@redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to