Change in vdsm[master]: netconf: privatize inRollback and use it for persistent roll...
by asegurap@redhat.com
Antoni Segura Puimedon has uploaded a new change for review.
Change subject: netconf: privatize inRollback and use it for persistent rollback
......................................................................
netconf: privatize inRollback and use it for persistent rollback
inRollback is not part of the external setupNetworks api. Thus, it
is wise to be coherent and prefix it with '_'. Additionally, make
the persistent network restoration script use it.
Change-Id: I6bcf98cb587c99366173d0a2994444b6370c9778
Signed-off-by: Antoni S. Puimedon <asegurap(a)redhat.com>
---
M vdsm/API.py
M vdsm/configNetwork.py
M vdsm/vdsm-restore-net-config
3 files changed, 6 insertions(+), 5 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/68/21868/1
diff --git a/vdsm/API.py b/vdsm/API.py
index 86413c3..19a8f20 100644
--- a/vdsm/API.py
+++ b/vdsm/API.py
@@ -1394,7 +1394,7 @@
def _rollback(self, config, excType, value, tb):
try:
supervdsm.getProxy().setupNetworks(
- config.nets, config.bonds, {'inRollback': True,
+ config.nets, config.bonds, {'_inRollback': True,
'connectivityCheck': 0})
except Exception as rollbackError:
self.log.error('Memory rollback failed: %e', rollbackError,
diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py
index 3afcb4e..5fdd696 100755
--- a/vdsm/configNetwork.py
+++ b/vdsm/configNetwork.py
@@ -537,7 +537,7 @@
force=0|1
connectivityCheck=0|1
connectivityTimeout=<int>
- inRollback=True|False
+ _inRollback=True|False
Notes:
When you edit a network that is attached to a bonding, it's not
@@ -561,7 +561,7 @@
hooks.before_network_setup()
logger.debug("Applying...")
- with Ifcfg(options.get('inRollback', False)) as configurator:
+ with Ifcfg(options.get('_inRollback', False)) as configurator:
libvirt_nets = netinfo.networks()
# Remove edited networks and networks with 'remove' attribute
for network, networkAttrs in networks.items():
diff --git a/vdsm/vdsm-restore-net-config b/vdsm/vdsm-restore-net-config
index 29b2a8d..4227e4e 100755
--- a/vdsm/vdsm-restore-net-config
+++ b/vdsm/vdsm-restore-net-config
@@ -48,7 +48,8 @@
removeBonds[bond] = {'remove': True}
logging.debug('Removing all networks (%s) and bonds (%s) in running '
'config.', removeNetworks, removeBonds)
- setupNetworks(removeNetworks, removeBonds, connectivityCheck=False)
+ setupNetworks(removeNetworks, removeBonds, connectivityCheck=False,
+ _inRollback=True)
configurator.flush()
persistentConfig = PersistentConfig()
@@ -56,7 +57,7 @@
bonds = persistentConfig.bonds
logging.debug('Calling setupNetworks with networks (%s) and bond (%s).',
nets, bonds)
- setupNetworks(nets, bonds, connectivityCheck=False)
+ setupNetworks(nets, bonds, connectivityCheck=False, _inRollback=True)
def restore():
--
To view, visit http://gerrit.ovirt.org/21868
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6bcf98cb587c99366173d0a2994444b6370c9778
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <asegurap(a)redhat.com>
9 years, 6 months
Change in vdsm[master]: [wip] jsonrpc: Vdsm changes
by alitke@redhat.com
Adam Litke has posted comments on this change.
Change subject: [wip] jsonrpc: Vdsm changes
......................................................................
Patch Set 8: Code-Review-1
(2 comments)
....................................................
File vdsm_api/vdsmapi-schema.json
Line 2932
Line 2933
Line 2934
Line 2935
Line 2936
How would you describe that this could return either ['UUID'] or ['VmDescription'] ?
Line 2951: #
Line 2952: # @vmList: #optional Filter the results by a list of UUIDs
Line 2953: #
Line 2954: # @fullStatus: #optional Flag which detremines whether to return full status
Line 2955: #
This is a bad idea. One major cleanup that this schema has imposed is that a function has a stable return type. It is not good to have a parameter that can change the return value from a list of UUIDs to a list of VmDescriptions.
Line 2956: # Returns:
Line 2957: # A list of VM UUIDs
Line 2958: #
Line 2959: # Since: 4.10.0
--
To view, visit http://gerrit.ovirt.org/19497
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: If828355b7efe28fe6a2e784069425fefd2f3f25c
Gerrit-PatchSet: 8
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Saggi Mizrahi <smizrahi(a)redhat.com>
Gerrit-Reviewer: Adam Litke <alitke(a)redhat.com>
Gerrit-Reviewer: Barak Azulay <bazulay(a)redhat.com>
Gerrit-Reviewer: Eduardo <ewarszaw(a)redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi(a)redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei(a)redhat.com>
Gerrit-Reviewer: mooli tayer <mtayer(a)redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
9 years, 6 months
Change in vdsm[ovirt-3.3]: domainMonitor: Improve logging
by Nir Soffer
Hello Ayal Baron, Sergey Gotliv, Ohad Basan, Allon Mureinik,
I'd like you to do a code review. Please visit
http://gerrit.ovirt.org/21936
to review the following change.
Change subject: domainMonitor: Improve logging
......................................................................
domainMonitor: Improve logging
We have logs in domain monitor thread, and we can see when a monitor
starts or stops, but we don't have any info which thread triggered the
operation. This patch adds info level log messages when starting and
stopping domain monitoring, revealing the caller thread.
Change-Id: I20feb40b097fa65ebebf851e33c051fc184ff029
Relates-To: https://bugzilla.redhat.com/1032925
Signed-off-by: Nir Soffer <nsoffer(a)redhat.com>
Reviewed-on: http://gerrit.ovirt.org/21904
Reviewed-by: Sergey Gotliv <sgotliv(a)redhat.com>
Reviewed-by: Allon Mureinik <amureini(a)redhat.com>
Reviewed-by: Ohad Basan <obasan(a)redhat.com>
Reviewed-by: Ayal Baron <abaron(a)redhat.com>
---
M vdsm/storage/domainMonitor.py
1 file changed, 3 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/36/21936/1
diff --git a/vdsm/storage/domainMonitor.py b/vdsm/storage/domainMonitor.py
index ffa5e00..ac01e8b 100644
--- a/vdsm/storage/domainMonitor.py
+++ b/vdsm/storage/domainMonitor.py
@@ -90,6 +90,7 @@
if sdUUID in self._domains:
return
+ self.log.info("Start monitoring %s", sdUUID)
domainThread = DomainMonitorThread(weakref.proxy(self),
sdUUID, hostId, self._interval)
domainThread.start()
@@ -102,6 +103,7 @@
# Eg: when a domain is detached the domain monitor is stopped and
# the host id is released. If the monitor didn't actually exit it
# might respawn a new acquire host id.
+ self.log.info("Stop monitoring %s", sdUUID)
try:
self._domains[sdUUID].stop()
except KeyError:
@@ -113,6 +115,7 @@
return self._domains[sdUUID].getStatus()
def close(self):
+ self.log.info("Stopping domain monitors")
for sdUUID in self._domains.keys():
self.stopMonitoring(sdUUID)
--
To view, visit http://gerrit.ovirt.org/21936
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I20feb40b097fa65ebebf851e33c051fc184ff029
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.3
Gerrit-Owner: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Ayal Baron <abaron(a)redhat.com>
Gerrit-Reviewer: Ohad Basan <obasan(a)redhat.com>
Gerrit-Reviewer: Sergey Gotliv <sgotliv(a)redhat.com>
9 years, 6 months
Change in vdsm[master]: netconf: Make vdsm-restore-net-config use _inRollback
by asegurap@redhat.com
Antoni Segura Puimedon has uploaded a new change for review.
Change subject: netconf: Make vdsm-restore-net-config use _inRollback
......................................................................
netconf: Make vdsm-restore-net-config use _inRollback
Change-Id: Iee212bdd6bbf5bcc27dc0a85b2fe6f690ac6dcd0
Signed-off-by: Antoni S. Puimedon <asegurap(a)redhat.com>
---
M vdsm/vdsm-restore-net-config
1 file changed, 3 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/77/21977/1
diff --git a/vdsm/vdsm-restore-net-config b/vdsm/vdsm-restore-net-config
index 29b2a8d..4227e4e 100755
--- a/vdsm/vdsm-restore-net-config
+++ b/vdsm/vdsm-restore-net-config
@@ -48,7 +48,8 @@
removeBonds[bond] = {'remove': True}
logging.debug('Removing all networks (%s) and bonds (%s) in running '
'config.', removeNetworks, removeBonds)
- setupNetworks(removeNetworks, removeBonds, connectivityCheck=False)
+ setupNetworks(removeNetworks, removeBonds, connectivityCheck=False,
+ _inRollback=True)
configurator.flush()
persistentConfig = PersistentConfig()
@@ -56,7 +57,7 @@
bonds = persistentConfig.bonds
logging.debug('Calling setupNetworks with networks (%s) and bond (%s).',
nets, bonds)
- setupNetworks(nets, bonds, connectivityCheck=False)
+ setupNetworks(nets, bonds, connectivityCheck=False, _inRollback=True)
def restore():
--
To view, visit http://gerrit.ovirt.org/21977
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iee212bdd6bbf5bcc27dc0a85b2fe6f690ac6dcd0
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <asegurap(a)redhat.com>
9 years, 6 months
Change in vdsm[master]: vm: Fix exception when shutdown() called on vm in 'Down' state
by gpadgett@redhat.com
Greg Padgett has uploaded a new change for review.
Change subject: vm: Fix exception when shutdown() called on vm in 'Down' state
......................................................................
vm: Fix exception when shutdown() called on vm in 'Down' state
Attempting to call the shutdown() method on a VM which is in 'Down'
state resulted in an exception if called through xmlrpclib. Instead,
adopt the convention used by similar APIs such as migrate() and return
errCode['noVM'].
Change-Id: I8b75d0b869354d503e5f187e33370b5837b3c698
Bug-Url: https://bugzilla.redhat.com/1027297
Signed-off-by: Greg Padgett <gpadgett(a)redhat.com>
---
M vdsm/vm.py
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/37/21937/1
diff --git a/vdsm/vm.py b/vdsm/vm.py
index e8d5954..4ff5e27 100644
--- a/vdsm/vm.py
+++ b/vdsm/vm.py
@@ -2488,7 +2488,7 @@
try:
now = time.time()
if self.lastStatus == 'Down':
- return
+ return errCode['noVM']
if self.guestAgent and self.guestAgent.isResponsive():
self._guestEventTime = now
self._guestEvent = 'Powering down'
--
To view, visit http://gerrit.ovirt.org/21937
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8b75d0b869354d503e5f187e33370b5837b3c698
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Greg Padgett <gpadgett(a)redhat.com>
9 years, 6 months
Change in vdsm[master]: sp: Improve logging when pool is destroyed
by Nir Soffer
Nir Soffer has uploaded a new change for review.
Change subject: sp: Improve logging when pool is destroyed
......................................................................
sp: Improve logging when pool is destroyed
When pool is destroyed, it tries to stop monitoring domains. I suspect
that this is the root cause of bug 1032925. This patch adds proper
logging to this thread to prove my theory.
The real fix seems to be deleting __del__ as we already stop monitoring
domains when pool is disconnected.
Change-Id: Ia63a8b5553ad98886240217d4ad0e37c0b197c3b
Bug-Url: https://bugzilla.redhat.com/1032925
Signed-off-by: Nir Soffer <nsoffer(a)redhat.com>
---
M vdsm/storage/sp.py
1 file changed, 7 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/32/21932/1
diff --git a/vdsm/storage/sp.py b/vdsm/storage/sp.py
index 31e0bcd..6253bb7 100644
--- a/vdsm/storage/sp.py
+++ b/vdsm/storage/sp.py
@@ -142,7 +142,13 @@
def __del__(self):
if len(self.domainMonitor.poolMonitoredDomains) > 0:
- threading.Thread(target=self.stopMonitoringDomains).start()
+ @utils.traceback(on=self.log.name)
+ def run():
+ self.log.info("Stop monitoring domains for %s", self.spUUID)
+ self.stopMonitoringDomains()
+ thread = threading.Thread(name="StoragePoolCleanupThread",
+ target=run)
+ thread.start()
@unsecured
def forceFreeSpm(self):
--
To view, visit http://gerrit.ovirt.org/21932
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia63a8b5553ad98886240217d4ad0e37c0b197c3b
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer(a)redhat.com>
9 years, 6 months
Change in vdsm[ovirt-3.3]: sp: Improve logging when pool is destroyed
by Nir Soffer
Nir Soffer has uploaded a new change for review.
Change subject: sp: Improve logging when pool is destroyed
......................................................................
sp: Improve logging when pool is destroyed
When pool is destroyed, it tries to stop monitoring domains. I suspect
that this is the root cause of bug 1032925. This patch adds proper
logging to this thread to prove my theory.
The real fix seems to be deleting __del__ as we already stop monitoring
domains when pool is disconnected.
Change-Id: Ia63a8b5553ad98886240217d4ad0e37c0b197c3b
Bug-Url: https://bugzilla.redhat.com/1032925
Signed-off-by: Nir Soffer <nsoffer(a)redhat.com>
---
M vdsm/storage/sp.py
1 file changed, 7 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/33/21933/1
diff --git a/vdsm/storage/sp.py b/vdsm/storage/sp.py
index 8bab500..e6eca00 100644
--- a/vdsm/storage/sp.py
+++ b/vdsm/storage/sp.py
@@ -145,8 +145,13 @@
return self.spmRole, self.getSpmLver(), self.getSpmId()
def __del__(self):
- if len(self.domainMonitor.monitoredDomains) > 0:
- threading.Thread(target=self.stopMonitoringDomains).start()
+ if len(self.domainMonitor.poolMonitoredDomains) > 0:
+ def run():
+ self.log.info("Stop monitoring domains for %s", self.spUUID)
+ self.stopMonitoringDomains()
+ thread = threading.Thread(name="StoragePoolCleanupThread",
+ target=run)
+ thread.start()
@unsecured
def forceFreeSpm(self):
--
To view, visit http://gerrit.ovirt.org/21933
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia63a8b5553ad98886240217d4ad0e37c0b197c3b
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.3
Gerrit-Owner: Nir Soffer <nsoffer(a)redhat.com>
9 years, 6 months
Change in vdsm[master]: bz#831938 raise exception when error occurs in connectStorag...
by lvroyce@linux.vnet.ibm.com
Royce Lv has uploaded a new change for review.
Change subject: bz#831938 raise exception when error occurs in connectStorageServer
......................................................................
bz#831938 raise exception when error occurs in connectStorageServer
connectStorageServer returned OK when error occurs:
iscsi login fails, local directory lack of permission,etc
change it to raise error to make early alarm
Change-Id: I4c363f41d08669eec022797eb1eb440fe193f9c2
Signed-off-by: Royce Lv <lvroyce(a)linux.vnet.ibm.com>
---
M vdsm/storage/hsm.py
1 file changed, 2 insertions(+), 8 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/37/6137/1
--
To view, visit http://gerrit.ovirt.org/6137
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4c363f41d08669eec022797eb1eb440fe193f9c2
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Royce Lv <lvroyce(a)linux.vnet.ibm.com>
9 years, 6 months