Change in vdsm[master]: Use autoconf for external programs
by Dan Kenigsberg
Dan Kenigsberg has posted comments on this change.
Change subject: Use autoconf for external programs
......................................................................
Patch Set 4: Verified; Looks good to me, approved
--
Gerrit-MessageType: comment
Gerrit-Change-Id: I26905591bcbae8303a8133581f794b581b3056d4
Gerrit-PatchSet: 4
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: Saggi Mizrahi <smizrahi(a)redhat.com>
12 years, 8 months
Change in vdsm[master]: Path and user substitutions using autoconf
by Dan Kenigsberg
Dan Kenigsberg has posted comments on this change.
Change subject: Path and user substitutions using autoconf
......................................................................
Patch Set 4: Verified; Looks good to me, approved
--
Gerrit-MessageType: comment
Gerrit-Change-Id: I5c24d9418a592d0e582ddf41315012d2db69a76a
Gerrit-PatchSet: 4
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: Saggi Mizrahi <smizrahi(a)redhat.com>
12 years, 8 months
Change in vdsm[master]: Use automake to build and install vdsm
by Dan Kenigsberg
Dan Kenigsberg has posted comments on this change.
Change subject: Use automake to build and install vdsm
......................................................................
Patch Set 4: Verified; Looks good to me, approved
--
Gerrit-MessageType: comment
Gerrit-Change-Id: I91fae2ca646f8f1db8c12708dee1ddd1ae96b38f
Gerrit-PatchSet: 4
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: Saggi Mizrahi <smizrahi(a)redhat.com>
12 years, 8 months
Change in vdsm[master]: Initial support for autoconf
by Dan Kenigsberg
Dan Kenigsberg has posted comments on this change.
Change subject: Initial support for autoconf
......................................................................
Patch Set 4: Verified; Looks good to me, approved
--
Gerrit-MessageType: comment
Gerrit-Change-Id: Id3fa9b33559e6a7721faa417752da6b7ba1f4c10
Gerrit-PatchSet: 4
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: Saggi Mizrahi <smizrahi(a)redhat.com>
12 years, 8 months
[NEW PATCH] BZ#727537 - Actually invalidate lvmCache when asked (via gerrit-bot)
by smizrahi@redhat.com
New patch submitted by Saggi Mizrahi (smizrahi(a)redhat.com)
You can review this change at: http://gerrit.usersys.redhat.com/777
commit 39abac283fb199699f375219d8c74aab99f77009
Author: Saggi Mizrahi <smizrahi(a)redhat.com>
Date: Tue Aug 2 15:31:12 2011 +0300
BZ#727537 - Actually invalidate lvmCache when asked
Change-Id: Ibc2456f2900852de32c66753c58b92b1c298c45b
diff --git a/vdsm/storage/lvm.py b/vdsm/storage/lvm.py
index e4ee9f4..2fde091 100644
--- a/vdsm/storage/lvm.py
+++ b/vdsm/storage/lvm.py
@@ -227,14 +227,12 @@ def _updateLvmConf(conf):
os.mkdir(VDSM_LVM_SYSTEM_DIR)
with open(VDSM_LVM_CONF, "w") as lvmconf:
- lvmconf.write(VDSM_LVM_CONF)
+ lvmconf.write(conf)
except IOError, e:
# We are not interested in exceptions here, note it and
log.warning("Cannot create %s file %s", VDSM_LVM_CONF, str(e))
-
-
def _setupLVMEnv():
lvmenvfname = os.path.join(VAR_RUN_VDSM, "lvm.env")
with file(lvmenvfname, "w") as lvmenv:
@@ -329,11 +327,11 @@ class LVMCache(object):
return self._extraCfg
self._extraCfg = _buildConfig(multipath.getMPDevNamesIter())
+ _updateLvmConf(self._extraCfg)
self._filterStale = False
return self._extraCfg
-
def _addExtraCfg(self, cmd, devList=None):
newcmd = [constants.EXT_LVM, cmd[0]]
if devList is not None:
@@ -350,8 +348,9 @@ class LVMCache(object):
return newcmd
- def invalidateFilter(self):
+ def invalidateCache(self):
self._filterStale = True
+ self.flush()
def __init__(self):
self._filterStale = True
@@ -372,7 +371,7 @@ class LVMCache(object):
rc, out, err = misc.execCmd(finalCmd)
if rc != 0:
#Filter might be stale
- self.invalidateFilter()
+ self.invalidateCache()
newCmd = self._addExtraCfg(cmd)
# Before blindly trying again make sure
# that the commands are not identical, because
@@ -674,8 +673,8 @@ class LVMCache(object):
_lvminfo = LVMCache()
-def invalidateFilter():
- _lvminfo.invalidateFilter()
+def invalidateCache():
+ _lvminfo.invalidateCache()
def _vgmknodes(vg):
cmd = ["vgmknodes", vg]
diff --git a/vdsm/storage/sdc.py b/vdsm/storage/sdc.py
index 67c9302..f284e9b 100644
--- a/vdsm/storage/sdc.py
+++ b/vdsm/storage/sdc.py
@@ -39,12 +39,12 @@ class StorageDomainCache:
def invalidateStorage(self):
self.storageStale = True
- lvm.invalidateFilter()
+ lvm.invalidateCache()
@misc.samplingmethod
def refreshStorage(self):
multipath.rescan()
- lvm.getAllVGs()
+ lvm.invalidateCache()
self.storageStale = False
def _getDomainFromCache(self, sdUUID):
12 years, 8 months
[NEW PATCH] FIXUP simplify getDomains. (via gerrit-bot)
by ewarszaw@redhat.com
New patch submitted by Eduardo Warszawski (ewarszaw(a)redhat.com)
You can review this change at: http://gerrit.usersys.redhat.com/774
commit f9df164fcaeda9000d7ccae5cf267ac1dca342cb
Author: Eduardo Warszawski <ewarszaw(a)redhat.com>
Date: Tue Aug 2 10:38:45 2011 +0300
FIXUP simplify getDomains.
Change-Id: I90a7faa9211a76b340521ef6ece830406156c27a
diff --git a/vdsm/storage/sp.py b/vdsm/storage/sp.py
index 6483985..8430955 100644
--- a/vdsm/storage/sp.py
+++ b/vdsm/storage/sp.py
@@ -1188,9 +1188,7 @@ class StoragePool:
self.log.error("Unexpected error while trying to monitor domain `%s`", sdUUID, exc_info=True)
def getDomains(self, activeOnly=False):
- isActive = lambda v: True if not activeOnly else v == sd.DOM_ACTIVE_STATUS
- return dict((k, v) for k, v in self.getMetaParam(PMDK_DOMAINS).iteritems() if isActive(v))
-
+ return dict((sdUUID, status) for sdUUID, status in self.getMetaParam(PMDK_DOMAINS).iteritems() if not activeOnly or status == sd.DOM_ACTIVE_STATUS)
def checkBackupDomain(self):
domDict = self.getDomains(activeOnly=True)
for sdUUID in domDict:
12 years, 9 months
[NEW PATCH] BZ#725240 logrotate libvirtd.log often (via gerrit-bot)
by Dan Kenigsberg
New patch submitted by Dan Kenigsberg (danken(a)redhat.com)
You can review this change at: http://gerrit.usersys.redhat.com/773
commit 28df824d113e42b24191bd39033e3fd3adb3e5d9
Author: Dan Kenigsberg <danken(a)redhat.com>
Date: Mon Aug 1 23:05:39 2011 +0300
BZ#725240 logrotate libvirtd.log often
Edit libvirt's /etc/logrotate.d/libvirtd and call it every 15 minutes so
that /var/log/libvirtd.log is rotated and compressed more often
Change-Id: I6a702e6f54a2c950f850096bdd36949e5947a8fd
diff --git a/vdsm.spec.in b/vdsm.spec.in
index 2465a1f..a84a0d1 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -172,7 +172,9 @@ then
lconf=/etc/libvirt/libvirtd.conf
qconf=/etc/libvirt/qemu.conf
ldconf=/etc/sysconfig/libvirtd
- sed -i '/# by vdsm$/d' $lconf $qconf $ldconf
+ llogr=/etc/logrotate.d/libvirtd
+
+ sed -i '/# by vdsm$/d' $lconf $qconf $ldconf $llogr
/usr/sbin/semanage boolean -m -S targeted -F /dev/stdin << _EOF
virt_use_nfs=0
@@ -288,6 +290,7 @@ machines without running real guests.
%config(noreplace) %{_sysconfdir}/rwtab.d/vdsm
%attr (440,root,root) %{_sysconfdir}/sudoers.d/50_vdsm
%{_sysconfdir}/cron.hourly/vdsm-logrotate
+%{_sysconfdir}/cron.d/vdsm-libvirt-logrotate
%{_datadir}/%{vdsm_name}/guestIF.py*
%{_datadir}/%{vdsm_name}/logUtils.py*
%{_datadir}/%{vdsm_name}/dsaversion.py*
diff --git a/vdsm/Makefile b/vdsm/Makefile
index c0f2ad3..15088d0 100644
--- a/vdsm/Makefile
+++ b/vdsm/Makefile
@@ -112,9 +112,11 @@ install: all sudoers.vdsm vdsm.conf.sample
cp sudoers.vdsm $(PREFIX)/etc/sudoers.d/50_vdsm
mkdir -p $(PREFIX)/etc/logrotate.d
mkdir -p $(PREFIX)/etc/cron.hourly
+ mkdir -p $(PREFIX)/etc/cron.d
mkdir -p $(PREFIX)$(SOSPLUGINDIR)
cp -p vdsm-logrotate.conf $(PREFIX)/etc/logrotate.d/vdsm
cp -p vdsm-logrotate $(PREFIX)/etc/cron.hourly
+ cp -p vdsm-libvirt-logrotate $(PREFIX)/etc/cron.d
cp -p vdsm-sosplugin.py $(PREFIX)$(SOSPLUGINDIR)/vdsm.py
mkdir -p $(PREFIX)$(MANDIR)/man8
cp -p vdsmd.8 $(PREFIX)$(MANDIR)/man8/
diff --git a/vdsm/vdsm-libvirt-logrotate b/vdsm/vdsm-libvirt-logrotate
new file mode 100644
index 0000000..f7ffd47
--- /dev/null
+++ b/vdsm/vdsm-libvirt-logrotate
@@ -0,0 +1,2 @@
+10,25,40,55 * * * * root /usr/sbin/logrotate /etc/logrotate.d/vdsm-libvirt
+
diff --git a/vdsm/vdsm-logrotate.conf b/vdsm/vdsm-logrotate.conf
index 12e16ad..64bef03 100644
--- a/vdsm/vdsm-logrotate.conf
+++ b/vdsm/vdsm-logrotate.conf
@@ -20,13 +20,3 @@
/var/log/core/*.dump.xz {
maxage 7
}
-/var/log/libvirtd*.log {
- rotate 100
- missingok
- copytruncate
- size 15M
- compress
- compresscmd /usr/bin/xz
- uncompresscmd /usr/bin/unxz
- compressext .xz
-}
diff --git a/vdsm/vdsmd b/vdsm/vdsmd
index 0591cb2..1c374cf 100755
--- a/vdsm/vdsmd
+++ b/vdsm/vdsmd
@@ -320,7 +320,24 @@ configure_libvirt()
local lnetwork=/etc/libvirt/qemu/networks/autostart/default.xml
rm -f $lnetwork
- ovirt_store_config $lconf $qconf $ldconf
+ local llogr=/etc/logrotate.d/libvirtd
+ local stanza=`mktemp`
+ cat > "$stanza" <<EOF
+/var/log/libvirtd.log { $BY_VDSM
+ rotate 100 $BY_VDSM
+ missingok $BY_VDSM
+ copytruncate $BY_VDSM
+ size 15M $BY_VDSM
+ compress $BY_VDSM
+ compresscmd /usr/bin/xz $BY_VDSM
+ uncompresscmd /usr/bin/unxz $BY_VDSM
+ compressext .xz $BY_VDSM
+} $BY_VDSM
+EOF
+ cat "$llogr" >> "$stanza"
+ mv "$stanza" "$llogr"
+
+ ovirt_store_config "$lconf" "$qconf" "$ldconf" "$llogr"
# vdsm makes extensive use of nfs-exported images
/usr/sbin/semanage boolean -m -S targeted -F /dev/stdin << _EOF
12 years, 9 months