Change in vdsm[master]: BZ#741658 Move VM to Down if libvirt reports VIR_ERR_NO_DOMA...
by Federico Simoncelli
Federico Simoncelli has posted comments on this change.
Change subject: BZ#741658 Move VM to Down if libvirt reports VIR_ERR_NO_DOMAIN
......................................................................
Patch Set 2: (1 inline comment)
....................................................
File vdsm/utils.py
Line 390: statsFunction()
Line 391: except Exception, e:
Line 392: if not self.handleStatsException(e):
Line 393: self._log.error("Stats function failed: %s",
Line 394: statsFunction, exc_info=True)
The idea is to log the error only if it wasn't taken care by the handler (which in our specific case is logging anyway).
Line 395:
Line 396: self._stopEvent.wait(waitInterval)
Line 397: intervalAccum = (intervalAccum + waitInterval) % maxInterval
Line 398:
--
To view, visit http://gerrit.usersys.redhat.com/984
To unsubscribe, visit http://gerrit.usersys.redhat.com/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Id6262fb2504534c56fdec246937423d629f92e13
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <fsimonce(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce(a)redhat.com>
Gerrit-Reviewer: Igor Lvovsky <ilvovsky(a)redhat.com>
12 years, 6 months
Change in vdsm[master]: BZ#741658 Move VM to Down if libvirt reports VIR_ERR_NO_DOMA...
by Dan Kenigsberg
Dan Kenigsberg has posted comments on this change.
Change subject: BZ#741658 Move VM to Down if libvirt reports VIR_ERR_NO_DOMAIN
......................................................................
Patch Set 2: (1 inline comment)
....................................................
File vdsm/utils.py
Line 390: statsFunction()
Line 391: except Exception, e:
Line 392: if not self.handleStatsException(e):
Line 393: self._log.error("Stats function failed: %s",
Line 394: statsFunction, exc_info=True)
did you mean to re-raise the exception if not handled?
Line 395:
Line 396: self._stopEvent.wait(waitInterval)
Line 397: intervalAccum = (intervalAccum + waitInterval) % maxInterval
Line 398:
--
To view, visit http://gerrit.usersys.redhat.com/984
To unsubscribe, visit http://gerrit.usersys.redhat.com/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Id6262fb2504534c56fdec246937423d629f92e13
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <fsimonce(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce(a)redhat.com>
Gerrit-Reviewer: Igor Lvovsky <ilvovsky(a)redhat.com>
12 years, 6 months
[PATCH] fileSD: Fix remotePath in SD metadata (V3)
by agl@us.ibm.com
Changes since V2:
- Rename mountToRemotePath() to getRealPath() and define it in each child
class.
Changes since V1:
- Derive the remotePath from self.mountpoint instead of using the metadata
The current method for gathering a LOCALFS Storage Domain's remotePath
property does not work because these domains are connected with a symlink,
not a mount. Fix up the current code so that it handles links and
mountpoints.
In the code I have noticed some sentiments that path information should be
removed from the storage domain metadata. I strongly disagree with this
idea. The path is a critical piece of information. End users will care a
lot about the path because it is where their images are located. This
informaton is also useful for calling connectStorageServer() and
disconnectStorageServer().
Signed-off-by: Adam Litke <agl(a)us.ibm.com>
---
vdsm/storage/fileSD.py | 16 ++++++++--------
vdsm/storage/localFsSD.py | 3 +++
vdsm/storage/nfsSD.py | 6 ++++++
3 files changed, 17 insertions(+), 8 deletions(-)
diff --git a/vdsm/storage/fileSD.py b/vdsm/storage/fileSD.py
index 35f7ab3..5058b89 100644
--- a/vdsm/storage/fileSD.py
+++ b/vdsm/storage/fileSD.py
@@ -24,7 +24,6 @@ import logging
import glob
import sd
-import fileUtils
import storage_exception as se
import fileVolume
import image
@@ -224,6 +223,13 @@ class FileStorageDomain(sd.StorageDomain):
def getRemotePath(self):
return self.remotePath
+ def getRealPath(self):
+ """
+ Return the actual path to the underlying storage.
+ This function needs to be overloaded by the child classes.
+ """
+ return ""
+
def getInfo(self):
"""
Get storage domain info
@@ -232,13 +238,7 @@ class FileStorageDomain(sd.StorageDomain):
# First call parent getInfo() - it fills in all the common details
info = sd.StorageDomain.getInfo(self)
# Now add fileSD specific data
- info['remotePath'] = ''
- mounts = fileUtils.getMounts()
- for mount in mounts:
- if self.mountpoint == mount[1]:
- info['remotePath'] = mount[0]
- break
-
+ info['remotePath'] = self.getRealPath()
return info
def getStats(self):
diff --git a/vdsm/storage/localFsSD.py b/vdsm/storage/localFsSD.py
index 6a61979..e07426e 100644
--- a/vdsm/storage/localFsSD.py
+++ b/vdsm/storage/localFsSD.py
@@ -93,5 +93,8 @@ class LocalFsStorageDomain(fileSD.FileStorageDomain):
raise se.StorageDomainDoesNotExist(sdUUID)
+ def getRealPath(self):
+ return os.readlink(self.mountpoint)
+
def findDomain(sdUUID):
return LocalFsStorageDomain(LocalFsStorageDomain.findDomainPath(sdUUID))
diff --git a/vdsm/storage/nfsSD.py b/vdsm/storage/nfsSD.py
index 51dc31f..d4b2759 100644
--- a/vdsm/storage/nfsSD.py
+++ b/vdsm/storage/nfsSD.py
@@ -138,6 +138,12 @@ class NfsStorageDomain(fileSD.FileStorageDomain):
raise se.StorageDomainDoesNotExist(sdUUID)
+ def getRealPath(self):
+ for mount in fileUtils.getMounts():
+ if self.mountpoint == mount[1]:
+ return mount[0]
+ return ""
+
def findDomain(sdUUID):
return NfsStorageDomain(NfsStorageDomain.findDomainPath(sdUUID))
--
1.7.6
--
Adam Litke <agl(a)us.ibm.com>
IBM Linux Technology Center
12 years, 6 months
Change in vdsm[master]: Related to BZ#736422: Fixed a typo in command's name.
by Dan Kenigsberg
Dan Kenigsberg has submitted this change and it was merged.
Change subject: Related to BZ#736422: Fixed a typo in command's name.
......................................................................
Related to BZ#736422: Fixed a typo in command's name.
The RHEV-Agent send a "session-lock" notification but vdsm
expected to receive a "session-locked".
Change-Id: Icef91042c6d8719d649249bada8c7df332f41db3
---
M vdsm/guestIF.py
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Dan Kenigsberg: Looks good to me, approved
Jakub Libosvar: Verified
--
To view, visit http://gerrit.usersys.redhat.com/973
To unsubscribe, visit http://gerrit.usersys.redhat.com/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Icef91042c6d8719d649249bada8c7df332f41db3
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Gal Hammer <ghammer(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Jakub Libosvar <libosvar(a)redhat.com>
12 years, 6 months
Change in vdsm[master]: BZ#736114 bootstrap: override iptables if requested
by Dan Kenigsberg
Dan Kenigsberg has posted comments on this change.
Change subject: BZ#736114 bootstrap: override iptables if requested
......................................................................
Patch Set 2: (5 inline comments)
....................................................
File vds_bootstrap/vds_bootstrap.py
Line 139: pass
Line 140: sys.path.append(VDSM_DIR)
Line 141:
Line 142: __DEFAULT_IPTABLES__ = """
Line 143: # oVirt automatically generated firewall configuration
fixed text
Line 144: *filter
Line 145: :INPUT ACCEPT [0:0]
Line 146: :FORWARD ACCEPT [0:0]
Line 147: :OUTPUT ACCEPT [0:0]
Line 169: """
Line 170: __SYSCONFIG_IPTABLES__ = '/etc/sysconfig/iptables'
Line 171:
Line 172: def _safeWrite(fname, s):
Line 173: "Write s into fname atomically"
triple quote is important only for multiline strings.
Line 174:
Line 175: t = tempfile.NamedTemporaryFile(delete=False)
Line 176: t.write(s)
Line 177: t.close()
Line 187: if oldstat is not None:
Line 188: os.chmod(fname, oldstat.st_mode)
Line 189: os.chown(fname, oldstat.st_uid, oldstat.st_gid)
Line 190:
Line 191: selinux.restorecon(fname)
yeah, I am trying to set the exact permissions - but if it fails, tough luck, log and continue.
Line 192: except OSError:
Line 193: logging.debug('trying to maintain file permissions', exc_info=True)
Line 194:
Line 195:
Line 748: self._xmlOutput('SetSSHAccess', self.status, None, None, self.message)
Line 749: return self.rc
Line 750:
Line 751: def overrideFirewall(self):
Line 752: self.message = 'overriden firewall successfully'
Done
Line 753: self.rc = True
Line 754: self.st = 'OK'
Line 755:
Line 756: try:
Line 753: self.rc = True
Line 754: self.st = 'OK'
Line 755:
Line 756: try:
Line 757: _safeWrite(__SYSCONFIG_IPTABLES__)
Doh!
Line 758: except Exception, e:
Line 759: self.message = str(e)
Line 760: self.rc = False
Line 761: self.st = 'FAIL'
--
To view, visit http://gerrit.usersys.redhat.com/945
To unsubscribe, visit http://gerrit.usersys.redhat.com/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I6a2e7d0512a2c9fc691135bf42b03fdcb3ee088a
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Yotam Oron <yoron(a)redhat.com>
12 years, 6 months
Change in vdsm[master]: BZ#716573 make vdsm's `ulimit -n` configurable
by Dan Kenigsberg
Dan Kenigsberg has submitted this change and it was merged.
Change subject: BZ#716573 make vdsm's `ulimit -n` configurable
......................................................................
BZ#716573 make vdsm's `ulimit -n` configurable
Change-Id: Ia7e8282770650a691e8d388c62e64111df40b6b2
---
M vdsm/config.py
M vdsm/vdsmd.in
2 files changed, 3 insertions(+), 1 deletion(-)
Approvals:
Dan Kenigsberg: Verified; Looks good to me, approved
--
To view, visit http://gerrit.usersys.redhat.com/948
To unsubscribe, visit http://gerrit.usersys.redhat.com/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia7e8282770650a691e8d388c62e64111df40b6b2
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Yotam Oron <yoron(a)redhat.com>
12 years, 6 months
Change in vdsm[master]: BZ#716573 make vdsm's `ulimit -n` configurable
by Dan Kenigsberg
Dan Kenigsberg has posted comments on this change.
Change subject: BZ#716573 make vdsm's `ulimit -n` configurable
......................................................................
Patch Set 3: Verified; Looks good to me, approved
rebased
--
To view, visit http://gerrit.usersys.redhat.com/948
To unsubscribe, visit http://gerrit.usersys.redhat.com/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia7e8282770650a691e8d388c62e64111df40b6b2
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Yotam Oron <yoron(a)redhat.com>
12 years, 6 months