Wenyi Gao has uploaded a new change for review.
Change subject: Move load_needed_modules to vdsm-tool
......................................................................
Move load_needed_modules to vdsm-tool
Move load_needed_modules to vdsm-tool from vdsmd.init
Change-Id: Icdc8f9d07a7150c4a846228811d6c5dcb17fa358
Signed-off-by: Wenyi Gao <wenyi(a)linux.vnet.ibm.com>
---
M configure.ac
M vdsm-tool/Makefile.am
A vdsm-tool/load_needed_modules.py.in
M vdsm.spec.in
M vdsm/vdsmd.init.in
5 files changed, 63 insertions(+), 28 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/87/7487/1
diff --git a/configure.ac b/configure.ac
index d4b6815..c50f42f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -149,6 +149,7 @@
AC_PATH_PROG([MKFS_PATH], [mkfs], [/sbin/mkfs])
AC_PATH_PROG([MKFS_MSDOS_PATH], [mkfs.msdos], [/sbin/mkfs.msdos])
AC_PATH_PROG([MKISOFS_PATH], [mkisofs], [/usr/bin/mkisofs])
+AC_PATH_PROG([MODPROBE_PATH], [modprobe], [/sbin/modprobe])
AC_PATH_PROG([MOUNT_PATH], [mount], [/bin/mount])
AC_PATH_PROG([MULTIPATH_PATH], [multipath], [/sbin/multipath])
AC_PATH_PROG([MV_PATH], [mv], [/bin/mv])
diff --git a/vdsm-tool/Makefile.am b/vdsm-tool/Makefile.am
index 6ec0198..95298e2 100644
--- a/vdsm-tool/Makefile.am
+++ b/vdsm-tool/Makefile.am
@@ -28,4 +28,5 @@
dist_vdsmtool_DATA = \
__init__.py \
passwd.py \
- validate_ovirt_certs.py
\ No newline at end of file
+ validate_ovirt_certs.py \
+ load_needed_modules.py
diff --git a/vdsm-tool/load_needed_modules.py.in b/vdsm-tool/load_needed_modules.py.in
new file mode 100644
index 0000000..80be9b1
--- /dev/null
+++ b/vdsm-tool/load_needed_modules.py.in
@@ -0,0 +1,58 @@
+# Copyright 2012 by IBM
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+#
+# Refer to the README and COPYING files for full details of the license
+#
+
+import os
+import subprocess
+from vdsm.tool import expose
+
+
+EX_MODPROBE = '@MODPROBE_PATH@'
+
+BOND = ['bond0', 'bond1', 'bond2', 'bond3', 'bond4']
+DEVS = '/sys/class/net/bonding_masters'
+
+
+def _exec_command(argv):
+ subprocess.Popen(argv, stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE).communicate()
+
+
+def _is_bond_dev_available(bond):
+ if os.path.exists(DEVS):
+ with open(DEVS, 'r') as f:
+ devs = f.read().strip('\n').split(' ')
+ if bond in devs:
+ return True
+ return False
+
+
+@expose('load-needed-modules')
+def load_needed_modules():
+ """
+ Load needed modules
+ """
+ _exec_command([EX_MODPROBE, 'tun'])
+ _exec_command([EX_MODPROBE, 'bonding'])
+
+ for bond in BOND:
+ if not _is_bond_dev_available(bond):
+ with open(DEVS, 'w') as f:
+ f.write('+%s\n' % bond)
+
+ _exec_command([EX_MODPROBE, '8021q'])
diff --git a/vdsm.spec.in b/vdsm.spec.in
index ce73f6e..5e68ce8 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -720,6 +720,7 @@
%{python_sitearch}/%{vdsm_name}/tool/__init__.py*
%{python_sitearch}/%{vdsm_name}/tool/passwd.py*
%{python_sitearch}/%{vdsm_name}/tool/validate_ovirt_certs.py*
+%{python_sitearch}/%{vdsm_name}/tool/load_needed_modules.py*
%files tests
%doc %{_datadir}/%{vdsm_name}/tests/README
diff --git a/vdsm/vdsmd.init.in b/vdsm/vdsmd.init.in
index a57649f..3d6211b 100755
--- a/vdsm/vdsmd.init.in
+++ b/vdsm/vdsmd.init.in
@@ -198,32 +198,6 @@
return 0
}
-bond_dev_available() {
- local BOND_DEVS=$(/bin/cat /sys/class/net/bonding_masters)
- local x
-
- [[ -z "$BOND_DEVS" ]] && return 1
-
- for x in $BOND_DEVS; do
- [[ "$x" == "$1" ]] && return 0
- done
-
- return 1
-}
-
-load_needed_modules() {
- local b
-
- /sbin/modprobe tun
- /sbin/modprobe bonding
- # RHEV-M currently assumes that all bonding devices pre-exist
- for b in bond{0,1,2,3,4}; do
- if ! bond_dev_available $b; then
- echo +$b > /sys/class/net/bonding_masters 2>/dev/null
- fi
- done
- /sbin/modprobe 8021q
-}
test_already_running()
{
@@ -472,7 +446,7 @@
fi
@VDSMDIR@/vdsm-restore-net-config
- load_needed_modules
+ /usr/bin/vdsm-tool load_needed_modules
mk_data_center
mk_core_path
mk_dom_backup
--
To view, visit http://gerrit.ovirt.org/7487
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Icdc8f9d07a7150c4a846228811d6c5dcb17fa358
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Wenyi Gao <wenyi(a)linux.vnet.ibm.com>
Shu Ming has uploaded a new change for review.
Change subject: Offset by one for UUID position
......................................................................
Offset by one for UUID position
In the "metaList" list, "data-center" should be in position 2 instead of 3 which is the result of len(os.path.normpath(config.get('irs', 'repository')).split('/')). The storage domain uuid should be in metaList[5] instead of metaList[6]. So offset by one here to get the right uuid for the storage domain.
Change-Id: I9931a1aa804d9dc7aec1485ebc29bac45131d0e7
Signed-off-by: Shu Ming <shuming(a)linux.vnet.ibm.com>
---
M vdsm/storage/fileSD.py
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/78/7078/1
--
To view, visit http://gerrit.ovirt.org/7078
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I9931a1aa804d9dc7aec1485ebc29bac45131d0e7
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Shu Ming <shuming(a)linux.vnet.ibm.com>
Mark Wu has uploaded a new change for review.
Change subject: Don't report 'imageID' for non-vdsm images in _getDiskStats()
......................................................................
Don't report 'imageID' for non-vdsm images in _getDiskStats()
Non-vdsm images don't have the attribute 'imageID'. It causes that
_getDiskStats doesn't work for them. So change to only report
'imageID' for vdsm images.
Change-Id: I2a017ba80cd94ee098c7cd7a30095740870c3825
Signed-off-by: Mark Wu <wudxw(a)linux.vnet.ibm.com>
---
M vdsm/libvirtvm.py
1 file changed, 3 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/55/6055/1
--
To view, visit http://gerrit.ovirt.org/6055
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2a017ba80cd94ee098c7cd7a30095740870c3825
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Mark Wu <wudxw(a)linux.vnet.ibm.com>
Douglas Schilling Landgraf has uploaded a new change for review.
Change subject: nfs-check: check if /tmp exists
......................................................................
nfs-check: check if /tmp exists
I have received a debian user reporting that nfs-check didn't work..
analysing the case, we discovered that the system didn't contain /tmp
directory.
Change-Id: If364f703b1ab2223d194c4e300da824e0696d50b
---
M contrib/nfs-check.py
1 file changed, 6 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/67/3167/1
--
To view, visit http://gerrit.ovirt.org/3167
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: If364f703b1ab2223d194c4e300da824e0696d50b
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Douglas Schilling Landgraf <dougsland(a)redhat.com>
Shu Ming has uploaded a new change for review.
Change subject: Make svdsm files depend on path definitions
......................................................................
Make svdsm files depend on path definitions
The files created by super vdsm process should
be put into path defined by the path definition
in constants.py
Change-Id: Ia952e930d719c65a9bc503f8a097bdfc26b5a397
Signed-off-by: Shu Ming <shuming(a)linux.vnet.ibm.com>
---
M vdsm/supervdsm.py
1 file changed, 3 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/40/7540/1
diff --git a/vdsm/supervdsm.py b/vdsm/supervdsm.py
index 3e881e8..7031a79 100644
--- a/vdsm/supervdsm.py
+++ b/vdsm/supervdsm.py
@@ -45,8 +45,9 @@
raise RuntimeError("SuperVDSM Server not found")
-PIDFILE = "/var/run/vdsm/svdsm.pid"
-ADDRESS = "/var/run/vdsm/svdsm.sock"
+VAR_RUN_VDSM = constants.P_VDSM_RUN
+PIDFILE = os.path.join(VAR_RUN_VDSM, "svdsm.pid")
+ADDRESS = os.path.join(VAR_RUN_VDSM, "svdm.sock")
SUPERVDSM = __supervdsmServerPath()
--
To view, visit http://gerrit.ovirt.org/7540
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia952e930d719c65a9bc503f8a097bdfc26b5a397
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Shu Ming <shuming(a)linux.vnet.ibm.com>
Federico Simoncelli has uploaded a new change for review.
Change subject: Asynchronous LVM bootstrap on vdsm start
......................................................................
Asynchronous LVM bootstrap on vdsm start
The lvm bootstrap might take a long time if one or more block device is
unreachable. Moving the bootstrap in the storageRefresh thread speeds up
the vdsm initialization and its responsiveness.
Bug-Id: https://bugzilla.redhat.com/show_bug.cgi?id=752470
Signed-off-by: Federico Simoncelli <fsimonce(a)redhat.com>
Change-Id: I9cbf1b8880cf2fb38f9de008f884fc0a2b92e004
---
M vdsm/storage/hsm.py
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/66/7566/1
diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py
index 331a563..d708a24 100644
--- a/vdsm/storage/hsm.py
+++ b/vdsm/storage/hsm.py
@@ -290,9 +290,9 @@
multipath.setupMultipath()
self.__validateLvmLockingType()
- lvm._lvminfo.bootstrap()
def storageRefresh():
+ lvm._lvminfo.bootstrap()
sdCache.refreshStorage()
self.tasksDir = config.get('irs', 'hsm_tasks')
--
To view, visit http://gerrit.ovirt.org/7566
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I9cbf1b8880cf2fb38f9de008f884fc0a2b92e004
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <fsimonce(a)redhat.com>