Change in vdsm[master]: ethtool_opts: provide a way to apply to all slaves

danken at redhat.com danken at redhat.com
Tue Sep 9 16:14:53 UTC 2014


Dan Kenigsberg has posted comments on this change.

Change subject: ethtool_opts: provide a way to apply to all slaves
......................................................................


Patch Set 5:

(2 comments)

http://gerrit.ovirt.org/#/c/32508/5/vdsm_hooks/ethtool_options/ethtool_options.py
File vdsm_hooks/ethtool_options/ethtool_options.py:

Line 104:     if options is not None:
Line 105:         nics = _net_nics(attrs)
Line 106:         for subcmd in _parse_into_subcommands(options.split()):
Line 107:             if subcmd.device == ALL_SLAVES:
Line 108:                 for nic in nics:
this would allow you to remove code duplication, isn't it?

 for nic in (nics if subcmd.device == ALL_SLAVES else [subcmd.device]):
Line 109:                     try:
Line 110:                         _set_ethtool_opts(network,
Line 111:                                           [subcmd.name, nic] + subcmd.flags)
Line 112:                     except EthtoolError as ee:


Line 120:                 except EthtoolError as ee:
Line 121:                     hooking.log(ee.message)
Line 122:                     success = False
Line 123:         if not success:
Line 124:             raise RuntimeError('One or more ethtool ops failed to apply')
this is different than the sematics of ETHTOOL_OPTS in initscripts. There, failures are logged, but overall ifup succeed. Do we want to be more puritan?
Line 125: 
Line 126: 
Line 127: def _net_nics(attrs):
Line 128:     if 'bonding' in attrs:


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Idddbc167be4ac8ba7c4b4ab10da0275b4caf2a58
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list