Change in vdsm[master]: contrib: add useful shell functions to assist in vdsm develo...
by phoracek@redhat.com
Petr Horáček has posted comments on this change.
Change subject: contrib: add useful shell functions to assist in vdsm development
......................................................................
Patch Set 4: Code-Review+1
--
To view, visit http://gerrit.ovirt.org/36344
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ide4131db838640a5836fd029696849bced267308
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <toni(a)midokura.com>
Gerrit-Reviewer: Adam Litke <alitke(a)redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <toni(a)midokura.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Ido Barkan <ibarkan(a)redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Ondřej Svoboda <osvoboda(a)redhat.com>
Gerrit-Reviewer: Petr Horáček <phoracek(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
9 years, 4 months
Change in vdsm[master]: fixed a key error in _delNetwork
by ibarkan@redhat.com
Ido Barkan has uploaded a new change for review.
Change subject: fixed a key error in _delNetwork
......................................................................
fixed a key error in _delNetwork
When _delNetwork was called from _delBrokenNetwork it's netinfo
is adapted so it would be able to remove the broken netwrok.
This fixes a missing key in the broken network description
dictionary.
Change-Id: I09d32946cf2667b1888b1d84d0eab2d7118a42b0
Signed-off-by: Ido Barkan <ibarkan(a)redhat.com>
---
M tests/functional/networkTests.py
M vdsm/network/api.py
2 files changed, 23 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/98/36598/1
diff --git a/tests/functional/networkTests.py b/tests/functional/networkTests.py
index bc008d1..b4abff7 100644
--- a/tests/functional/networkTests.py
+++ b/tests/functional/networkTests.py
@@ -1825,6 +1825,27 @@
self.assertEqual(status, SUCCESS, msg)
self.assertNetworkDoesntExist(NETWORK_NAME)
+ def testBrokenBridgedNetwork(self):
+ with dummyIf(1) as (nic,):
+ network = {NETWORK_NAME: {'nic': nic, 'vlan': VLAN_ID,
+ 'bridged': True}}
+ status, msg = self.vdsm_net.setupNetworks(network, {}, NOCHK)
+ self.assertEqual(status, SUCCESS, msg)
+ self.assertNetworkExists(NETWORK_NAME)
+
+ ipwrapper.linkDel(NETWORK_NAME)
+ self.vdsm_net.refreshNetinfo()
+ self.assertNotIn(NETWORK_NAME, self.vdsm_net.netinfo.networks)
+
+ status, msg = self.vdsm_net.setupNetworks(network, {}, NOCHK)
+ self.assertEqual(status, SUCCESS, msg)
+ self.assertNetworkExists(NETWORK_NAME)
+
+ network[NETWORK_NAME] = {'remove': True}
+ status, msg = self.vdsm_net.setupNetworks(network, {}, NOCHK)
+ self.assertEqual(status, SUCCESS, msg)
+ self.assertNetworkDoesntExist(NETWORK_NAME)
+
@cleanupNet
def testReconfigureBrNetWithVanishedPort(self):
"""Test for re-defining a bridged network for which the device
diff --git a/vdsm/network/api.py b/vdsm/network/api.py
index 19f5f10..6a8a6b5 100755
--- a/vdsm/network/api.py
+++ b/vdsm/network/api.py
@@ -388,6 +388,8 @@
deleted via _delNetwork.'''
_netinfo = netinfo.NetInfo()
_netinfo.networks[network] = netAttr
+ _netinfo.networks[network]['bootproto4'] = 'none'
+
if _netinfo.networks[network]['bridged']:
try:
nets = configurator.runningConfig.networks
--
To view, visit http://gerrit.ovirt.org/36598
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I09d32946cf2667b1888b1d84d0eab2d7118a42b0
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ido Barkan <ibarkan(a)redhat.com>
9 years, 4 months
Change in vdsm[master]: contrib: add useful shell functions to assist in vdsm develo...
by toni@midokura.com
Antoni Segura Puimedon has posted comments on this change.
Change subject: contrib: add useful shell functions to assist in vdsm development
......................................................................
Patch Set 4: Code-Review+1
Thanks Ido!
--
To view, visit http://gerrit.ovirt.org/36344
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ide4131db838640a5836fd029696849bced267308
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <toni(a)midokura.com>
Gerrit-Reviewer: Adam Litke <alitke(a)redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <toni(a)midokura.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Ido Barkan <ibarkan(a)redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Ondřej Svoboda <osvoboda(a)redhat.com>
Gerrit-Reviewer: Petr Horáček <phoracek(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
9 years, 4 months
Change in vdsm[master]: contrib: add useful shell functions to assist in vdsm develo...
by ibarkan@redhat.com
Ido Barkan has posted comments on this change.
Change subject: contrib: add useful shell functions to assist in vdsm development
......................................................................
Patch Set 4: Verified+1
--
To view, visit http://gerrit.ovirt.org/36344
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ide4131db838640a5836fd029696849bced267308
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <toni(a)midokura.com>
Gerrit-Reviewer: Adam Litke <alitke(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Ido Barkan <ibarkan(a)redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Ondřej Svoboda <osvoboda(a)redhat.com>
Gerrit-Reviewer: Petr Horáček <phoracek(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
9 years, 4 months
Change in vdsm[master]: contrib: add useful shell functions to assist in vdsm develo...
by ibarkan@redhat.com
Ido Barkan has posted comments on this change.
Change subject: contrib: add useful shell functions to assist in vdsm development
......................................................................
Patch Set 3:
(11 comments)
http://gerrit.ovirt.org/#/c/36344/3/contrib/zshrc
File contrib/zshrc:
Line 9: sudo vdsClient 0 getVdsCaps | less
Line 10: else
Line 11: sudo vdsClient 0 getVdsCaps
Line 12: fi
Line 13: }
> There is no reason to work with non-secure transport, I would make the defa
Done
Line 14:
Line 15: scaps() {
Line 16: if [ -t 1 ]; then
Line 17: sudo vdsClient -s 0 getVdsCaps | less
Line 30: vdsm_functional testSetupNetworksAddBondWithManyVlans
Line 31: }
Line 32:
Line 33: vdsm_remove() {
Line 34: sudo yum erase -y `rpm -qa | grep vdsm | perl -pe 's|-[0-9].*||' | paste -sd " "` && \
> Why not:
remove and erase are the same in yum. vdsm\* works fine.
Line 35: git clean -fdx
Line 36: }
Line 37:
Line 38: vdsm_install() {
Line 31: }
Line 32:
Line 33: vdsm_remove() {
Line 34: sudo yum erase -y `rpm -qa | grep vdsm | perl -pe 's|-[0-9].*||' | paste -sd " "` && \
Line 35: git clean -fdx
> cd would help
Done
Line 36: }
Line 37:
Line 38: vdsm_install() {
Line 39: VERSION=`ls ~/rpmbuild/RPMS/x86_64/ -t -w 1 | head -1 | perl -pe 's|^.*?git|git|' | perl -pe 's|\..*$||'`
Line 37:
Line 38: vdsm_install() {
Line 39: VERSION=`ls ~/rpmbuild/RPMS/x86_64/ -t -w 1 | head -1 | perl -pe 's|^.*?git|git|' | perl -pe 's|\..*$||'`
Line 40: FILES=`find ~/rpmbuild/RPMS/ -iname "*$VERSION*.rpm" | egrep "vdsm-[0-9]|python|cli|xmlrpc|jsonrpc|tests|infra"`
Line 41: sudo yum install -y `echo $FILES | paste -sd " "`
> Install usually requires remove, because newer git builds are sometimes old
I will currently add vdsm_configure_force wherever needed
Line 42: }
Line 43:
Line 44: vdsm_reinstall() {
Line 45: VERSION=`ls ~/rpmbuild/RPMS/x86_64/ -t -w 1 | head -1 | perl -pe 's|^.*?git|git|' | perl -pe 's|\..*$||'`
Line 82: del_dummies() {
Line 83: for nic in `ip l | awk '{print $2;}' | egrep "^dummy"`; do
Line 84: sudo ip link del dev ${nic[0,-2]}
Line 85: done
Line 86: sudo rm /etc/sysconfig/network-scripts/ifcfg-dummy*
> * without \
Done
Line 87: }
Line 88:
Line 89: del_bonds() {
Line 90: for nic in `ip l | awk '{print $2;}' | egrep "^bond"`; do
Line 89: del_bonds() {
Line 90: for nic in `ip l | awk '{print $2;}' | egrep "^bond"`; do
Line 91: sudo echo "-${nic[0,-2]} "> /sys/class/net/bonding_masters
Line 92: done
Line 93: sudo rm /etc/sysconfig/network-scripts/ifcfg-bond\*
> * with \
it is
Line 94: }
Line 95:
Line 96: del_bridges() {
Line 97: for bridge in `brctl show | awk '{print $1;}' | grep test-network`; do
Line 151: }
Line 152:
Line 153: vdsm_pep8() {
Line 154: PEP8_BLACKLIST=config.py,constants.py,crossImportsTests.py,vdsm.py
Line 155: /usr/bin/pep8 --exclude=$PEP8_BLACKLIST --filename '*.py,*.py.in' .
> would be better with cd ~/code/vdsm, like vdsm_unit()
Done
Line 156: }
Line 157:
Line 158: vdsm_unit () {
Line 159: cd ~/code/vdsm && \
Line 152:
Line 153: vdsm_pep8() {
Line 154: PEP8_BLACKLIST=config.py,constants.py,crossImportsTests.py,vdsm.py
Line 155: /usr/bin/pep8 --exclude=$PEP8_BLACKLIST --filename '*.py,*.py.in' .
Line 156: }
> You can use "make pep8" instead
Done
Line 157:
Line 158: vdsm_unit () {
Line 159: cd ~/code/vdsm && \
Line 160: ./autogen.sh --system && make && \
Line 155: /usr/bin/pep8 --exclude=$PEP8_BLACKLIST --filename '*.py,*.py.in' .
Line 156: }
Line 157:
Line 158: vdsm_unit () {
Line 159: cd ~/code/vdsm && \
> vdsm folder could be stored in an variable
Done
Line 160: ./autogen.sh --system && make && \
Line 161: cd tests && sudo ./run_tests_local.sh $1
Line 162: }
Line 163:
Line 158: vdsm_unit () {
Line 159: cd ~/code/vdsm && \
Line 160: ./autogen.sh --system && make && \
Line 161: cd tests && sudo ./run_tests_local.sh $1
Line 162: }
> Why run unittests with sudo?
you have a point, but I prefer not to deal with it now. But it's a good idea to add a vdsm_check which runs unit tests without sudo
Line 163:
Line 164: logs () {
Line 165: less /var/log/vdsm/vdsm.log
Line 166: }
Line 166: }
Line 167:
Line 168: super_logs () {
Line 169: less /var/log/vdsm/supervdsm.log
Line 170: }
> I'm looking also in /var/log/messages and /var/log/sanlock, so we need some
Done
--
To view, visit http://gerrit.ovirt.org/36344
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ide4131db838640a5836fd029696849bced267308
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <toni(a)midokura.com>
Gerrit-Reviewer: Adam Litke <alitke(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Ido Barkan <ibarkan(a)redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Ondřej Svoboda <osvoboda(a)redhat.com>
Gerrit-Reviewer: Petr Horáček <phoracek(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
9 years, 4 months
Change in vdsm[master]: contrib: add useful shell functions to assist in vdsm develo...
by automation@ovirt.org
automation(a)ovirt.org has posted comments on this change.
Change subject: contrib: add useful shell functions to assist in vdsm development
......................................................................
Patch Set 4:
* Update tracker::IGNORE, no Bug-Url found
* Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url.
* Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
--
To view, visit http://gerrit.ovirt.org/36344
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ide4131db838640a5836fd029696849bced267308
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <toni(a)midokura.com>
Gerrit-Reviewer: Adam Litke <alitke(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Ido Barkan <ibarkan(a)redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Ondřej Svoboda <osvoboda(a)redhat.com>
Gerrit-Reviewer: Petr Horáček <phoracek(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
9 years, 4 months
Change in vdsm[master]: jsonrpc: regression on setupNetworks
by Piotr Kliczewski
Piotr Kliczewski has uploaded a new change for review.
Change subject: jsonrpc: regression on setupNetworks
......................................................................
jsonrpc: regression on setupNetworks
During schema and code alignemnt Host_setupNetowrks entry was removed
from command_info. Adding back the entry and fixing schema verification
test.
Bug-Url: https://bugzilla.redhat.com/1178536
Change-Id: I41c304d70f1040eac6a2098d8ab9734fd1115e61
Signed-off-by: pkliczewski <piotr.kliczewski(a)gmail.com>
---
M tests/schemaValidationTest.py
M vdsm/rpc/Bridge.py
2 files changed, 3 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/12/36612/1
diff --git a/tests/schemaValidationTest.py b/tests/schemaValidationTest.py
index d995a7f..43e061e 100644
--- a/tests/schemaValidationTest.py
+++ b/tests/schemaValidationTest.py
@@ -125,6 +125,8 @@
ret_info = Bridge.command_info.get(cmd, {}).get('ret')
if not ret_info and not ret:
continue
+ if ret_info == 'status':
+ continue
if not ret_info or not ret:
raise AssertionError('wrong return type for ' + cmd)
except KeyError:
diff --git a/vdsm/rpc/Bridge.py b/vdsm/rpc/Bridge.py
index f8c06f6..f1f6f31 100644
--- a/vdsm/rpc/Bridge.py
+++ b/vdsm/rpc/Bridge.py
@@ -418,6 +418,7 @@
'Host_getVMList': {'call': Host_getVMList_Call, 'ret': Host_getVMList_Ret},
'Host_getVMFullList': {'call': Host_getVMFullList_Call, 'ret': 'vmList'},
'Host_getAllVmStats': {'ret': 'statsList'},
+ 'Host_setupNetworks': {'ret': 'status'},
'Image_cloneStructure': {'ret': 'uuid'},
'Image_delete': {'ret': 'uuid'},
'Image_deleteVolumes': {'ret': 'uuid'},
--
To view, visit http://gerrit.ovirt.org/36612
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I41c304d70f1040eac6a2098d8ab9734fd1115e61
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
9 years, 4 months
Change in vdsm[master]: storageServer: Drop unnecessary list comprehension
by Nir Soffer
Nir Soffer has uploaded a new change for review.
Change subject: storageServer: Drop unnecessary list comprehension
......................................................................
storageServer: Drop unnecessary list comprehension
For formating list of mismatches, we can implement __repr__ on the
Mismatch class instead of explicit formating. This is generaly better
since we pay for formatting only when logging level requires formatting.
This also eliminate, pyflakes-0.8.1-3.el6 warning:
vdsm/storage/storageServer.py:427: list comprehension redefines 'e' from line 421
Change-Id: I337893db5fd6a52b644798e8414037286eb2d93a
Signed-off-by: Nir Soffer <nsoffer(a)redhat.com>
---
M tests/storageServerTests.py
M vdsm/storage/storageServer.py
2 files changed, 10 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/06/36606/1
diff --git a/tests/storageServerTests.py b/tests/storageServerTests.py
index 83099f5..d178d42 100644
--- a/tests/storageServerTests.py
+++ b/tests/storageServerTests.py
@@ -31,3 +31,9 @@
def test_format(self):
s = str(IscsiConnection.Mismatch("error %d with %r", 1, "text"))
self.assertEqual(s, "error 1 with 'text'")
+
+ def test_format_mismatches_list(self):
+ errors = [IscsiConnection.Mismatch("error 1"),
+ IscsiConnection.Mismatch("error 2")]
+ expected = "%s" % ["error 1", "error 2"]
+ self.assertEqual(str(errors), expected)
diff --git a/vdsm/storage/storageServer.py b/vdsm/storage/storageServer.py
index eb38fb3..09acffd 100644
--- a/vdsm/storage/storageServer.py
+++ b/vdsm/storage/storageServer.py
@@ -354,6 +354,10 @@
def __str__(self):
return self.fmt % self.args
+ def __repr__(self):
+ # Required for logging list of errors
+ return repr(self.__str__())
+
@property
def target(self):
return self._target
--
To view, visit http://gerrit.ovirt.org/36606
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I337893db5fd6a52b644798e8414037286eb2d93a
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer(a)redhat.com>
9 years, 4 months