Federico Simoncelli has uploaded a new change for review.
Change subject: domain: use shared lock for extendStorageDomain
......................................................................
domain: use shared lock for extendStorageDomain
The extendStorageDomain command shouldn't hold an exclusive lock on
the storage domain since it can be executed also during other long
tasks (e.g.: moveImage).
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=876663
Change-Id: I2ea73b76b4db010a6eacd80c8328afe66e7cdc51
Signed-off-by: Federico Simoncelli <fsimonce(a)redhat.com>
---
M vdsm/storage/hsm.py
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/51/10451/1
diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py
index c28a1ee..23be9e5 100644
--- a/vdsm/storage/hsm.py
+++ b/vdsm/storage/hsm.py
@@ -675,7 +675,7 @@
"sdUUID=%s, devlist=%s" % (sdUUID, devlist)))
self.validatePoolSD(spUUID, sdUUID)
- vars.task.getExclusiveLock(STORAGE, sdUUID)
+ vars.task.getSharedLock(STORAGE, sdUUID)
# We need to let the domain to extend itself
pool = self.getPool(spUUID)
pool.extendSD(sdUUID, devlist, force)
--
To view, visit http://gerrit.ovirt.org/10451
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2ea73b76b4db010a6eacd80c8328afe66e7cdc51
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <fsimonce(a)redhat.com>
ShaoHe Feng has posted comments on this change.
Change subject: vdsm: Refactoring libvirtvm & vm
......................................................................
Patch Set 1: (2 inline comments)
....................................................
File Makefile.am
Line 87: vdsm/storage/taskManager.py \
Line 88: vdsm/storage/threadLocal.py \
Line 89: vdsm/storage/volume.py \
Line 90: vdsm/vdsm \
Line 91: vdsm/vm/*.py \
just "vdsm/vm/" without "*.py"
Line 92: vdsm/vm/devices/*.py \
Line 93: vdsm/vm/migration/*.py \
Line 94: vdsm_api \
Line 95: vdsm_cli \
Line 104: PEP8_BLACKLIST = apiData.py,config.py,constants.py
Line 105:
Line 106: check-local:
Line 107: find . -path './.git' -prune -type f -o \
Line 108: -name '*.py' -o -name '*.py.in' | xargs $(PYFLAKES)
this command, --filename patterns are *.py, and *.py.in
Line 109: $(PEP8) --exclude="$(PEP8_BLACKLIST)" --filename '*.py,*.py.in' \
Line 110: $(PEP8_WHITELIST)
Line 111: @if test -f .gitignore; then \
Line 112: for i in `git ls-files \*.in`; do \
--
To view, visit http://gerrit.ovirt.org/10861
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I653be8e06431f1033416aa55d6cb81b4262ba6b1
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Vinzenz Feenstra <vfeenstr(a)redhat.com>
Gerrit-Reviewer: Adam Litke <agl(a)us.ibm.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Mark Wu <wudxw(a)linux.vnet.ibm.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek(a)redhat.com>
Gerrit-Reviewer: Peter V. Saveliev <peet(a)redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi(a)redhat.com>
Gerrit-Reviewer: ShaoHe Feng <shaohef(a)linux.vnet.ibm.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Federico Simoncelli has uploaded a new change for review.
Change subject: netinfo: remove special characters from DUMMY_BRIDGE
......................................................................
netinfo: remove special characters from DUMMY_BRIDGE
Creating a bridge with special shell characters (";") can potentially
break system scripts. Since there's not a specific requirement to use
semicolons in the bridge name the string has been sanitized.
Change-Id: I3e5a03a1f88495731bc107d5301fab43354f4e36
Signed-off-by: Federico Simoncelli <fsimonce(a)redhat.com>
---
M vdsm/netinfo.py
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/53/10653/1
diff --git a/vdsm/netinfo.py b/vdsm/netinfo.py
index aebe085..f21da20 100644
--- a/vdsm/netinfo.py
+++ b/vdsm/netinfo.py
@@ -43,7 +43,7 @@
PROC_NET_VLAN = '/proc/net/vlan/'
LIBVIRT_NET_PREFIX = 'vdsm-'
-DUMMY_BRIDGE = ';vdsmdummy;'
+DUMMY_BRIDGE = 'vdsmdummy'
def _match_nic_name(nic, patterns):
--
To view, visit http://gerrit.ovirt.org/10653
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3e5a03a1f88495731bc107d5301fab43354f4e36
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <fsimonce(a)redhat.com>
Antoni Segura Puimedon has uploaded a new change for review.
Change subject: Simplify netinfo get.
......................................................................
Simplify netinfo get.
This patch refactors netinfo to have the network data fetching on
a separate function. This reduces the get() complexity and will
allow the possibility of reusing the new method for more fine-
grained information retrieval, e.g., update just a network info
of a Netinfo instance.
Change-Id: I5c3e617d10308d0bfa4deaed329b2e10ef54077c
Signed-off-by: Antoni S. Puimedon <asegurap(a)redhat.com>
---
M vdsm/netinfo.py
1 file changed, 26 insertions(+), 45 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/80/11080/1
diff --git a/vdsm/netinfo.py b/vdsm/netinfo.py
index f6250c2..e1fd798 100644
--- a/vdsm/netinfo.py
+++ b/vdsm/netinfo.py
@@ -274,57 +274,38 @@
return paddr
+def getNetData(net, bridged, routes):
+ try:
+ if bridged:
+ return {'ports': ports(net), 'stp': bridge_stp_state(net),
+ 'cfg': getIfaceCfg(net)}
+ else:
+ # ovirt-engine-3.1 expects to see the "interface" attribute iff the
+ # network is bridgeless. Please remove the attribute and this
+ # comment when the version is no longer supported.
+ return {'interface': net, 'iface': net, 'bridged': False,
+ 'addr': getaddr(net), 'netmask': getnetmask(net),
+ 'gateway': routes.get(net, '0.0.0.0'), 'mtu': getMtu(net)}
+ except OSError as e:
+ if e.errno == errno.ENOENT:
+ logging.info('Obtaining info for net %s.', net, exc_info=True)
+ raise KeyError('Network %s was not found')
+ else:
+ raise
+
+
def get():
d = {}
routes = getRoutes()
d['networks'] = {}
- nets = networks()
- for netname in nets.iterkeys():
- if nets[netname]['bridged']:
- devname = netname
- try:
- d['networks'][netname] = {'ports': ports(devname),
- 'stp': bridge_stp_state(devname),
- 'cfg': getIfaceCfg(devname), }
- except OSError as e:
- # If the bridge reported by libvirt does not exist anymore, do
- # not report it, as this already assures that the bridge is not
- # added to d['networks']
- if e.errno == errno.ENOENT:
- logging.info('Obtaining info for net %s.', devname,
- exc_info=True)
- continue
- else:
- raise
- else:
- devname = nets[netname]['iface']
- d['networks'][netname] = {}
-
- # ovirt-engine-3.1 expects to see "interface" iff the network is
- # bridgeless. Please remove this line when that Engine version is
- # no longer supported
- d['networks'][netname]['interface'] = devname
-
+ for net, netAttr in networks().iteritems():
try:
- d['networks'][netname].update(
- {'iface': devname,
- 'bridged': nets[netname]['bridged'],
- 'addr': getaddr(devname),
- 'netmask': getnetmask(devname),
- 'gateway': routes.get(devname, '0.0.0.0'),
- 'mtu': getMtu(devname), })
- except OSError as e:
- if e.errno == errno.ENOENT:
- logging.info('Obtaining info for net %s.', devname,
- exc_info=True)
- # When a net is not bridged it will have left an entry in
- # d['networks']
- if netname in d['networks']:
- del d['networks'][netname]
- continue
- else:
- raise
+ d['networks'][net] = getNetData(net, netAttr['bridged'], routes)
+ except KeyError:
+ continue
+ except OSError:
+ raise
d['bridges'] = dict([(bridge, {'ports': ports(bridge),
'stp': bridge_stp_state(bridge),
--
To view, visit http://gerrit.ovirt.org/11080
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I5c3e617d10308d0bfa4deaed329b2e10ef54077c
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <asegurap(a)redhat.com>