Change in vdsm[master]: hooks: Include sudoers file in ethtool_options rpm

2014-12-01 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: hooks: Include sudoers file in ethtool_options rpm
..


Patch Set 2:

I don't recall us dropping privileges when invoking hooks. Since this hook 
happens in supervdsmd (which runs as root), it does not need any sudo, does it?

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I3f1529452050370c82eb2a2675b74c2e5136d427
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dima Kuznetsov dkuzn...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Dima Kuznetsov dkuzn...@redhat.com
Gerrit-Reviewer: Ido Barkan ibar...@redhat.com
Gerrit-Reviewer: Saggi Mizrahi smizr...@redhat.com
Gerrit-Reviewer: Yaniv Bronhaim ybron...@redhat.com
Gerrit-Reviewer: Yeela Kaplan ykap...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: netconf_persistence: teach PersistentConfig to atomically st...

2014-11-30 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: netconf_persistence: teach PersistentConfig to atomically store 
itself
..


Patch Set 1:

(1 comment)

http://gerrit.ovirt.org/#/c/35709/1/lib/vdsm/netconfpersistence.py
File lib/vdsm/netconfpersistence.py:

Line 223: def _nano_timestamp():
Line 224: return ('%.20f' % time.time()).replace('.', '')[:19]
Line 225: 
Line 226: 
Line 227: def _cleanupPersistence(keep=()):
 this method is never used, not even in dependent changes
It is for the vdsm-store-net-config rewrite in python.
Line 228: Cleans up CONF_PERSIST_DIR from netconfs not in 'keep'
Line 229: for path in glob.iglob(os.path.dirname(CONF_PERSIST_NETCONF_DIR) 
+ '.*'):
Line 230: if path in keep:
Line 231: continue


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ida957b6c68607743b9efa85f4263451c955b398a
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Ido Barkan ibar...@redhat.com
Gerrit-Reviewer: Ondřej Svoboda osvob...@redhat.com
Gerrit-Reviewer: Petr Horáček phora...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
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


Change in vdsm[master]: move _netinfo and libvirt_nets decleration right before it's...

2014-11-28 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: move _netinfo and libvirt_nets decleration right before it's 
used
..


Patch Set 1: Code-Review+1

I like it.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I8c49201eef9dace3dba890989a96c3300442
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ido Barkan ibar...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: rename networksAdded to connectivity_check_networks

2014-11-28 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: rename networksAdded to connectivity_check_networks
..


Patch Set 1: Code-Review+1

A much better name, thanks.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I452e051c1a82734097550c13c766967283386c79
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ido Barkan ibar...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: rename networkAttrs to attrs

2014-11-28 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: rename networkAttrs to attrs
..


Patch Set 1: Code-Review+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I978aad73b0981785b3e7e05d94b8f7d0250fd82f
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ido Barkan ibar...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: drv_name: Make drv_name support unicode types

2014-11-28 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: drv_name: Make drv_name support unicode types
..


Patch Set 4: Verified+1

Passes the unit tests for the drv_name (the failing tests are due to the libnl3
bug on el6.6 that is unrelated).

rhel65_01 tests (60da422*) # ./run_tests_local.sh ipwrapperTests.py
nose.config: INFO: Ignoring files matching ['^\\.', '^_', '^setup\\.py$']
TestDrvinfo
testBridgeEthtoolDrvinfoOK
testTogglePromisc   ERROR
testUtf8BridgeEthtoolDrvinfoOK
TestIpwrapper
testRouteFromText   OK
testRuleFromTextOK
TestLinks
testGetLink ERROR
TestMonitor
testMonitorEvents   OK
testMonitorIterationOK
testWrongMonitorUsage   OK

==
ERROR: testTogglePromisc (ipwrapperTests.TestDrvinfo)
--
Traceback (most recent call last):
  File /root/code/vdsm/tests/ipwrapperTests.py, line 218, in 
testTogglePromisc
ipwrapper.getLink(self._bridge.devName).promisc = True
  File /root/code/vdsm/lib/vdsm/ipwrapper.py, line 317, in getLink
return Link.fromDict(link.get_link(dev))
  File /root/code/vdsm/lib/vdsm/netlink/link.py, line 34, in get_link
link = _get_link(name=name, sock=sock)
  File /root/code/vdsm/lib/vdsm/netlink/link.py, line 147, in _get_link
raise IOError(-err, _nl_geterror())
IOError: [Errno 7] Unspecific failure

==
ERROR: testGetLink (ipwrapperTests.TestLinks)
--
Traceback (most recent call last):
  File /root/code/vdsm/tests/ipwrapperTests.py, line 187, in testGetLink
link = ipwrapper.getLink(self._bridge.devName)
  File /root/code/vdsm/lib/vdsm/ipwrapper.py, line 317, in getLink
return Link.fromDict(link.get_link(dev))
  File /root/code/vdsm/lib/vdsm/netlink/link.py, line 34, in get_link
link = _get_link(name=name, sock=sock)
  File /root/code/vdsm/lib/vdsm/netlink/link.py, line 147, in _get_link
raise IOError(-err, _nl_geterror())
IOError: [Errno 7] Unspecific failure

--
Ran 9 tests in 1.378s

FAILED (errors=2)

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic705eaaad22fb1ed56bca3363a3559ee1b13d63f
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Ido Barkan ibar...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: libnl: workaround for _rtnl_link_get_kernel on el6

2014-11-28 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: libnl: workaround for _rtnl_link_get_kernel on el6
..


Patch Set 3: Verified+1

Fixes the tests:

rhel65_01 tests (el6.6_getlink_workaround*) # ./run_tests_local.sh 
ipwrapperTests.py   
nose.config: INFO: Ignoring files matching ['^\\.', '^_', '^setup\\.py$']
TestDrvinfo
testBridgeEthtoolDrvinfoOK
testTogglePromisc   OK
testUtf8BridgeEthtoolDrvinfoOK
TestIpwrapper
testRouteFromText   OK
testRuleFromTextOK
TestLinks
testGetLink OK
TestMonitor
testMonitorEvents   OK
testMonitorIterationOK
testWrongMonitorUsage   OK

--
Ran 9 tests in 1.361s

OK
rhel65_01 tests (el6.6_getlink_workaround*) #

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

Gerrit-MessageType: comment
Gerrit-Change-Id: If16ea9321669256a1881dccdaed10dda7e6b7379
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Petr Horáček phora...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Petr Horáček phora...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: drv_name: Make drv_name support unicode types

2014-11-28 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: drv_name: Make drv_name support unicode types
..


Patch Set 5: Verified+1

Verified with tip of the branch:

rhel65_01 tests (b9e3976*) # ./run_tests_local.sh ipwrapperTests.py
nose.config: INFO: Ignoring files matching ['^\\.', '^_', '^setup\\.py$']
TestDrvinfo
testBridgeEthtoolDrvinfoOK
testTogglePromisc   OK
testUtf8BridgeEthtoolDrvinfoOK
TestIpwrapper
testRouteFromText   OK
testRuleFromTextOK
TestLinks
testGetLink OK
TestMonitor
testMonitorEvents   OK
testMonitorIterationOK
testWrongMonitorUsage   OK

--
Ran 9 tests in 1.293s

OK

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic705eaaad22fb1ed56bca3363a3559ee1b13d63f
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Ido Barkan ibar...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: libnl: workaround for _rtnl_link_get_kernel on el6

2014-11-28 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: libnl: workaround for _rtnl_link_get_kernel on el6
..


Patch Set 3:

(1 comment)

http://gerrit.ovirt.org/#/c/35518/3/lib/vdsm/netlink/link.py
File lib/vdsm/netlink/link.py:

Line 141: 
Line 142: def _get_link(name=None, index=0, sock=None):
Line 143:  If defined both name and index, index is primary 
Line 144: NLE_SUCCESS = 0
Line 145: NLE_INVAL = 7
 We know that this may very well change soon. We should not use it, and wait
This will not change for any of our supported platforms. El6.6 will continue to 
return EINVAL, and we do not target any other old distro that returns this.
Line 146: 
Line 147: if name is None and index == 0:
Line 148: raise ValueError('Must specify either a name or an index')
Line 149: link = c_void_p()


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

Gerrit-MessageType: comment
Gerrit-Change-Id: If16ea9321669256a1881dccdaed10dda7e6b7379
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Petr Horáček phora...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Petr Horáček phora...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
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


Change in vdsm[master]: libnl: workaround for _rtnl_link_get_kernel on el6

2014-11-28 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: libnl: workaround for _rtnl_link_get_kernel on el6
..


Patch Set 4:

rhel65_01 tests (b9e3976*) # ./run_tests_local.sh ipwrapperTests.py
nose.config: INFO: Ignoring files matching ['^\\.', '^_', '^setup\\.py$']
TestDrvinfo
testBridgeEthtoolDrvinfoOK
testTogglePromisc   OK
testUtf8BridgeEthtoolDrvinfoOK
TestIpwrapper
testRouteFromText   OK
testRuleFromTextOK
TestLinks
testGetLink OK
TestMonitor
testMonitorEvents   OK
testMonitorIterationOK
testWrongMonitorUsage   OK

--
Ran 9 tests in 1.293s

OK

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

Gerrit-MessageType: comment
Gerrit-Change-Id: If16ea9321669256a1881dccdaed10dda7e6b7379
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Petr Horáček phora...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Petr Horáček phora...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: dummy_nics: add hotplug=no so udev does not ifup them

2014-11-28 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: dummy_nics: add hotplug=no so udev does not ifup them
..


Patch Set 4: Verified+1

Ran the functional tests.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: If07817d51ee8c71a1bcfe7d45f110b884fd516fd
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Ido Barkan ibar...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: libnl: workaround for _rtnl_link_get_kernel on el6

2014-11-28 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: libnl: workaround for _rtnl_link_get_kernel on el6
..


Patch Set 5: Code-Review+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: If16ea9321669256a1881dccdaed10dda7e6b7379
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Petr Horáček phora...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Petr Horáček phora...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: networkTests: Make DEFROUTE controllable so the system's gat...

2014-11-28 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: networkTests: Make DEFROUTE controllable so the system's 
gateway is preserved
..


Patch Set 1:

(1 comment)

http://gerrit.ovirt.org/#/c/35701/1/tests/functional/dhcp.py
File tests/functional/dhcp.py:

Line 85: self._pid_file = os.path.join(tmp_dir, 'test.pid')
Line 86: self.pid = None
Line 87: self.lease_file = os.path.join(tmp_dir, 'test.lease')
Line 88: cmd = [_DHCLIENT_BINARY.cmd, '-v', '-1',
Line 89:'-cf', self._conf_file, '-pf', self._pid_file,
 The reordering of args is not related to adding -e, so please avoid it in t
Done
Line 90:'-lf', self.lease_file, '-timeout', 
str(_DHCLIENT_TIMEOUT)]
Line 91: if not default_route:
Line 92: # Instruct Fedora/EL's dhclient-script not to set gateway 
on iface
Line 93: cmd += ['-e', 'DEFROUTE=no']


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I0c0210b188feec45d151060d5cadaefe1ed6dc99
Gerrit-PatchSet: 1
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: Ido Barkan ibar...@redhat.com
Gerrit-Reviewer: Ondřej Svoboda osvob...@redhat.com
Gerrit-Reviewer: Petr Horáček phora...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
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


Change in vdsm[master]: networkTests: Make DEFROUTE controllable so the system's gat...

2014-11-28 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: networkTests: Make DEFROUTE controllable so the system's 
gateway is preserved
..


Patch Set 2: Verified+1

Copying verification score.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I0c0210b188feec45d151060d5cadaefe1ed6dc99
Gerrit-PatchSet: 2
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: Ido Barkan ibar...@redhat.com
Gerrit-Reviewer: Ondřej Svoboda osvob...@redhat.com
Gerrit-Reviewer: Petr Horáček phora...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: networkTests: Make DEFROUTE controllable so the system's gat...

2014-11-28 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: networkTests: Make DEFROUTE controllable so the system's 
gateway is preserved
..


Patch Set 3: Code-Review+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I0c0210b188feec45d151060d5cadaefe1ed6dc99
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: Ido Barkan ibar...@redhat.com
Gerrit-Reviewer: Ondřej Svoboda osvob...@redhat.com
Gerrit-Reviewer: Petr Horáček phora...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: libnl: workaround for _rtnl_link_get_kernel on el6

2014-11-28 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: libnl: workaround for _rtnl_link_get_kernel on el6
..


Patch Set 6: Verified+1 Code-Review+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: If16ea9321669256a1881dccdaed10dda7e6b7379
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Petr Horáček phora...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Petr Horáček phora...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: unit_tests: Make run_tests_local.sh not be a generated file

2014-11-28 Thread asegurap
Antoni Segura Puimedon has abandoned this change.

Change subject: unit_tests: Make run_tests_local.sh not be a generated file
..


Abandoned

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

Gerrit-MessageType: abandon
Gerrit-Change-Id: Ie20647b9a7b447b8ed4082f7cefab2146150594e
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Dima Kuznetsov dkuzn...@redhat.com
Gerrit-Reviewer: Michal Skrivanek mskri...@redhat.com
Gerrit-Reviewer: Yaniv Bronhaim ybron...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: net_func_tests: restore when tests don't clean up after them...

2014-11-28 Thread asegurap
Antoni Segura Puimedon has uploaded a new change for review.

Change subject: net_func_tests: restore when tests don't clean up after 
themselves
..

net_func_tests: restore when tests don't clean up after themselves

After the patch that made the rollback after each test happen only
in case of exception, some tests could fail if the previous test did
not perform a good cleanup.

With this change, we check that the Running Config is always the
original one between tests and that at the end of all the tests
we'll have the original RunningConfig and PersistentConfig.

Change-Id: I0678e1194c31b71c0179c7b46d697a186d44e1c1
Signed-off-by: Antoni S. Puimedon asegu...@redhat.com
---
M tests/functional/networkTests.py
1 file changed, 39 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/10/35710/1

diff --git a/tests/functional/networkTests.py b/tests/functional/networkTests.py
index 3ea1db0..17fe59b 100644
--- a/tests/functional/networkTests.py
+++ b/tests/functional/networkTests.py
@@ -41,11 +41,13 @@
 from vdsm.ipwrapper import (routeExists, ruleExists, addrFlush, LinkType,
 getLinks, routeShowTable)
 
+from vdsm.config import config
 from vdsm.constants import EXT_BRCTL
 from vdsm.utils import RollbackContext, execCmd, running
 from vdsm.netinfo import (bridges, operstate, prefix2netmask, getRouteDeviceTo,
   getDhclientIfaces)
 from vdsm import ipwrapper
+from vdsm import netconfpersistence
 from vdsm.utils import pgrep
 
 import caps
@@ -80,16 +82,18 @@
 
 def setupModule():
 Persists network configuration.
-vdsm = VdsProxy()
-vdsm.save_config()
+if config.get('vars', 'net_persistence') == 'ifcfg':
+vdsm = VdsProxy()
+vdsm.save_config()
 for _ in range(DUMMY_POOL_SIZE):
 dummyPool.add(dummy.create())
 
 
 def tearDownModule():
 Restores the network configuration previous to running tests.
-vdsm = VdsProxy()
-vdsm.restoreNetConfig()
+if config.get('vars', 'net_persistence') == 'ifcfg':
+vdsm = VdsProxy()
+vdsm.restoreNetConfig()
 for nic in dummyPool:
 dummy.remove(nic)
 
@@ -220,6 +224,21 @@
 
 def setUp(self):
 self.vdsm_net = VdsProxy()
+if self.vdsm_net.config is not None:  # unified persistence
+self.pre_running_config = self.vdsm_net.config
+self.pre_persistent_config = netconfpersistence.PersistentConfig()
+self.skip_rest = False
+
+def tearDown(self):
+if self.vdsm_net.config is not None:  # unified persistence
+diff = self.pre_running_config.diffFrom(self.vdsm_net.config)
+if diff:
+self.vdsm_net.setupNetworks(
+diff.networks, diff.bonds,
+{'connectivityCheck': False, '_inRollback=True': True})
+
+# Put back whichever persistent config was at the start
+self.pre_persistent_config.store()
 
 def cleanupNet(func):
 
@@ -230,9 +249,24 @@
 
 @wraps(func)
 def wrapper(*args, **kwargs):
+self = args[0]
+if self.vdsm_net.config is not None and self.skip_rest:
+raise SkipTest('The environment is not clean due to a '
+   'previous test. Skipping!')
 with RollbackContext(on_exception_only=True) as rollback:
-rollback.prependDefer(args[0].vdsm_net.restoreNetConfig)
+rollback.prependDefer(self.vdsm_net.restoreNetConfig)
 func(*args, **kwargs)
+if self.vdsm_net.config is not None:  # unified persistence
+# Cleaning up after messy non-failing tests
+diff = self.pre_running_config.diffFrom(
+self.vdsm_net.config)
+if diff:
+status, msg = self.vdsm_net.setupNetworks(
+diff.networks, diff.bonds,
+{'connectivityCheck': False,
+ '_inRollback=True': True})
+if status != SUCCESS:
+self.skip_rest = True
 return wrapper
 
 def assertNetworkExists(self, networkName, bridged=None, bridgeOpts=None,


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0678e1194c31b71c0179c7b46d697a186d44e1c1
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon asegu...@redhat.com
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: netconf_persistence: teach PersistentConfig to atomically st...

2014-11-28 Thread asegurap
Antoni Segura Puimedon has uploaded a new change for review.

Change subject: netconf_persistence: teach PersistentConfig to atomically store 
itself
..

netconf_persistence: teach PersistentConfig to atomically store itself

This will be used by the test code and in the future by a python
vdsm-store-net-config.

Change-Id: Ida957b6c68607743b9efa85f4263451c955b398a
Signed-off-by: Antoni S. Puimedon asegu...@redhat.com
---
M lib/vdsm/netconfpersistence.py
1 file changed, 37 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/09/35709/1

diff --git a/lib/vdsm/netconfpersistence.py b/lib/vdsm/netconfpersistence.py
index f0aac38..80b2ab7 100644
--- a/lib/vdsm/netconfpersistence.py
+++ b/lib/vdsm/netconfpersistence.py
@@ -19,9 +19,11 @@
 #
 
 import errno
+import glob
 import json
 import logging
 import os
+import time
 
 from .config import config
 from .tool.restore_nets import restore
@@ -33,7 +35,8 @@
 # The persistent path is inside of an extra persistence dir in order to get
 # oVirt Node to persist the symbolic links that are necessary for the
 # atomic storage of running config into persistent config.
-CONF_PERSIST_DIR = constants.P_VDSM_LIB + 'persistence/netconf/'
+CONF_PERSIST_DIR = constants.P_VDSM_LIB + 'persistence/'
+CONF_PERSIST_NETCONF_DIR = CONF_PERSIST_DIR + 'netconf/'
 
 
 class BaseConfig(object):
@@ -194,12 +197,44 @@
 
 class PersistentConfig(Config):
 def __init__(self):
-super(PersistentConfig, self).__init__(CONF_PERSIST_DIR)
+super(PersistentConfig, self).__init__(CONF_PERSIST_NETCONF_DIR)
 
 def restore(self):
 restore()
 return RunningConfig()
 
+def store(self):
+Atomically stores PersistentConfig
+symlink_path = os.path.dirname(CONF_PERSIST_NETCONF_DIR)
+timestamp = _nano_timestamp()
+new_dir = symlink_path + '.' + timestamp
+super(PersistentConfig, self).__init__(new_dir)
+new_symlink = symlink_path + '.link.' + timestamp
+
+logging.debug('Persistence: persisting %s' % new_dir)
+self.save()
+os.symlink(new_dir, new_symlink)
+logging.debug('Persistence: atomically making %s point to the new '
+  'configuration directory %s' %
+  (CONF_PERSIST_NETCONF_DIR, new_dir))
+os.rename(new_symlink, os.path.dirname(CONF_PERSIST_NETCONF_DIR))
+
+
+def _nano_timestamp():
+return ('%.20f' % time.time()).replace('.', '')[:19]
+
+
+def _cleanupPersistence(keep=()):
+Cleans up CONF_PERSIST_DIR from netconfs not in 'keep'
+for path in glob.iglob(os.path.dirname(CONF_PERSIST_NETCONF_DIR) + '.*'):
+if path in keep:
+continue
+logging.debug('Persistence: removing old config %s' % path)
+if os.path.islink(path) or os.path.isfile(path):
+utils.rmFile(path)
+else:  # Directory
+utils.rmTree(path)
+
 
 def configuredPorts(nets, bridge):
 Return the configured ports for the bridge


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ida957b6c68607743b9efa85f4263451c955b398a
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon asegu...@redhat.com
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: net_func_tests: add calling method name to setupNetworks

2014-11-28 Thread asegurap
Antoni Segura Puimedon has uploaded a new change for review.

Change subject: net_func_tests: add calling method name to setupNetworks
..

net_func_tests: add calling method name to setupNetworks

It is usually difficult to know which test originated the
setupNetworks calls in the logs. This patch makes it easier to debug

Change-Id: Id5f07be1f2cef54a773deb8dd73967dc55bf2cf0
Signed-off-by: Antoni S. Puimedon asegu...@redhat.com
---
M tests/functional/utils.py
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/11/35711/1

diff --git a/tests/functional/utils.py b/tests/functional/utils.py
index 40c59ba..87a43dd 100644
--- a/tests/functional/utils.py
+++ b/tests/functional/utils.py
@@ -18,6 +18,7 @@
 #
 from contextlib import contextmanager
 from functools import wraps
+import inspect
 import socket
 import time
 import threading
@@ -152,6 +153,8 @@
 
 @netinfo_altering
 def setupNetworks(self, networks, bonds, options):
+options = dir(options)
+options['_caller'] = inspect()[2][3]  # add calling method for logs
 result = self.vdscli.setupNetworks(networks, bonds, options)
 return result['status']['code'], result['status']['message']
 


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id5f07be1f2cef54a773deb8dd73967dc55bf2cf0
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon asegu...@redhat.com
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: net_func_tests: add calling method name to setupNetworks

2014-11-28 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: net_func_tests: add calling method name to setupNetworks
..


Patch Set 1:

(1 comment)

http://gerrit.ovirt.org/#/c/35711/1/tests/functional/utils.py
File tests/functional/utils.py:

Line 153: 
Line 154: @netinfo_altering
Line 155: def setupNetworks(self, networks, bonds, options):
Line 156: options = dir(options)
Line 157: options['_caller'] = inspect()[2][3]  # add calling method 
for logs
This could be improved by searching for the parent method in the frame stack 
for which self is an instance of 'NetworkTest'
Line 158: result = self.vdscli.setupNetworks(networks, bonds, options)
Line 159: return result['status']['code'], result['status']['message']
Line 160: 
Line 161: def _vlanInRunningConfig(self, devName, vlanId):


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Id5f07be1f2cef54a773deb8dd73967dc55bf2cf0
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Ido Barkan ibar...@redhat.com
Gerrit-Reviewer: Ondřej Svoboda osvob...@redhat.com
Gerrit-Reviewer: Petr Horáček phora...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
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


Change in vdsm[master]: net_func_tests: restore when tests don't clean up after them...

2014-11-28 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: net_func_tests: restore when tests don't clean up after 
themselves
..


Patch Set 1:

This should avoid needless network restoration, prevent messy tests from making 
others fail (avoiding false negatives and head scratching) and speed up the 
test running.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I0678e1194c31b71c0179c7b46d697a186d44e1c1
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Ido Barkan ibar...@redhat.com
Gerrit-Reviewer: Ondřej Svoboda osvob...@redhat.com
Gerrit-Reviewer: Petr Horáček phora...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: move _netinfo and libvirt_nets decleration right before it's...

2014-11-27 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: move _netinfo and libvirt_nets decleration right before it's 
used
..


Patch Set 1: Code-Review+1

Undraft it!

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I8b754fb5a3927fbfccd5aa17dd7bde2eeb7b256e
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ido Barkan ibar...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: rename networksAdded to connectivity_check_networks

2014-11-27 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: rename networksAdded to connectivity_check_networks
..


Patch Set 1: Code-Review+1

And undraft it!

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibeae4e211707b3eb7d6eb8c3e22ede746a957935
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ido Barkan ibar...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: do not delete networks from paramters

2014-11-27 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: do not delete networks from paramters
..


Patch Set 1: Code-Review+1

Nice!

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I8e57ef056cc1b71275a54c72c9388fc6da9dc27f
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ido Barkan ibar...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: factor out parts of setupNetworks for better readability

2014-11-27 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: factor out parts of setupNetworks for better readability
..


Patch Set 1: Code-Review-1

(1 comment)

http://gerrit.ovirt.org/#/c/35659/1/vdsm/network/api.py
File vdsm/network/api.py:

Line 602: 
Line 603: def _add_missing_networks(configurator, networks_to_add, bondings, 
force,
Line 604:   logger):
Line 605: # We need to use the newest host info
Line 606: _netinfo = netinfo.NetInfo()
You should put _netinfo as a optional param defaulting to None and then:

if _netinfo is None:
_netinfo = netinfo.NetInfo()
else:
_netinfo.updateDevices()
Line 607: _netinfo.updateDevices()
Line 608: for network, network_attrs in networks_to_add.iteritems():
Line 609: d = dict(network_attrs)
Line 610: if 'bonding' in d:


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I0c3355aab2804ffaaf8b611de224ef3d2e616eef
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ido Barkan ibar...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
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


Change in vdsm[master]: factor out parts of setupNetworks for better readability

2014-11-27 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: factor out parts of setupNetworks for better readability
..


Patch Set 3: Code-Review+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I0c3355aab2804ffaaf8b611de224ef3d2e616eef
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ido Barkan ibar...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Ido Barkan ibar...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: do not delete networks from parameters

2014-11-27 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: do not delete networks from parameters
..


Patch Set 2: Code-Review+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I8e57ef056cc1b71275a54c72c9388fc6da9dc27f
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ido Barkan ibar...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: rename networkAttrs to attrs

2014-11-27 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: rename networkAttrs to attrs
..


Patch Set 2: Code-Review+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I5006085d79f5250297ac6c6de4be67684ecf7f19
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ido Barkan ibar...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: move _netinfo and libvirt_nets decleration right before it's...

2014-11-27 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: move _netinfo and libvirt_nets decleration right before it's 
used
..


Patch Set 2: Code-Review+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I8b754fb5a3927fbfccd5aa17dd7bde2eeb7b256e
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ido Barkan ibar...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: rename networksAdded to connectivity_check_networks

2014-11-27 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: rename networksAdded to connectivity_check_networks
..


Patch Set 2: Code-Review+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibeae4e211707b3eb7d6eb8c3e22ede746a957935
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ido Barkan ibar...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: split network restoration from vdsmd.service

2014-11-26 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: split network restoration from vdsmd.service
..


Patch Set 3:

(4 comments)

Thanks for the comments Ido!

http://gerrit.ovirt.org/#/c/29441/3/vdsm/vdsm-restore-net-config
File vdsm/vdsm-restore-net-config:

Line 39: import pkgutil
Line 40: 
Line 41: RESTORATION_FILE = constants.P_VDSM_RUN + 'nets_restored'
Line 42: 
Line 43: def ifcfg_restoration(**opts):
 missing newline (in general, pep8)
Done
Line 44: configWriter = ifcfg.ConfigWriter()
Line 45: configWriter.restorePersistentBackup()
Line 46: 
Line 47: 


Line 66: # so that changes of configurator and persistence system are 
smooth.
Line 67: 
Line 68: if flush_configurators:
Line 69: _configurator_flush()
Line 70: libvirt.flush()
 why is libvirt.flush() was moved here from the configurator itself?
Because the configurators deal with device configuration, so it was a bit shaky 
that the base class did libvirt flushing as well.

Moving it here allows us to have configurator flushing in the 
vdsm-network-cleanup.service (which happens so early in boot that it can't use 
libvirt), and then do the libvirt flush before configuring networks here.
Line 71: 
Line 72: persistentConfig = PersistentConfig()
Line 73: nets, bonds = _filter_nets_bonds(persistentConfig.networks,
Line 74:  persistentConfig.bonds)


Line 144: _configured_restore(**opts)
Line 145: 
Line 146: 
Line 147: if config.get('vars', 'net_persistence') == 'unified':
Line 148: _configured_restore= unified_restoration
 missing whitespace
Done
Line 149: else:
Line 150: _configured_restore = ifcfg_restoration
Line 151: 
Line 152: 


Line 164: it back at it's original location. The file is stored with 
its full 
Line 165: path detail.)
Line 166: parser.add_argument('--conditional', action='store_true', 
default=False,
Line 167: help='Perform only when %s does not exist' %
Line 168:   RESTORATION_FILE)
 mixed tabs and spaces
Done
Line 169: subparsers = parser.add_subparsers(help='sub-command help')
Line 170: 
Line 171: # reconfigure
Line 172: parser_reconfigure = subparsers.add_parser(


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I70cdf1e8a1e7063ec850081ac6199728d4cde381
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Ido Barkan ibar...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
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


Change in vdsm[master]: split network restoration from vdsmd.service

2014-11-26 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: split network restoration from vdsmd.service
..


Patch Set 4:

(1 comment)

http://gerrit.ovirt.org/#/c/29441/4/vdsm/vdsm-restore-net-config
File vdsm/vdsm-restore-net-config:

Line 59: for bond in runningConfig.bonds:
Line 60: removeBonds[bond] = {'remove': True}
Line 61: logging.debug('Removing all networks (%s) and bonds (%s) in 
running '
Line 62:   'config.', removeNetworks, removeBonds)
Line 63: setupNetworks(removeNetworks, removeBonds, connectivityCheck=False,
Only run setupNetworks if there is stuff in removeNetworks or removeBonds.
Line 64:   _inRollback=True)
Line 65: 
Line 66: # Flush vdsm configurations left-overs from any configurator on 
the system
Line 67: # so that changes of configurator and persistence system are 
smooth.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I70cdf1e8a1e7063ec850081ac6199728d4cde381
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Ido Barkan ibar...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
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


Change in vdsm[master]: split network restoration from vdsmd.service

2014-11-26 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: split network restoration from vdsmd.service
..


Patch Set 8:

Since now systemd behaves differently, it's better to take this logic out of 
vdsmd_init_common.sh.in (as the latest version does).

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I70cdf1e8a1e7063ec850081ac6199728d4cde381
Gerrit-PatchSet: 8
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Ido Barkan ibar...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: split vdsm-network restoration service from vdsmd

2014-11-25 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: split vdsm-network restoration service from vdsmd
..


Patch Set 1:

(1 comment)

http://gerrit.ovirt.org/#/c/29441/1/init/systemd/vdsm-network.service.in
File init/systemd/vdsm-network.service.in:

Line 12: ExecStart=@VDSMDIR@/vdsm-restore-net-config --conditional
Line 13: 
Line 14: # With the following two directives, we make sure that using systemctl 
to
Line 15: # restart will actually restore the networks
Line 16: RemainAfterExit=yes
This is repeated!
Line 17: ExecStopPost=rm @VDSMRUN@/nets_restored
Line 18: 
Line 19: [Install]


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I70cdf1e8a1e7063ec850081ac6199728d4cde381
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Ido Barkan ibar...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
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


Change in vdsm[master]: split network restoration from vdsmd.service

2014-11-25 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: split network restoration from vdsmd.service
..


Patch Set 3:

I did some interactive testing on el7 and the following was working:

- Nets were restored on boot.
- systemctl reload vdsm-network works (tested when having three nets in 
RunningConfig and two in PersistentConfig)
- systemctl restart works for the above case as well.
- /usr/share/vdsm/vdsm-net-restore-config works for the same case
- vdsm-tool restore-nets owrks for the same case as well.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I70cdf1e8a1e7063ec850081ac6199728d4cde381
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Ido Barkan ibar...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: drv_name: Make drv_name support unicode types

2014-11-24 Thread asegurap
Antoni Segura Puimedon has uploaded a new change for review.

Change subject: drv_name: Make drv_name support unicode types
..

drv_name: Make drv_name support unicode types

Our json serialization and de-serialization for both the hooks and
persistence add unicode text to the flows of our codebase.

Before we would only have foo. Now we have as well ufoo.
In order to make it work in unicode we also need to provide for real
unicode characters uトトロ.

Change-Id: Ic705eaaad22fb1ed56bca3363a3559ee1b13d63f
Signed-off-by: Antoni S. Puimedon asegu...@redhat.com
---
M lib/vdsm/ipwrapper.py
M tests/ipwrapperTests.py
2 files changed, 8 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/71/35471/1

diff --git a/lib/vdsm/ipwrapper.py b/lib/vdsm/ipwrapper.py
index 89280e7..828d395 100644
--- a/lib/vdsm/ipwrapper.py
+++ b/lib/vdsm/ipwrapper.py
@@ -277,6 +277,7 @@
 Returns the driver used by a device.
 Throws IOError ENODEV for non existing devices.
 Throws IOError EOPNOTSUPP for non supported devices, i.g., loopback.
+encoded_name = devName.encode('utf-8')
 ETHTOOL_GDRVINFO = 0x0003  # ETHTOOL Get driver info command
 SIOCETHTOOL = 0x8946  # Ethtool interface
 DRVINFO_FORMAT = '= I 32s 32s 32s 32s 32s 12s 5I'
@@ -284,7 +285,7 @@
 buff = array.array('c', b'\0' * struct.calcsize(DRVINFO_FORMAT))
 cmd = struct.pack('= I', ETHTOOL_GDRVINFO)
 buff[0:len(cmd)] = array.array('c', cmd)
-data = struct.pack(IFREQ_FORMAT, devName, *buff.buffer_info())
+data = struct.pack(IFREQ_FORMAT, encode_name, *buff.buffer_info())
 with closing(socket.socket(socket.AF_INET, socket.SOCK_DGRAM)) as sock:
 fcntl.ioctl(sock, SIOCETHTOOL, data)
 (cmd, driver, version, fw_version, businfo, _, _, n_priv_flags, n_stats,
diff --git a/tests/ipwrapperTests.py b/tests/ipwrapperTests.py
index 89d6a0c..7dd43d5 100644
--- a/tests/ipwrapperTests.py
+++ b/tests/ipwrapperTests.py
@@ -191,18 +191,24 @@
 
 class TestDrvinfo(TestCaseBase):
 _bridge = tcTests._Bridge()
+_unicode_bridge = tcTests._Bridge()
 
 @ValidateRunningAsRoot
 def setUp(self):
 tcTests._checkDependencies()
 self._bridge.addDevice()
+self._unicode_bridge.devName = 'test-トトロ'
+self._unicode_bridge.addDevice()
 
 def tearDown(self):
 self._bridge.delDevice()
+self._unicode_bridge.delDevice()
 
 def testBridgeEthtoolDrvinfo(self):
 self.assertEqual(ipwrapper.drv_name(self._bridge.devName),
  ipwrapper.LinkType.BRIDGE)
+self.assertEqual(ipwrapper.drv_name(self._unicode_bridge.devName),
+ ipwrapper.LinkType.BRIDGE)
 
 def testTogglePromisc(self):
 ipwrapper.getLink(self._bridge.devName).promisc = True


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic705eaaad22fb1ed56bca3363a3559ee1b13d63f
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon asegu...@redhat.com
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: tests: add vdscli.cannonizeHostPort unit tests

2014-11-24 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: tests: add vdscli.cannonizeHostPort unit tests
..


Patch Set 2: Code-Review+1

The address validation looks good to me.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I26ff1ccb6b258c7adf7014fb9bc8c09cb3f32f1a
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani from...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Francesco Romani from...@redhat.com
Gerrit-Reviewer: Ido Barkan ibar...@redhat.com
Gerrit-Reviewer: Nir Soffer nsof...@redhat.com
Gerrit-Reviewer: Yaniv Bronhaim ybron...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: mooli tayer mta...@redhat.com
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: adding tx/rx statistic to getInterfacesStats

2014-11-20 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: adding tx/rx statistic to getInterfacesStats
..


Patch Set 2: Code-Review-1

(4 comments)

http://gerrit.ovirt.org/#/c/35061/2/vdsm/rpc/vdsmapi-schema.json
File vdsm/rpc/vdsmapi-schema.json:

Line 1692: # @rxRate: The rate of incoming packets (as a percentage of 
@speed)
Line 1693: #
Line 1694: # @txRate: The rate of outgoing packets (as a percentage of 
@speed)
Line 1695: #
Line 1696: # @rx:  The number of incoming packets in total
these should be spaces rather than tabs.
Line 1697: #
Line 1698: # @tx:  The number of outgoing packets in total
Line 1699: #
Line 1700: # @macAddr:The hardware address


Line 1694: # @txRate: The rate of outgoing packets (as a percentage of 
@speed)
Line 1695: #
Line 1696: # @rx:  The number of incoming packets in total
Line 1697: #
Line 1698: # @tx:  The number of outgoing packets in total
these should be spaces rather than tabs.
Line 1699: #
Line 1700: # @macAddr:The hardware address
Line 1701: #
Line 1702: # Since: 4.10.0


Line 1728: # @rxRate: The rate of incoming packets (as a percentage of 
@speed)
Line 1729: #
Line 1730: # @txRate: The rate of outgoing packets (as a percentage of 
@speed)
Line 1731: #
Line 1732: # @rx:  The number of incoming packets in total
these should be spaces rather than tabs.
Line 1733: #
Line 1734: # @tx:  The number of outgoing packets in total
Line 1735: #
Line 1736: # Since: 4.11.1


Line 1730: # @txRate: The rate of outgoing packets (as a percentage of 
@speed)
Line 1731: #
Line 1732: # @rx:  The number of incoming packets in total
Line 1733: #
Line 1734: # @tx:  The number of outgoing packets in total
these should be spaces rather than tabs.
Line 1735: #
Line 1736: # Since: 4.11.1
Line 1737: ##
Line 1738: {'type': 'HostNetworkInterfaceStats',


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I314a04570dec56677168e0fdb4a7824d299dbd65
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amir Shladovsky a.shl...@gmail.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Ido Barkan ibar...@redhat.com
Gerrit-Reviewer: Piotr Kliczewski piotr.kliczew...@gmail.com
Gerrit-Reviewer: automat...@ovirt.org
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


Change in vdsm[master]: network: Make vdsmd delNetwork use supervdsmd setupNetworks

2014-11-19 Thread asegurap
Antoni Segura Puimedon has uploaded a new change for review.

Change subject: network: Make vdsmd delNetwork use supervdsmd setupNetworks
..

network: Make vdsmd delNetwork use supervdsmd setupNetworks

delNetwork is part of a very old and deprecated API that we have to
eventually shed off in the next major release. It makes sense to
just make an adapter so that we can simplify network.api to keep
a single entry point.

Change-Id: Ic1ddb7bdd2128c35a3d8198a5ca2850aea974c38
Signed-off-by: Antoni S. Puimedon asegu...@redhat.com
---
M vdsm/API.py
1 file changed, 4 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/10/35310/1

diff --git a/vdsm/API.py b/vdsm/API.py
index 3cdf789..4cdfbc5 100644
--- a/vdsm/API.py
+++ b/vdsm/API.py
@@ -1439,7 +1439,7 @@
 finally:
 self._cif._networkSemaphore.release()
 
-def delNetwork(self, bridge, vlan=None, bond=None, nics=None,
+def delNetwork(self, network, vlan=None, bond=None, nics=None,
options=None):
 Delete a network from this vds.
 if options is None:
@@ -1477,7 +1477,9 @@
 self._cif._netConfigDirty = True
 
 try:
-supervdsm.getProxy().delNetwork(bridge, options)
+supervdsm.getProxy().setupNetworks(
+{network: {'remove': True, 'implicitBonding': True}},
+{}, {'connectivityCheck': False})
 except ConfigNetworkError as e:
 self.log.error(e.message, exc_info=True)
 return {'status': {'code': e.errCode, 'message': e.message}}


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic1ddb7bdd2128c35a3d8198a5ca2850aea974c38
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon asegu...@redhat.com
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: Make _addNetwork and _delNetwork private

2014-11-19 Thread asegurap
Antoni Segura Puimedon has uploaded a new change for review.

Change subject: Make _addNetwork and _delNetwork private
..

Make _addNetwork and _delNetwork private

Change-Id: Ie043a26c795a8c8d71a6142d4df45f6584120338
Signed-off-by: Antoni S. Puimedon asegu...@redhat.com
---
M vdsm/network/api.py
M vdsm/supervdsmServer
2 files changed, 26 insertions(+), 35 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/11/35311/1

diff --git a/vdsm/network/api.py b/vdsm/network/api.py
index 1b09c6c..079c97a 100755
--- a/vdsm/network/api.py
+++ b/vdsm/network/api.py
@@ -227,7 +227,7 @@
 if nics:
 attrs['nic'], = nics
 
-if func.__name__ == 'delNetwork':
+if func.__name__ == '_delNetwork':
 configurator.runningConfig.removeNetwork(attrs.pop('network'))
 else:
 configurator.runningConfig.setNetwork(attrs.pop('network'), attrs)
@@ -238,12 +238,12 @@
 
 
 @_alterRunningConfig
-def addNetwork(network, vlan=None, bonding=None, nics=None, ipaddr=None,
-   netmask=None, prefix=None, mtu=None, gateway=None, dhcpv6=None,
-   ipv6addr=None, ipv6gateway=None, ipv6autoconf=None, force=False,
-   configurator=None, bondingOptions=None, bridged=True,
-   _netinfo=None, qosOutbound=None, defaultRoute=None,
-   blockingdhcp=False, **options):
+def _addNetwork(network, vlan=None, bonding=None, nics=None, ipaddr=None,
+netmask=None, prefix=None, mtu=None, gateway=None, dhcpv6=None,
+ipv6addr=None, ipv6gateway=None, ipv6autoconf=None,
+force=False, configurator=None, bondingOptions=None,
+bridged=True, _netinfo=None, qosOutbound=None,
+defaultRoute=None, blockingdhcp=False, **options):
 nics = nics or ()
 if _netinfo is None:
 _netinfo = netinfo.NetInfo()
@@ -378,8 +378,8 @@
 libvirt.removeNetwork(network)
 configurator.runningConfig.removeNetwork(network)
 return
-delNetwork(network, configurator=configurator, force=True,
-   implicitBonding=False, _netinfo=_netinfo)
+_delNetwork(network, configurator=configurator, force=True,
+implicitBonding=False, _netinfo=_netinfo)
 
 
 def _validateDelNetwork(network, vlan, bonding, nics, bridged, _netinfo):
@@ -406,9 +406,9 @@
 
 
 @_alterRunningConfig
-def delNetwork(network, vlan=None, bonding=None, nics=None, force=False,
-   configurator=None, implicitBonding=True, _netinfo=None,
-   **options):
+def _delNetwork(network, vlan=None, bonding=None, nics=None, force=False,
+configurator=None, implicitBonding=True, _netinfo=None,
+**options):
 if _netinfo is None:
 _netinfo = netinfo.NetInfo()
 
@@ -470,13 +470,13 @@
 def editNetwork(oldBridge, newBridge, vlan=None, bonding=None, nics=None,
 **options):
 with ConfiguratorClass() as configurator:
-delNetwork(oldBridge, configurator=configurator, **options)
-addNetwork(newBridge, vlan=vlan, bonding=bonding, nics=nics,
-   configurator=configurator, **options)
+_delNetwork(oldBridge, configurator=configurator, **options)
+_addNetwork(newBridge, vlan=vlan, bonding=bonding, nics=nics,
+configurator=configurator, **options)
 if utils.tobool(options.get('connectivityCheck', False)):
 if not clientSeen(int(options.get('connectivityTimeout',
   CONNECTIVITY_TIMEOUT_DEFAULT))):
-delNetwork(newBridge, force=True)
+_delNetwork(newBridge, force=True)
 raise ConfigNetworkError(ne.ERR_LOST_CONNECTION,
  'connectivity check failed')
 
@@ -672,8 +672,8 @@
 for network, networkAttrs in networks.items():
 if network in _netinfo.networks:
 logger.debug(Removing network %r, network)
-delNetwork(network, configurator=configurator, force=force,
-   implicitBonding=False, _netinfo=_netinfo)
+_delNetwork(network, configurator=configurator, force=force,
+implicitBonding=False, _netinfo=_netinfo)
 if 'remove' in networkAttrs:
 del networks[network]
 del libvirt_nets[network]
@@ -711,8 +711,8 @@
 
 logger.debug(Adding network %r, network)
 try:
-addNetwork(network, configurator=configurator,
-   implicitBonding=True, _netinfo=_netinfo, **d)
+_addNetwork(network, configurator=configurator,
+implicitBonding=True, _netinfo=_netinfo, **d)
 except ConfigNetworkError as cne:
 if cne.errCode == 

Change in vdsm[master]: Make _addNetwork and _delNetwork private

2014-11-19 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: Make _addNetwork and _delNetwork private
..


Patch Set 1: Code-Review-1

Unfinished

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie043a26c795a8c8d71a6142d4df45f6584120338
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: libnl: make link cache optional for link/route/addr_info

2014-11-18 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: libnl: make link cache optional for link/route/addr_info
..


Patch Set 21: Code-Review+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I0e6aaac0bdb58a0052b25f588e11de03bde3e12f
Gerrit-PatchSet: 21
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Petr Horáček phora...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: libnl: make link_cache optional for route_info

2014-11-18 Thread asegurap
Antoni Segura Puimedon has abandoned this change.

Change subject: libnl: make link_cache optional for route_info
..


Abandoned

Done in the previous patch.

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

Gerrit-MessageType: abandon
Gerrit-Change-Id: I765cbe080f3bcff8b5d9f2eb48adf2be797d2f2f
Gerrit-PatchSet: 11
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Petr Horáček phora...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: libnl: non-existing link exception

2014-11-18 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: libnl: non-existing link exception
..


Patch Set 12: Code-Review+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I4cf5c7d1cb89bb77402b6e3d23fb0e76f06e122e
Gerrit-PatchSet: 12
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Petr Horáček phora...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Petr Horáček phora...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: netlink: ignore_enodev parameter in *_info

2014-11-18 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: netlink: ignore_enodev parameter in *_info
..


Patch Set 11: Code-Review-1

(3 comments)

http://gerrit.ovirt.org/#/c/34925/11//COMMIT_MSG
Commit Message:

Line 9: When we try to get information about the removed device without the
Line 10: cache, _get_link() will end up with ENODEV exception.
Line 11: 
Line 12: This case may happen for example when we catch DELLINK event and then
Line 13: try to get info about the deleted link.
try to get info about a related link that has also been deleted.
Line 14: 
Line 15: Now _link/route/addr_functions() have ignore_enodev parameter. If set 
to
Line 16: True, when ENODEV is raised, _info returns just indexes of devices.
Line 17: 


http://gerrit.ovirt.org/#/c/34925/11/lib/vdsm/netlink/link.py
File lib/vdsm/netlink/link.py:

Line 62: if link_type is not None:
Line 63: info['type'] = link_type
Line 64: 
Line 65: underlying_device_index = _rtnl_link_get_link(link)
Line 66: info['device_index'] = underlying_device_index
this should only be done if underlying_device_index  0
Line 67: if underlying_device_index  0:
Line 68: try:
Line 69: info['device'] = 
_link_index_to_name(underlying_device_index,
Line 70:  cache=cache)


Line 72: if err.errno != errno.ENODEV or not ignore_enodev:
Line 73: raise
Line 74: 
Line 75: master_index = _rtnl_link_get_master(link)
Line 76: info['master_index'] = master_index
same here, this should go in the following line if block
Line 77: if master_index  0:
Line 78: try:
Line 79: info['master'] = _link_index_to_name(master_index, 
cache=cache)
Line 80: except IOError as err:


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I41dfc7178144ae35a6b5bb52c185a337c94138ba
Gerrit-PatchSet: 11
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Petr Horáček phora...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Petr Horáček phora...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
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


Change in vdsm[master]: netlink: event monitor

2014-11-18 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: netlink: event monitor
..


Patch Set 35: Code-Review-1

(5 comments)

http://gerrit.ovirt.org/#/c/32626/35/lib/vdsm/netlink/__init__.py
File lib/vdsm/netlink/__init__.py:

Line 160: [0] * (15 - len(groups_codes))
Try without filling the array, I think it will probably work.


http://gerrit.ovirt.org/#/c/32626/35/lib/vdsm/netlink/monitor.py
File lib/vdsm/netlink/monitor.py:

Line 173: return 
this return should not be here.


Line 176: nl_obje
In line 205 you are rightfully passing a closure of _object input as the 
nl_object parameter. This name for the parameter is wrong, since what it needs 
is not an nl_object but a object processing callback. Find a nicer name ;-)


Line 212: while not self._stop.is_set():
Line 213: if self._timeout:
Line 214: if (time.time() - self._timeStart  
self._timeout):
Line 215: self._stop.set()
Line 216: self._queue.put_nowait(TimeoutError)
TimeoutError() so we pass an instance of the exception.
Line 217: continue
Line 218: fd = _nl_socket_get_fd(self.sock)
Line 219: if select.select([fd], [], [], 0.1) != ([], [], []):
Line 220: _nl_recvmsgs_default(self.sock)


Line 223: _close_socket(self.sock)
Line 224: 
Line 225: _nl_object_get_msgtype = _int_proto(('nl_object_get_msgtype', LIBNL))
Line 226: _nl_nlmsgtype2str = CFUNCTYPE(c_char_p, c_int, c_char_p, c_size_t)(
Line 227: ('nl_nlmsgtype2str', LIBNL))
You're not using these above anymore. Remove what is not used.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I23ea72986564c5a115e36be0e7cf679c28c8ea96
Gerrit-PatchSet: 35
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Petr Horáček phora...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
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


Change in vdsm[master]: network: synced configs

2014-11-18 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: network: synced configs
..


Patch Set 10: Code-Review-1

(3 comments)

http://gerrit.ovirt.org/#/c/35031/10/vdsm/network/configurators/ifcfg.py
File vdsm/network/configurators/ifcfg.py:

Line 159: self._addSourceRoute(nic)
Line 160: if nic.bond is None:
Line 161: if not netinfo.isVlanned(nic.name):
Line 162: ifdown(nic.name)
Line 163: ifup(nic, nic.ipConfig.async)
do the monitoring around this.
Line 164: 
Line 165: def removeBridge(self, bridge):
Line 166: DynamicSourceRoute.addInterfaceTracking(bridge)
Line 167: ifdown(bridge.name)


Line 837: ordered_conditions.append({'name': iface.name, 'qdisc': 
None,
Line 838:'flags': 70723, 'event': 
'new_link'},
Line 839:   {'name': iface.name, 'state': 
'up',
Line 840:'flags': 70723, 'event': 
'new_link'})
Line 841: if iface.ipConfig.ipaddr is not None:
if it has ipaddr or ipv6addr we don't need to check link conditions (as defined 
above)
Line 842: conditions.append({'name': iface.name, 'family': 'inet',
Line 843:'address': iface.ipConfig.ipaddr,
Line 844:'event': 'new_addr'})
Line 845: if iface.ipConfig.ipv6addr is not None:


Line 868: raise
Line 869: except:
Line 870: raise
Line 871: else:
Line 872: for m in mon:
for event in mon
Line 873: for i in conditions:
Line 874: try:
Line 875: if all([conditions[i][k] == m[k]
Line 876: for k in conditions[i].keys()]):


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic9b16cef3afba2c5b46efd45529823b879e98f1e
Gerrit-PatchSet: 10
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Petr Horáček phora...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
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


Change in vdsm[master]: dummy_nics: add hotplug=no so udev does not ifup them

2014-11-12 Thread asegurap
Antoni Segura Puimedon has uploaded a new change for review.

Change subject: dummy_nics: add hotplug=no so udev does not ifup them
..

dummy_nics: add hotplug=no so udev does not ifup them

In EL6 udev/initscripts execute ifup if an ifcfg file exists for the
just plugged device (which applies often for virtual devices). Due
to how troubling this functionality is they removed it from el7/F20+
but in el6 it can disrupt our configuring with parallel ifups,
overriding of bond slaves config, etc.

Change-Id: If07817d51ee8c71a1bcfe7d45f110b884fd516fd
Signed-off-by: Antoni S. Puimedon asegu...@redhat.com
---
M vdsm/network/configurators/ifcfg.py
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/89/35089/1

diff --git a/vdsm/network/configurators/ifcfg.py 
b/vdsm/network/configurators/ifcfg.py
index 6c91455..4f7cc07 100644
--- a/vdsm/network/configurators/ifcfg.py
+++ b/vdsm/network/configurators/ifcfg.py
@@ -659,6 +659,8 @@
 def addNic(self, nic, **opts):
  Create ifcfg-* file with proper fields for NIC 
 conf = ''
+if ipwrapper.Link._detectType(nic.name) == 'dummy':
+opts['hotplug'] = 'no'
 if _hwaddr_required():
 _netinfo = netinfo.NetInfo()
 hwaddr = (_netinfo.nics[nic.name].get('permhwaddr') or


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If07817d51ee8c71a1bcfe7d45f110b884fd516fd
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon asegu...@redhat.com
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: network: Make vdsmd addNetwork use supervdsmd setupNetworks

2014-11-12 Thread asegurap
Antoni Segura Puimedon has uploaded a new change for review.

Change subject: network: Make vdsmd addNetwork use supervdsmd setupNetworks
..

network: Make vdsmd addNetwork use supervdsmd setupNetworks

addNetwork is part of a very old and deprecated API that we have to
eventually shed off in the next major release. It makes sense to
just make an adapter so that we can simplify network.api to keep
a single entry point.

Change-Id: I5bc76dff5add1d29e8e14b86aea358de435a1997
Signed-off-by: Antoni S. Puimedon asegu...@redhat.com
---
M vdsm/API.py
1 file changed, 15 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/90/35090/1

diff --git a/vdsm/API.py b/vdsm/API.py
index 1ef4b00..3cdf789 100644
--- a/vdsm/API.py
+++ b/vdsm/API.py
@@ -1396,7 +1396,7 @@
 finally:
 self._cif._networkSemaphore.release()
 
-def addNetwork(self, bridge, vlan=None, bond=None, nics=None,
+def addNetwork(self, network, vlan=None, bond=None, nics=None,
options=None):
 Add a new network to this vds.
 
@@ -1414,13 +1414,24 @@
 self._cif._netConfigDirty = True
 if vlan:
 options['vlan'] = vlan
+bonds = {}
 if bond:
 options['bonding'] = bond
-if nics:
-options['nics'] = list(nics)
+bonds[bond] = {}
+bond_opts = options.pop('bondingOptions', None)
+if bond_opts is not None:
+bonds[bond]['options'] = bond_opts
+bonds[bond]['nics'] = list(nics)
+else:
+nics = list(nics)
+if nics:
+options['nic'], = nics
 
 try:
-supervdsm.getProxy().addNetwork(bridge, options)
+supervdsm.getProxy().setupNetworks(
+{network: options},
+bonds,
+{'connectivityCheck': False})
 except ConfigNetworkError as e:
 self.log.error(e.message, exc_info=True)
 return {'status': {'code': e.errCode, 'message': e.message}}


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5bc76dff5add1d29e8e14b86aea358de435a1997
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon asegu...@redhat.com
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: libnl: non-existing link exception

2014-11-11 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: libnl: non-existing link exception
..


Patch Set 6: Code-Review-1

(1 comment)

Just one minor thing.

http://gerrit.ovirt.org/#/c/34690/6/lib/vdsm/netlink/link.py
File lib/vdsm/netlink/link.py:

Line 141: else:
Line 142: err = _rtnl_link_get_kernel(sock, index, name, byref(link))
Line 143: if err or link is None:
Line 144: if -err == _NLE_NODEV or link is None:
Line 145: if name is not None:
Please, swap the options:

if name is None:
raise IOError(errno.ENODEV, 'Dev with index %s is not present in the ' %
  'system' % index)
else:
raise IOError(errno.ENODEV, '%s is not present in the system' % name)
Line 146: raise IOError(errno.ENODEV, '%s is not present in the 
system' %
Line 147: name)
Line 148: else:
Line 149: raise IOError(errno.ENODEV, 'Dev with index %s is not 
present '


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I4cf5c7d1cb89bb77402b6e3d23fb0e76f06e122e
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Petr Horáček phora...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Petr Horáček phora...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
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


Change in vdsm[master]: netlink: ignore_enodev parameter in *_info

2014-11-11 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: netlink: ignore_enodev parameter in *_info
..


Patch Set 6: Code-Review+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I41dfc7178144ae35a6b5bb52c185a337c94138ba
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Petr Horáček phora...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Petr Horáček phora...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: netlink: event monitor

2014-11-11 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: netlink: event monitor
..


Patch Set 29: Code-Review-1

(1 comment)

I made this comment expecting the context manager to need it.

http://gerrit.ovirt.org/#/c/32626/29/lib/vdsm/netlink/monitor.py
File lib/vdsm/netlink/monitor.py:

Line 79: while True:
Line 80: if self._thread.is_alive():
Line 81: value = self._thread._queue.get()
Line 82: if value == _STOP_QUEUE:
Line 83: raise StopIteration
This will only happen when there is a timeout, right? If that is the case, we 
should be raising something else like TimeoutError?
Line 84: yield value
Line 85: else:
Line 86: value = self._thread._queue.get_nowait()
Line 87: if value != _STOP_QUEUE:


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I23ea72986564c5a115e36be0e7cf679c28c8ea96
Gerrit-PatchSet: 29
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Petr Horáček phora...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
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


Change in vdsm[master]: netinfo: Displays active slave for the bond in getVdsCaps vd...

2014-11-11 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: netinfo: Displays active slave for the bond in getVdsCaps 
vdsmapi-schema: Adding Active slave support networkTests: Test to check if 
active slave exists
..


Patch Set 6: Code-Review-1

(1 comment)

Sorry I forgot about this little detail.

http://gerrit.ovirt.org/#/c/32915/6/tests/functional/networkTests.py
File tests/functional/networkTests.py:

Line 2356: create_bond_with_mode(nics, 1)
Line 2357: self.assert_active_slave_exists(BONDING_NAME, nics)
Line 2358: create_bond_with_mode(nics, 4)
Line 2359: self.assert_active_slave_doesnt_exist(BONDING_NAME)
Line 2360
You should be destroying the bond after this:
status, msg = self.vdsm_net.setupNetworks({}, {BONDING_NAME: {'remove': 
True}}, NOCHK)
self.assertEqual(status, SUCCESS, msg)


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib6c40755c361523a28cbd68af110e3b20cb9ae25
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Genadi Chereshnya gcher...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Genadi Chereshnya gcher...@redhat.com
Gerrit-Reviewer: Ido Barkan ibar...@redhat.com
Gerrit-Reviewer: Meni Yakove myak...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
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


Change in vdsm[master]: netlink: replace old ipwrapper event monitor

2014-11-11 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: netlink: replace old ipwrapper event monitor
..


Patch Set 3: Code-Review-1

(1 comment)

http://gerrit.ovirt.org/#/c/34929/3/tests/functional/networkTests.py
File tests/functional/networkTests.py:

Line 170: try:
Line 171: state = operstate(device).lower()
Line 172: if state == 'unknown':
Line 173: for event in monitor:
Line 174: if event.device == device and event.state != 
'unknown':
if I'm not mistaken now the monitor is raising just dictionaries, but you are 
keeping an interface here like if we still returned 'event' objects like from 
the ipwrapper monitor.
Line 175: break
Line 176: finally:
Line 177: mon.stop()
Line 178: 


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie7a9765e59a8392fff9b3fd556133159aeb60b1c
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Petr Horáček phora...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
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


Change in vdsm[master]: libnl: non-existing link exception

2014-11-11 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: libnl: non-existing link exception
..


Patch Set 7: Code-Review+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I4cf5c7d1cb89bb77402b6e3d23fb0e76f06e122e
Gerrit-PatchSet: 7
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Petr Horáček phora...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Petr Horáček phora...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: pretty print json in vdsm persistency files

2014-11-10 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: pretty print json in vdsm persistency files
..


Patch Set 2: Code-Review+1

My eyes thank you!

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib4f3b55e76d4dac523a696c4a55734116761bdc2
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ido Barkan ibar...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Ido Barkan ibar...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: netinfo: Drop ifcfg reading from _getNetInfo

2014-11-10 Thread asegurap
Antoni Segura Puimedon has uploaded a new change for review.

Change subject: netinfo: Drop ifcfg reading from _getNetInfo
..

netinfo: Drop ifcfg reading from _getNetInfo

For backwards compatibility we need to report the bridge 'cfg' field
in the network attributes dictionary. Up until now, this was done by
re-reading the 'ifcfg' files of the bridge. After this change, we
will just be adding the 'cfg' field that we already generated for the
bridge device.

Note that 'BOOTPROTO' reporting is already part of _devinfo, so we
don't need that part.

Change-Id: I2a80251cc45792ba5511d22bce9451fb3b36689d
Signed-off-by: Antoni S. Puimedon asegu...@redhat.com
---
M lib/vdsm/netinfo.py
1 file changed, 5 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/12/35012/1

diff --git a/lib/vdsm/netinfo.py b/lib/vdsm/netinfo.py
index d2ef90b..20eadbe 100644
--- a/lib/vdsm/netinfo.py
+++ b/lib/vdsm/netinfo.py
@@ -448,8 +448,8 @@
 data = {}
 try:
 if bridged:
-data.update({'ports': ports(iface), 'stp': bridge_stp_state(iface),
- 'cfg': getIfaceCfg(iface)})
+data.update({'ports': ports(iface),
+ 'stp': bridge_stp_state(iface)})
 else:
 # ovirt-engine-3.1 expects to see the interface attribute iff the
 # network is bridgeless. Please remove the attribute and this
@@ -647,13 +647,6 @@
 return d
 
 
-def _cfgBootprotoCompat(networks):
-Set network 'cfg' 'BOOTPROTO' for backwards engine compatibility.
-for netAttrs in networks.itervalues():
-if netAttrs['bridged'] and 'BOOTPROTO' not in netAttrs['cfg']:
-netAttrs['cfg']['BOOTPROTO'] = netAttrs['bootproto4']
-
-
 def get(vdsmnets=None):
 d = {'bondings': {}, 'bridges': {}, 'networks': {}, 'nics': {},
  'vlans': {}}
@@ -683,7 +676,9 @@
 if dev.isBOND():
 _bondOptsCompat(devinfo)
 
-_cfgBootprotoCompat(d['networks'])
+for net, attrs in d['networks']:
+if attrs['bridged']:
+attrs['cfg'] = d['bridges'][net]['cfg']
 
 return d
 


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2a80251cc45792ba5511d22bce9451fb3b36689d
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon asegu...@redhat.com
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: xmlrpc: marshalling of Long type

2014-11-06 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: xmlrpc: marshalling of Long type
..


Patch Set 2: Code-Review-1

(1 comment)

http://gerrit.ovirt.org/#/c/34856/2/vdsm/rpc/BindingXMLRPC.py
File vdsm/rpc/BindingXMLRPC.py:

Line 46: 
Line 47: 
Line 48: class BindingXMLRPC(object):
Line 49: def __init__(self, cif, log, port):
Line 50: xmlrpclib.Marshaller.dispatch[type(0L)] = (
I'd much rather have you do:

import types # in line 28.

xmlrpclib.Marshaller.dispatch[types.LongType] = (...
Line 51: lambda _, v, w: w(_STRING_VALUE % v)
Line 52: )
Line 53: self.cif = cif
Line 54: self.log = log


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I56341566e4add6a093ba89eb81e09ee9e7a631b1
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski piotr.kliczew...@gmail.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Martin Sivák msi...@redhat.com
Gerrit-Reviewer: Piotr Kliczewski piotr.kliczew...@gmail.com
Gerrit-Reviewer: Saggi Mizrahi smizr...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
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


Change in vdsm[master]: host QoS: have service curve parameters be integers

2014-11-05 Thread asegurap
Antoni Segura Puimedon has uploaded a new change for review.

Change subject: host QoS: have service curve parameters be integers
..

host QoS: have service curve parameters be integers

Change-Id: Id91438cf35d945be9d7e2f51b48b36071838829e
Signed-off-by: Antoni S. Puimedon asegu...@redhat.com
---
M vdsm/network/tc/_parser.py
M vdsm/rpc/vdsmapi-schema.json
2 files changed, 12 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/22/34822/1

diff --git a/vdsm/network/tc/_parser.py b/vdsm/network/tc/_parser.py
index 239818c..c71b2bc 100644
--- a/vdsm/network/tc/_parser.py
+++ b/vdsm/network/tc/_parser.py
@@ -41,28 +41,28 @@
 Returns a numerical bit representation of the textual rate in tokens
 rate = next(tokens)
 if rate[-5:] == 'Gibit':
-return float(rate[:-5]) * 1024 ** 3
+return int(float(rate[:-5]) * 1024 ** 3)
 elif rate[-5:] == 'Mibit':
-return float(rate[:-5]) * 1024 ** 2
+return int(float(rate[:-5]) * 1024 ** 2)
 elif rate[-5:] == 'Kibit':
-return float(rate[:-5]) * 1024
+return int(float(rate[:-5]) * 1024)
 elif rate[-4:] == 'Gbit':
-return float(rate[:-4]) * 1000 ** 3
+return int(float(rate[:-4]) * 1000 ** 3)
 elif rate[-4:] == 'Mbit':
-return float(rate[:-4]) * 1000 ** 2
+return int(float(rate[:-4]) * 1000 ** 2)
 elif rate[-4:] == 'Kbit':
-return float(rate[:-4]) * 1000
+return int(float(rate[:-4]) * 1000)
 else:
-return float(rate[:-3])
+return int(float(rate[:-3]))
 
 
 def parse_size(tokens):
 Returns a numerical byte representation of the textual size in tokens
 size = next(tokens)
 if size[-2:] == 'Mb':
-return float(size[:-2]) * 1024 ** 2
+return int(float(size[:-2]) * 1024 ** 2)
 elif size[-2:] == 'Kb':
-return float(size[:-2]) * 1024
+return int(float(size[:-2]) * 1024)
 else:  # bytes
 return int(size[:-1])
 
@@ -71,11 +71,11 @@
 Returns a numerical µs representation of the textual size in tokens
 size = next(tokens)
 if size[-2:] == 'ms':
-return float(size[:-2]) * 10 ** 3
+return int(float(size[:-2]) * 10 ** 3)
 elif size[-2:] == 'us':
 return int(size[:-2])
 else:  # s
-return float(size[:-1]) * 10 ** 6
+return int(float(size[:-1]) * 10 ** 6)
 
 
 def parse_int(tokens, base=10):
diff --git a/vdsm/rpc/vdsmapi-schema.json b/vdsm/rpc/vdsmapi-schema.json
index 624b686..7617be6 100644
--- a/vdsm/rpc/vdsmapi-schema.json
+++ b/vdsm/rpc/vdsmapi-schema.json
@@ -2663,7 +2663,7 @@
 # Since: 4.17.0
 ##
 {'type': 'BandwidthCurve',
- 'data': {'*m1': 'float', '*d': 'uint', 'm2': 'float'}}
+ 'data': {'*m1': 'int', '*d': 'uint', 'm2': 'int'}}
 
 
 ##


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id91438cf35d945be9d7e2f51b48b36071838829e
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon asegu...@redhat.com
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: host QoS: have service curve parameters be integers

2014-11-05 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: host QoS: have service curve parameters be integers
..


Patch Set 1: Verified+1

Untested outside of the unit testing level.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Id91438cf35d945be9d7e2f51b48b36071838829e
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Lior Vernia lver...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: host QoS: have service curve parameters be integers

2014-11-05 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: host QoS: have service curve parameters be integers
..


Patch Set 1: Verified-1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Id91438cf35d945be9d7e2f51b48b36071838829e
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Lior Vernia lver...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: cleanup: drop several unused local variables

2014-11-05 Thread asegurap
Antoni Segura Puimedon has abandoned this change.

Change subject: cleanup: drop several unused local variables
..


Abandoned

A huge rework will be needed.

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

Gerrit-MessageType: abandon
Gerrit-Change-Id: Ib81c292f900154819e8852c21ae389c323034999
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Nir Soffer nsof...@redhat.com
Gerrit-Reviewer: Saggi Mizrahi smizr...@redhat.com
Gerrit-Reviewer: Yaniv Bronhaim ybron...@redhat.com
Gerrit-Reviewer: oVirt Jenkins CI Server
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: net_tests: Move network unit tests into a subdirectory

2014-11-05 Thread asegurap
Antoni Segura Puimedon has abandoned this change.

Change subject: net_tests: Move network unit tests into a subdirectory
..


Abandoned

Has to be re-done

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

Gerrit-MessageType: abandon
Gerrit-Change-Id: I6960ce365d67ab4bb0a5475d7957e6117bef7e60
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Michal Skrivanek michal.skriva...@redhat.com
Gerrit-Reviewer: Nir Soffer nsof...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: netinfo: Displays active slave for the bond in getVdsCaps vd...

2014-11-04 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: netinfo: Displays active slave for the bond in getVdsCaps 
vdsmapi-schema: Adding Active slave support networkTests: Test to check if 
active slave exists
..


Patch Set 3: Code-Review+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib6c40755c361523a28cbd68af110e3b20cb9ae25
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Genadi Chereshnya gcher...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Genadi Chereshnya gcher...@redhat.com
Gerrit-Reviewer: Ido Barkan ibar...@redhat.com
Gerrit-Reviewer: Meni Yakove myak...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: netlink: event monitor

2014-11-04 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: netlink: event monitor
..


Patch Set 20: Code-Review-1

(17 comments)

http://gerrit.ovirt.org/#/c/32626/20/lib/vdsm/netlink/__init__.py
File lib/vdsm/netlink/__init__.py:

Line 73: if err:
Line 74: _nl_socket_free(sock)
Line 75: raise IOError(-err, _nl_geterror())
Line 76: 
Line 77: if callback_function:
is not None
Line 78: err = _nl_socket_modify_cb(sock, _NL_CB_DEFAULT, _NL_CB_CUSTOM,
Line 79:callback_function, None)
Line 80: 
Line 81: err = _nl_connect(sock, _NETLINK_ROUTE)


Line 145: 
Line 146: def _get_groups_codes(groups):
Line 147: groups_codes = []
Line 148: for g in groups:
Line 149: code = _KNOWN_GROUPS.get(g, None)
.get already has None as default value, no need to specify
Line 150: if not code:
Line 151: raise UnknownGroup
Line 152: groups_codes.append(code)
Line 153: return groups_codes


Line 146: def _get_groups_codes(groups):
Line 147: groups_codes = []
Line 148: for g in groups:
Line 149: code = _KNOWN_GROUPS.get(g, None)
Line 150: if not code:
if code is None
Line 151: raise UnknownGroup
Line 152: groups_codes.append(code)
Line 153: return groups_codes
Line 154: 


Line 186: 
Line 187: _nl_socket_alloc = CFUNCTYPE(c_void_p)(('nl_socket_alloc', LIBNL))
Line 188: _nl_socket_free = _none_proto(('nl_socket_free', LIBNL))
Line 189: 
Line 190: _nl_msg_parse = _int_proto(('nl_msg_parse', LIBNL))
int nlmsg_parse(struct nlmsghdr *  nlh, int  hdrlen, struct nlattr *  tb[],
int  maxtype, struct nla_policy *  policy) 

So CFUNCTYPE for returning int and passing all these params above.
Line 191: _nl_socket_add_memberships = _int_proto(('nl_socket_add_memberships',
Line 192:  LIBNL))
Line 193: _nl_socket_disable_seq_check = 
_int_proto(('nl_socket_disable_seq_check',
Line 194:LIBNL))


Line 188: _nl_socket_free = _none_proto(('nl_socket_free', LIBNL))
Line 189: 
Line 190: _nl_msg_parse = _int_proto(('nl_msg_parse', LIBNL))
Line 191: _nl_socket_add_memberships = _int_proto(('nl_socket_add_memberships',
Line 192:  LIBNL))
this should have its own C prototype as it the C signature is:
int nl_socket_add_memberships(struct nl_sock * sk, int group, ... ) 

So you need the CFUNCTYPE with varargs of int type.
Line 193: _nl_socket_disable_seq_check = 
_int_proto(('nl_socket_disable_seq_check',
Line 194:LIBNL))
Line 195: _nl_socket_drop_memberships = 
_int_proto(('nl_socket_drop_memberships',
Line 196:   LIBNL))


Line 196:   LIBNL))
Line 197: _nl_socket_get_fd = _int_proto(('nl_socket_get_fd', LIBNL))
Line 198: _nl_socket_modify_cb = _int_proto(('nl_socket_modify_cb', LIBNL))
Line 199: _nl_object_get_type = _char_proto(('nl_object_get_type', LIBNL))
Line 200: _nl_recvmsgs_default = _int_proto(('nl_recvmsgs_default', LIBNL))
Review all of them.
Line 201: 
Line 202: _nl_connect = CFUNCTYPE(c_int, c_void_p, c_int)(('nl_connect', LIBNL))
Line 203: _nl_geterror = CFUNCTYPE(c_char_p)(('nl_geterror', LIBNL))
Line 204: 


http://gerrit.ovirt.org/#/c/32626/20/lib/vdsm/netlink/monitor.py
File lib/vdsm/netlink/monitor.py:

Line 29: from addr import _addr_info
Line 30: from link import _link_info, _rtnl_link_alloc_cache
Line 31: from route import _route_info
Line 32: 
Line 33: _STOP_QUEUE = 80
There should be an inline comment for knowing what this is.
Line 34: 
Line 35: 
Line 36: class MonitorError(Exception):
Line 37: pass


Line 65: decnet-ifaddr, decnet-route, ipv6-prefix
Line 66: 
Line 67: def __init__(self):
Line 68: self.queue = Queue.Queue()
Line 69: self.thread = MonitorThread(self)
self._queue
self._thread

Don't pass self to the monitor Thread. better pass the Queue and other things 
it needs here.
Line 70: 
Line 71: def __iter__(self):
Line 72: try:
Line 73: while True:


Line 70: 
Line 71: def __iter__(self):
Line 72: try:
Line 73: while True:
Line 74: if not self.thread.is_alive():
First process if it is alive, then the else.
Line 75: yield self.queue.get_nowait()
Line 76: else:
Line 77: value = self.queue.get()
Line 78: if value == _STOP_QUEUE:


Line 89: threading.Thread.__init__(self.thread)
Line 90: if not groups or 'all' in groups:
Line 91: self.groups = _KNOWN_GROUPS.keys()
Line 92: else:
Line 93: groups
Remove!
Line 94: self.groups = list(groups)

Change in vdsm[master]: openstacknet: Fix migration when using security groups

2014-10-30 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: openstacknet: Fix migration when using security groups
..


Patch Set 4: Verified+1

Installed the rpm with 3.5 installed and it allows migration :-)

Things that were tested:

Create an extenally attached vnic with security groups,
create yet another externally attached vnic with security groups.

migrate the machine to a host with the patch installed from rpm
see that the connectivity is kept.

migrate a second VM with external net (with security groups as well).
Tear down VM.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Icd8a789c4565f32b32965af3966a4edd361949ea
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Francesco Romani from...@redhat.com
Gerrit-Reviewer: Ido Barkan ibar...@redhat.com
Gerrit-Reviewer: Mike Kolesnik mkole...@redhat.com
Gerrit-Reviewer: Moti Asayag masa...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: libnl: drop libnl-1 dependency

2014-10-30 Thread asegurap
Antoni Segura Puimedon has uploaded a new change for review.

Change subject: libnl: drop libnl-1 dependency
..

libnl: drop libnl-1 dependency

El6.6 is out. Since the next release of vdsm will not support
earlier releases than that, we can finally depend exclusively on
libnl3 and remove libnl1 glue code.

The next step should be to leverage the extra things that libnl3
gives us that we could not use up until now, e.g., routes support
for source routing.

Change-Id: I3a6fa58a79030d4d56bfec59b2c459830aa5e317
Signed-off-by: Antoni S. Puimedon asegu...@redhat.com
---
M debian/control
M debian/dependencyMap.txt
M lib/vdsm/ipwrapper.py
M lib/vdsm/netlink/__init__.py
M lib/vdsm/netlink/addr.py
M lib/vdsm/netlink/link.py
M lib/vdsm/netlink/route.py
M vdsm.spec.in
8 files changed, 83 insertions(+), 123 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/77/34677/1

diff --git a/debian/control b/debian/control
index c35eb34..9a369c5 100644
--- a/debian/control
+++ b/debian/control
@@ -77,7 +77,7 @@
  initscripts (= 2.88),
  iproute,
  libguestfs-tools,
- libnl1,
+ libnl-utils,
  libsanlock-client1 (= 2.4),
  libsanlock-dev (= 2.4),
  libvirt-bin (= 1.1.1),
diff --git a/debian/dependencyMap.txt b/debian/dependencyMap.txt
index f5ab926..701f407 100644
--- a/debian/dependencyMap.txt
+++ b/debian/dependencyMap.txt
@@ -22,7 +22,7 @@
 kernel = 3.6  linux-image-generic
 libguestfs-tools   libguestfs-tools
 libguestfs-tools-c ?
-libnl   libnl1
+libnl   libnl-utils
 libselinux-python  python-selinux
 libtoollibtool
 libvirt = 1.0.2-1 libvirt-bin libvirt0
diff --git a/lib/vdsm/ipwrapper.py b/lib/vdsm/ipwrapper.py
index 481c050..89280e7 100644
--- a/lib/vdsm/ipwrapper.py
+++ b/lib/vdsm/ipwrapper.py
@@ -145,10 +145,8 @@
 
 @classmethod
 def fromDict(cls, data):
-# TODO: Tune the following line to use in some cases the type when
-# libnl1 type getting is fixed
-# https://github.com/tgraf/libnl-1.1-stable/issues/1
-data['linkType'] = cls._detectType(data['name'])
+data['linkType'] = (data['type'] if 'type' in data else
+cls._detectType(data['name']))
 return cls(**data)
 
 @staticmethod
diff --git a/lib/vdsm/netlink/__init__.py b/lib/vdsm/netlink/__init__.py
index cff7ced..694ce49 100644
--- a/lib/vdsm/netlink/__init__.py
+++ b/lib/vdsm/netlink/__init__.py
@@ -100,9 +100,7 @@
 def _scope_to_str(scope_num):
 Returns the textual scope representation of the numerical id
 scope = (c_char * CHARBUFFSIZE)()
-scope = _rtnl_scope2str(scope_num, scope, sizeof(scope))
-# libnl1 reports 'universe' instead of 'global'
-return 'global' if scope == 'universe' else scope
+return _rtnl_scope2str(scope_num, scope, sizeof(scope))
 
 # C function prototypes
 # http://docs.python.org/2/library/ctypes.html#function-prototypes
@@ -116,26 +114,11 @@
 _none_proto = CFUNCTYPE(None, c_void_p)
 
 
-try:
-LIBNL = CDLL('libnl-3.so.200',  use_errno=True)
-LIBNL_ROUTE = CDLL('libnl-route-3.so.200',  use_errno=True)
+LIBNL = CDLL('libnl-3.so.200',  use_errno=True)
+LIBNL_ROUTE = CDLL('libnl-route-3.so.200',  use_errno=True)
 
-_nl_socket_alloc = CFUNCTYPE(c_void_p)(('nl_socket_alloc', LIBNL))
-_nl_socket_free = _none_proto(('nl_socket_free', LIBNL))
-
-except OSError:  # CDLL failed to load libnl3, assume libnl-1
-# Change from handle to socket as it is now more accurately called in
-# libnl-3
-LIBNL_ROUTE = LIBNL = CDLL('libnl.so.1', use_errno=True)
-
-_nl_socket_alloc = CFUNCTYPE(c_void_p)(('nl_handle_alloc', LIBNL))
-_nl_socket_free = _none_proto(('nl_handle_destroy', LIBNL))
-
-def _alloc_cache(allocator, sock):
-cache = allocator(sock)
-if cache is None:
-raise IOError(get_errno(), 'Failed to allocate the cache')
-return cache
+_nl_socket_alloc = CFUNCTYPE(c_void_p)(('nl_socket_alloc', LIBNL))
+_nl_socket_free = _none_proto(('nl_socket_free', LIBNL))
 
 _nl_connect = CFUNCTYPE(c_int, c_void_p, c_int)(('nl_connect', LIBNL))
 _nl_geterror = CFUNCTYPE(c_char_p)(('nl_geterror', LIBNL))
diff --git a/lib/vdsm/netlink/addr.py b/lib/vdsm/netlink/addr.py
index 960f4ee..c9c667d 100644
--- a/lib/vdsm/netlink/addr.py
+++ b/lib/vdsm/netlink/addr.py
@@ -21,7 +21,7 @@
 
 from . import _cache_manager, _nl_cache_get_first, _nl_cache_get_next
 from . import _char_proto, _int_char_proto, _int_proto, _void_proto
-from . import LIBNL, LIBNL_ROUTE, _nl_geterror, _pool
+from . import LIBNL_ROUTE, _nl_geterror, _pool
 from . import _addr_to_str, _af_to_str, _scope_to_str, CHARBUFFSIZE
 from .link import _nl_link_cache, _link_index_to_name
 
@@ -64,25 +64,18 @@
 # This helps ctypes know the calling conventions it should use to communicate
 # with the binary interface of libnl and which types it should allocate and
 # cast. Without it ctypes fails when not running on the main thread.

Change in vdsm[master]: relax the validation multiple networks on the same interface

2014-10-29 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: relax the validation multiple networks on the same interface
..


Patch Set 5: Code-Review+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I0030433ef519ae6699ee8a921b95c0a67f7b2eae
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ido Barkan ibar...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Ido Barkan ibar...@redhat.com
Gerrit-Reviewer: Igor Lvovsky ilvov...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[ovirt-3.5]: QoS: Remove broken libvirt-based host network QoS

2014-10-24 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: QoS: Remove broken libvirt-based host network QoS
..


Patch Set 3: Code-Review+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I7b82cc6b656fb6af8caa2940c9ee2d14287f3526
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.5
Gerrit-Owner: Petr Horáček phora...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Ido Barkan ibar...@redhat.com
Gerrit-Reviewer: Petr Horáček phora...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: clean dhclient processes that are left after functional tests

2014-10-23 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: clean dhclient processes that are left after functional tests
..


Patch Set 3: Code-Review-1

Can you explain why you do a SIGKILL rather than a 'dhclient -x' or 'dchlient 
-r' for the device? SIGKILL will not clean up test leases.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I458aa38415c697d3863e173444ff921d759166a2
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ido Barkan ibar...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Ido Barkan ibar...@redhat.com
Gerrit-Reviewer: Nir Soffer nsof...@redhat.com
Gerrit-Reviewer: Petr Horáček phora...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: caps: Additional ppc64 hardware information

2014-10-23 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: caps: Additional ppc64 hardware information
..


Patch Set 3: Code-Review-1

(1 comment)

http://gerrit.ovirt.org/#/c/33857/3/vdsm/ppc64HardwareInfo.py
File vdsm/ppc64HardwareInfo.py:

Line 50: infoStructure['systemSerialNumber'] = value
Line 51: elif key == 'machine':
Line 52: infoStructure['systemVersion'] = value
Line 53: 
Line 54: _updateFromDeviceTree(infoStructure, 'systemUUID', 'system-id')
I have to say, that I find much more pythonic and simple the following:

infoStructure['systemUUID'] = _getFromDeviceTree('system-id')

where _getFromDeviceTree just takes the tree property and returns the value.
IMHO it is much cleaner to have a referentially transparent method that one
that operates in passed data structures.
Line 55: 
Line 56: _updateFromDeviceTree(infoStructure, 'systemProductName', 
'model-name')
Line 57: 
Line 58: _updateFromDeviceTree(infoStructure, 'systemManufacturer', 
'vendor')


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I8f67a830740b64bc246f680f2c7a18a4293f4cc2
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Vitor de Lima vdel...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Francesco Romani from...@redhat.com
Gerrit-Reviewer: Vinzenz Feenstra vfeen...@redhat.com
Gerrit-Reviewer: Vitor de Lima vdel...@redhat.com
Gerrit-Reviewer: Yaniv Bronhaim ybron...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
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


Change in vdsm[master]: clean dhclient processes that are left after functional tests

2014-10-23 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: clean dhclient processes that are left after functional tests
..


Patch Set 3: Code-Review+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I458aa38415c697d3863e173444ff921d759166a2
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ido Barkan ibar...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Ido Barkan ibar...@redhat.com
Gerrit-Reviewer: Nir Soffer nsof...@redhat.com
Gerrit-Reviewer: Petr Horáček phora...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: openstacknet: Fix migration when using security groups

2014-10-23 Thread asegurap
Antoni Segura Puimedon has uploaded a new change for review.

Change subject: openstacknet: Fix migration when using security groups
..

openstacknet: Fix migration when using security groups

When migrating, the destination libvirt receives an xml already
altered by before_device_create like this test one:

?xml version=1.0 encoding=utf-8?
interface type=bridge
mac address=00:1a:4a:16:01:51/
model type=virtio/
source bridge=qbrtest_port_i/
target dev=taptest_port_i/
/interface

The issue is that before_device_create hooking point is not part
of the migration and it is the only thing that creates the security
groups bridge and the necessary veths. In order to have migration
working, then, it was necessary to add a hook that on the hooking
point 'before_device_migrate' does the security groups bridge and
veths creation.

Change-Id: Icd8a789c4565f32b32965af3966a4edd361949ea
Bug-Url: https://bugzilla.redhat.com/1048880
Signed-off-by: Antoni S. Puimedon asegu...@redhat.com
---
M vdsm_hooks/openstacknet/Makefile.am
M vdsm_hooks/openstacknet/before_device_create.py
A vdsm_hooks/openstacknet/before_device_migrate_destination.py
M vdsm_hooks/openstacknet/openstacknet_utils.py
4 files changed, 137 insertions(+), 47 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/06/34406/1

diff --git a/vdsm_hooks/openstacknet/Makefile.am 
b/vdsm_hooks/openstacknet/Makefile.am
index 2baab05..4cd9c67 100644
--- a/vdsm_hooks/openstacknet/Makefile.am
+++ b/vdsm_hooks/openstacknet/Makefile.am
@@ -32,6 +32,7 @@
after_device_create.py \
after_device_destroy.py \
before_device_create.py \
+   before_device_migrate_destination.py \
$(constsfile) \
sudoers.in
 
@@ -57,6 +58,9 @@
$(MKDIR_P) $(DESTDIR)$(vdsmhooksdir)/before_device_create
$(INSTALL_SCRIPT) $(srcdir)/before_device_create.py \
$(DESTDIR)$(vdsmhooksdir)/before_device_create/50_openstacknet
+   $(MKDIR_P) $(DESTDIR)$(vdsmhooksdir)/before_device_migrate_destination
+   $(INSTALL_SCRIPT) $(srcdir)/before_device_migrate_destination.py \
+   
$(DESTDIR)$(vdsmhooksdir)/before_device_migrate_destination/50_openstacknet
$(MKDIR_P) $(DESTDIR)$(vdsmhooksdir)/before_nic_hotplug
$(INSTALL_SCRIPT) $(srcdir)/before_device_create.py \
$(DESTDIR)$(vdsmhooksdir)/before_nic_hotplug/50_openstacknet
@@ -68,6 +72,7 @@
$(RM) $(DESTDIR)$(vdsmhooksdir)/after_nic_hotplug/50_openstacknet
$(RM) $(DESTDIR)$(vdsmhooksdir)/after_nic_hotunplug/50_openstacknet
$(RM) $(DESTDIR)$(vdsmhooksdir)/before_device_create/50_openstacknet
+   $(RM) 
$(DESTDIR)$(vdsmhooksdir)/before_device_migrate_destination/50_openstacknet
$(RM) $(DESTDIR)$(vdsmhooksdir)/before_nic_hotplug/50_openstacknet
 
 install-data-consts:
@@ -89,6 +94,8 @@
$(MKDIR_P) $(DESTDIR)$(vdsmhooksdir)/before_device_create
$(INSTALL_SCRIPT) $(srcdir)/$(constsfile) \
$(DESTDIR)$(vdsmhooksdir)/before_device_create/$(constsfile)
+   $(INSTALL_SCRIPT) $(srcdir)/$(constsfile) \
+   
$(DESTDIR)$(vdsmhooksdir)/before_device_migrate_destination/$(constsfile)
$(MKDIR_P) $(DESTDIR)$(vdsmhooksdir)/before_nic_hotplug
$(INSTALL_SCRIPT) $(srcdir)/$(constsfile) \
$(DESTDIR)$(vdsmhooksdir)/before_nic_hotplug/$(constsfile)
@@ -100,6 +107,7 @@
$(RM) $(DESTDIR)$(vdsmhooksdir)/after_nic_hotplug/$(constsfile)
$(RM) $(DESTDIR)$(vdsmhooksdir)/after_nic_hotunplug/$(constsfile)
$(RM) $(DESTDIR)$(vdsmhooksdir)/before_device_create/$(constsfile)
+   $(RM) 
$(DESTDIR)$(vdsmhooksdir)/before_device_migrate_destination/$(constsfile)
$(RM) $(DESTDIR)$(vdsmhooksdir)/before_nic_hotplug/$(constsfile)
 
 install-data-sudoers:
diff --git a/vdsm_hooks/openstacknet/before_device_create.py 
b/vdsm_hooks/openstacknet/before_device_create.py
index de7a896..d326cd5 100755
--- a/vdsm_hooks/openstacknet/before_device_create.py
+++ b/vdsm_hooks/openstacknet/before_device_create.py
@@ -31,15 +31,12 @@
 '''
 
 import os
-import subprocess
 import sys
 import traceback
 from xml.dom import minidom
 
 import hooking
 from openstacknet_utils import DUMMY_BRIDGE
-from openstacknet_utils import EXT_BRCTL
-from openstacknet_utils import EXT_IP
 from openstacknet_utils import INTEGRATION_BRIDGE
 from openstacknet_utils import OPENSTACK_NET_PROVIDER_TYPE
 from openstacknet_utils import PLUGIN_TYPE_KEY
@@ -48,10 +45,8 @@
 from openstacknet_utils import PT_OVS
 from openstacknet_utils import SECURITY_GROUPS_KEY
 from openstacknet_utils import VNIC_ID_KEY
-from openstacknet_utils import deviceExists
 from openstacknet_utils import devName
-from openstacknet_utils import executeOrExit
-from openstacknet_utils import ovs_vsctl
+from openstacknet_utils import setUpSecurityGroupVnic
 
 HELP_ARG = -h
 TEST_ARG 

Change in vdsm[master]: spec: require latest version of IOProcess

2014-10-23 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: spec: require latest version of IOProcess
..


Patch Set 1: Verified-1 Code-Review+1

the packages are still not pushed to stable by bodhi

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic70d15fe0b9827707a51654e31327f7a50c479ac
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yeela Kaplan ykap...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Saggi Mizrahi smizr...@redhat.com
Gerrit-Reviewer: Yaniv Bronhaim ybron...@redhat.com
Gerrit-Reviewer: Yeela Kaplan ykap...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: Sysctl to allow iSCSI multipath with multiple NICs in the sa...

2014-10-23 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: Sysctl to allow iSCSI multipath with multiple NICs in the same 
subnet
..


Patch Set 17: Code-Review+1

Then it's okay for me.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibf93d49317c76aece764e53e58e0ff28868f16b0
Gerrit-PatchSet: 17
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amador Pahim apa...@redhat.com
Gerrit-Reviewer: Amador Pahim apa...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Nir Soffer nsof...@redhat.com
Gerrit-Reviewer: Sergey Gotliv sgot...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: jian wang wjia...@gmail.com
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: caps: Additional ppc64 hardware information

2014-10-23 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: caps: Additional ppc64 hardware information
..


Patch Set 4: Code-Review+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I8f67a830740b64bc246f680f2c7a18a4293f4cc2
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Vitor de Lima vdel...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Francesco Romani from...@redhat.com
Gerrit-Reviewer: Vinzenz Feenstra vfeen...@redhat.com
Gerrit-Reviewer: Vitor de Lima vdel...@redhat.com
Gerrit-Reviewer: Yaniv Bronhaim ybron...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[ovirt-3.5]: QoS: Remove broken libvirt-based host network QoS

2014-10-22 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: QoS: Remove broken libvirt-based host network QoS
..


Patch Set 2: Code-Review-1

(1 comment)

http://gerrit.ovirt.org/#/c/34319/2//COMMIT_MSG
Commit Message:

Line 27: bandwidth element in network vdsm-test-network with forward
Line 28: mode='bridge'
Line 29: 
Line 30: Conflicts:
Line 31:lib/vdsm/netinfo.py
If you solved the conflicts, as I hope you did, you should remove these two 
lines above ;-)
Line 32: 
Line 33: Change-Id: I7b82cc6b656fb6af8caa2940c9ee2d14287f3526
Line 34: Signed-off-by: Antoni S. Puimedon asegu...@redhat.com
Line 35: Reviewed-on: http://gerrit.ovirt.org/30198


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I7b82cc6b656fb6af8caa2940c9ee2d14287f3526
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.5
Gerrit-Owner: Petr Horáček phora...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Ido Barkan ibar...@redhat.com
Gerrit-Reviewer: Petr Horáček phora...@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


Change in vdsm[master]: netinfo: drop unused graph() function

2014-10-21 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: netinfo: drop unused graph() function
..


Patch Set 1: Code-Review+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I245e5f83f56ef3aba7b3095724ec3fb54854ab4a
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Ido Barkan ibar...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: network.api: use function-like print statements

2014-10-21 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: network.api: use function-like print statements
..


Patch Set 2: Code-Review+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I2e97a0cb2accd857fcd47e3d9165e408c017bee6
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Ido Barkan ibar...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: vdsm.config, vdscli: use function-like print statements

2014-10-21 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: vdsm.config, vdscli: use function-like print statements
..


Patch Set 1: Code-Review+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Iba31dd389815c192231c535f8a729d1781a27fff
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Federico Simoncelli fsimo...@redhat.com
Gerrit-Reviewer: Yaniv Bronhaim ybron...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: setupNetworks: doesn't remove broken nw from runningConfig

2014-10-20 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: setupNetworks: doesn't remove broken nw from runningConfig
..


Patch Set 8:

(1 comment)

http://gerrit.ovirt.org/#/c/33995/8//COMMIT_MSG
Commit Message:

Line 10: is not listed in netinfo, but it's in libvirt, _delBrokenNetwork()
Line 11: is called.
Line 12: 
Line 13: The problem is that when the network doesn't have an existing device,
Line 14: we only remove it from libvirt and leave it in RunningConfig.
 What happens if a stale network remains in RunningConfig? (There is still a
For that we should have a better handling of out of sync conditions in a 
separate patch. I would say keep if fully configured, delete otherwise.
Line 15: 
Line 16: Now _delBrokenNetwork() remove broken network from runningConfig.
Line 17: 
Line 18: Change-Id: I0c507626705d7ead84db2f3aa15e4032f9558d12


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I0c507626705d7ead84db2f3aa15e4032f9558d12
Gerrit-PatchSet: 8
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Petr Horáček phora...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Petr Horáček phora...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
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


Change in vdsm[master]: Sysctl to allow iSCSI multipath with multiple NICs in the sa...

2014-10-20 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: Sysctl to allow iSCSI multipath with multiple NICs in the same 
subnet
..


Patch Set 17:

(1 comment)

http://gerrit.ovirt.org/#/c/31529/17/vdsm/vdsm-sysctl.conf
File vdsm/vdsm-sysctl.conf:

Line 9: # For the ARP flux problem, where the machine may respond to ARP 
requests
Line 10: # from all Ethernet interfaces, we are setting arp_ignore=1 and
Line 11: # arp_announce=2
Line 12: net.ipv4.conf.default.arp_ignore = 1
Line 13: net.ipv4.conf.default.arp_announce = 2
Have you tried this with running more than one VM on the host and making them 
communicate among themselves and to other machines in the network?


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibf93d49317c76aece764e53e58e0ff28868f16b0
Gerrit-PatchSet: 17
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amador Pahim apa...@redhat.com
Gerrit-Reviewer: Amador Pahim apa...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Nir Soffer nsof...@redhat.com
Gerrit-Reviewer: Sergey Gotliv sgot...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: jian wang wjia...@gmail.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


Change in vdsm[master]: mkimage: more robust content signature

2014-10-20 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: mkimage: more robust content signature
..


Patch Set 5: Code-Review-1

(2 comments)

http://gerrit.ovirt.org/#/c/34203/5//COMMIT_MSG
Commit Message:

Line 60: The proper fix is to always avoid chunked encoding
Line 61: on Engine side.
Line 62: 
Line 63: However, this issue exposed a minor flaw on VDSM side.
Line 64: Since multiple valid base54 encoding exists for the same
s/base54/base64/ ?
Line 65: cleartext, VDSM must compute content's signature
Line 66: based on the cleartext, not on the cyphertext.
Line 67: 
Line 68: This patch address this.


http://gerrit.ovirt.org/#/c/34203/5/vdsm/mkimage.py
File vdsm/mkimage.py:

Line 83: sign.update(''.join(files.keys()))
Line 84: # multiple valid base64 encoding exists for the same cleartext,
Line 85: # so we must compute the sum on cleartext, not on cyphertext.
Line 86: # See rhbz#1145636
Line 87: for content in files.values():
let's better sort not to rely on the dictionary iteration ordering.
Line 88: sign.update(base64.b64decode(content))
Line 89: return sign.hexdigest()
Line 90: 
Line 91: 


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Id8dfd32eacd5c5a01d0ba27a8403a46d4bea02ab
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani from...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Francesco Romani from...@redhat.com
Gerrit-Reviewer: Michal Skrivanek michal.skriva...@redhat.com
Gerrit-Reviewer: Piotr Kliczewski piotr.kliczew...@gmail.com
Gerrit-Reviewer: automat...@ovirt.org
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


Change in vdsm[master]: virt: move sound device to vmdevices

2014-10-20 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: virt: move sound device to vmdevices
..


Patch Set 6: Code-Review+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I42b8ae3475373d39c7d6375ccbc23a85437e19d0
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Polednik mpoled...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Francesco Romani from...@redhat.com
Gerrit-Reviewer: Martin Polednik mpoled...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[ovirt-3.5]: netinfo, tool: Add a vdsm-tool to determine bonding defaults...

2014-10-20 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: netinfo, tool: Add a vdsm-tool to determine bonding defaults 
offline
..


Patch Set 2: Code-Review+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I89b907ba80f23f417d5e481db9350247445ab772
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.5
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: Ondřej Svoboda osvob...@redhat.com
Gerrit-Reviewer: Yaniv Bronhaim ybron...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[ovirt-3.5]: netinfotests: Do not assume the existence of /var/lib/vdsm/b...

2014-10-20 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: netinfotests: Do not assume the existence of 
/var/lib/vdsm/bonding-defaults.json
..


Patch Set 3: Code-Review+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I8ec872739729e11ff9e4a9d30cdac36733d60bae
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.5
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: Ondřej Svoboda osvob...@redhat.com
Gerrit-Reviewer: Yaniv Bronhaim ybron...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: VDSM hook for random network allocation during VM power on

2014-10-20 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: VDSM hook for random network allocation during VM power on
..


Patch Set 3:

(4 comments)

http://gerrit.ovirt.org/#/c/34114/3//COMMIT_MSG
Commit Message:

Line 13: load.
Line 14: The more VMs allocated with networks, the
Line 15: tendency of VMs to be evenly distributed among
Line 16: networks rise.
Line 17: The hook uses CustomDeciveProperties and a property
s/CustomDeciveProperties/CustomDeviceProperties/
Line 18: called 'equivnets' which is a comma separated list
Line 19: of network names. When the VM is started, a random
Line 20: network is allocated to it.
Line 21: 


http://gerrit.ovirt.org/#/c/34114/3/vdsm_hooks/allocate_net/before_device_create.py
File vdsm_hooks/allocate_net/before_device_create.py:

Line 1: #!/usr/bin/python
/usr/bin/env python
Line 2: #
Line 3: # Copyright 2014 Red Hat, Inc.
Line 4: #
Line 5: # This program is free software; you can redistribute it and/or modify


Line 42: 
Line 43: 
Line 44: def _parse_available_nets():
Line 45: return [net.strip()
Line 46: for net in os.environ[AVAIL_NETS_KEY].split(',') if net]
I would rather have the separator be whitespace instead of ',' since ',' is a 
valid character for bridge names and ' ' is not.

Additionally, since this method contains 'available' in its name, I'd say it 
would be ideal if we were to check that a bridge with the name exists or we 
filter it out, as the attaching would be impossible.
Line 47: 
Line 48: 
Line 49: def _get_random_network():
Line 50: available_nets = _parse_available_nets()


Line 86: interface.toxml(encoding='UTF-8')
Line 87: 
Line 88: allocate_random_network(interface)
Line 89: print Interface after removing filter: %s % \
Line 90: interface.toxml(encoding='UTF-8')
please, use print() rather than the print statement for forwards compatibility.
Line 91: 
Line 92: 
Line 93: def main():
Line 94: device_xml = hooking.read_domxml()


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib14c76994918750e7eef460411acc337599b0186
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ido Barkan ibar...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Ido Barkan ibar...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
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


Change in vdsm[master]: VDSM hook for random network allocation during VM power on

2014-10-20 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: VDSM hook for random network allocation during VM power on
..


Patch Set 4: Code-Review-1

please see my comments to the previous patch set

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib14c76994918750e7eef460411acc337599b0186
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ido Barkan ibar...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Ido Barkan ibar...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: VDSM hook for random network allocation during VM power on

2014-10-20 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: VDSM hook for random network allocation during VM power on
..


Patch Set 6: Code-Review-1

(2 comments)

http://gerrit.ovirt.org/#/c/34114/6/vdsm_hooks/allocate_net/README
File vdsm_hooks/allocate_net/README:

Line 11: Installation:
Line 12: * Use engine-config to set the appropriate custom properties as such:
Line 13: 
Line 14: Custom property for a specific vNIC profile:
Line 15: sudo engine-config -s 
CustomDeviceProperties={type=interface;prop={equivnets=(.+)(,\s*.+)*}}
I think this should be updated for the 'whitespace as separator'
Line 16: sudo service ovirt-engine restart
Line 17: 
Line 18: * Verify that the custom properties were added properly:
Line 19: sudo engine-config -g CustomDeviceProperties


http://gerrit.ovirt.org/#/c/34114/6/vdsm_hooks/allocate_net/before_device_create.py
File vdsm_hooks/allocate_net/before_device_create.py:

Line 41:'prog': sys.argv[0]}
Line 42: 
Line 43: 
Line 44: def _parse_nets():
Line 45: return [net for net in os.environ[AVAIL_NETS_KEY].split()]
there should be filtering for if the bridge exists.
Line 46: 
Line 47: 
Line 48: def _get_random_network():
Line 49: available_nets = _parse_nets()


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib14c76994918750e7eef460411acc337599b0186
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ido Barkan ibar...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Ido Barkan ibar...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
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


Change in vdsm[master]: virt: move console device to vmdevices.py

2014-10-20 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: virt: move console device to vmdevices.py
..


Patch Set 2: Code-Review+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie1bf72ed93410c45046ea30241aebbde03e74168
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Polednik mpoled...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Francesco Romani from...@redhat.com
Gerrit-Reviewer: Martin Polednik mpoled...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: virt: move redir device to vmdevices.py

2014-10-20 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: virt: move redir device to vmdevices.py
..


Patch Set 2: Code-Review+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I0c79e501008edeb6def6b78b1416882001276030
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Polednik mpoled...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: virt: move smartcard device to vmdevices.py

2014-10-20 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: virt: move smartcard device to vmdevices.py
..


Patch Set 2: Code-Review+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I0a5cb5140302b9b909750c7f5df4d257958bab3d
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Polednik mpoled...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: virt: move controller device to vmdevices.py

2014-10-20 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: virt: move controller device to vmdevices.py
..


Patch Set 4: Code-Review+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I941a76230fd5cc3c28495c5fa8526f8735bb51ef
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Polednik mpoled...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Francesco Romani from...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: mkimage: more robust content signature

2014-10-20 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: mkimage: more robust content signature
..


Patch Set 6: Code-Review+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Id8dfd32eacd5c5a01d0ba27a8403a46d4bea02ab
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani from...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Francesco Romani from...@redhat.com
Gerrit-Reviewer: Michal Skrivanek michal.skriva...@redhat.com
Gerrit-Reviewer: Piotr Kliczewski piotr.kliczew...@gmail.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: network: ConfigurationApplier parent object

2014-10-20 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: network: ConfigurationApplier parent object
..


Patch Set 4: Code-Review-1

ifcfg, iproute2 and pyroute_two decided to have config appliers. That is not 
part of the API (there is no config applier API, except a de-facto one). I'm 
not sure that we want that. I think that it would probably be better to just 
have some shared module level function of libvirt net creation/deletion that 
the configurators could use, rather than introduce inheritance.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib842e0c3b4973f6a9e7a1b66f3786499da39857d
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Petr Horáček phora...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: netinfo, tool: Make the bonding defaults a proper Python file

2014-10-20 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: netinfo, tool: Make the bonding defaults a proper Python file
..


Patch Set 4:

any update on the selinux context?

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic1f62c0052e42ea23cc06e64fc9e158bf5dc4258
Gerrit-PatchSet: 4
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: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: netinfo.getIpInfo: handle slashless address

2014-10-20 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: netinfo.getIpInfo: handle slashless address
..


Patch Set 2: Code-Review+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I44f0658dd337f6930900985f227302f52c7add0d
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Ido Barkan ibar...@redhat.com
Gerrit-Reviewer: Ondřej Svoboda osvob...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: libvirt: do not always log failed libvirt calls

2014-10-20 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: libvirt: do not always log failed libvirt calls
..


Patch Set 1: Code-Review+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I170e1870e1d4759c1c7310d71f00450b6e560690
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani from...@redhat.com
Gerrit-Reviewer: Adam Litke ali...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Federico Simoncelli fsimo...@redhat.com
Gerrit-Reviewer: Francesco Romani from...@redhat.com
Gerrit-Reviewer: Michal Skrivanek michal.skriva...@redhat.com
Gerrit-Reviewer: Nir Soffer nsof...@redhat.com
Gerrit-Reviewer: Saggi Mizrahi smizr...@redhat.com
Gerrit-Reviewer: Vinzenz Feenstra vfeen...@redhat.com
Gerrit-Reviewer: Yaniv Bronhaim ybron...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: nwfilter: Do not attempt to re-define the nwfilter when not ...

2014-10-10 Thread asegurap
Antoni Segura Puimedon has uploaded a new change for review.

Change subject: nwfilter: Do not attempt to re-define the nwfilter when not 
undefining
..

nwfilter: Do not attempt to re-define the nwfilter when not undefining

Undefining a filter is an operation that can fail. The fact that we
had the same exception swallowing for two operations, looking up and
discovering led us to the wrong assumption then of defining again the
filter even when it had been looked up fine but could not be
undefined.

The most sensible behavior to take for 3.5 is to just consider the
failure to undefine properly and re-define it only in the case of
failure to look up.

Change-Id: Ia284c0554ef86a4668808b26523fbb3b51baebcc
Bug-Url: https://bugzilla.redhat.com/1150718
Signed-off-by: Antoni S. Puimedon asegu...@redhat.com
---
M lib/vdsm/tool/nwfilter.py
1 file changed, 11 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/93/33993/1

diff --git a/lib/vdsm/tool/nwfilter.py b/lib/vdsm/tool/nwfilter.py
index 19c95f6..1b7537c 100755
--- a/lib/vdsm/tool/nwfilter.py
+++ b/lib/vdsm/tool/nwfilter.py
@@ -60,12 +60,18 @@
 
 
 try:
-conn.nwfilterLookupByName(self.filterName).undefine()
-except libvirt.libvirtError:
-# Ignore failure if filter isn't exists or if failed to remove.
-# Failure might occur when attempting to remove a filter which
-# is being used by running VMs
+old_filter = conn.nwfilterLookupByName(self.filterName)
+except libvirt.libvirtError:  # No filter, we can define it.
 pass
+else:
+try:
+old_filter.undefine()
+except libvirt.libvirtError:
+# If the filter is in use it may fail to be removed. In that
+# case we warn of it and consider the task done.
+logging.warning('Failed to remove the old filter %s.',
+old_filter.name(), exc_info=True)
+return
 
 nwFilter = conn.nwfilterDefineXML(self.buildFilterXml())
 logging.debug(Filter %s was defined, nwFilter.name())


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia284c0554ef86a4668808b26523fbb3b51baebcc
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon asegu...@redhat.com
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


  1   2   3   4   5   6   7   8   9   10   >