Yaniv Bronhaim has uploaded a new change for review.
Change subject: load_needed_modules verb is not required
......................................................................
load_needed_modules verb is not required
Since ovirt-3.6 systemd takes care for loading required kernel modules during
installation by using vdsm-modules-load.d.conf
Change-Id: I44e4624c354401116040b3fd5bbb54b6f31ee727
Signed-off-by: Yaniv Bronhaim <ybronhei(a)redhat.com>
---
M .gitignore
M debian/vdsm-python.install
M init/vdsmd_init_common.sh.in
M lib/vdsm/tool/Makefile.am
D lib/vdsm/tool/load_needed_modules.py.in
M vdsm-tool/vdsm-tool.1.in
M vdsm.spec.in
7 files changed, 0 insertions(+), 87 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/40/43040/1
diff --git a/.gitignore b/.gitignore
index 3fef689..0f5305f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -36,7 +36,6 @@
init/vdsmd_init_common.sh
lib/vdsm/config.py
lib/vdsm/constants.py
-lib/vdsm/tool/load_needed_modules.py
lib/vdsm/tool/validate_ovirt_certs.py
lib/vdsm/vdscli.py
lib/vdsm/vdsm.conf.sample
diff --git a/debian/vdsm-python.install b/debian/vdsm-python.install
index 57d5033..d9402c3 100644
--- a/debian/vdsm-python.install
+++ b/debian/vdsm-python.install
@@ -35,7 +35,6 @@
./usr/lib/python2.7/dist-packages/vdsm/tool/dump_bonding_defaults.py
./usr/lib/python2.7/dist-packages/vdsm/tool/dump_volume_chains.py
./usr/lib/python2.7/dist-packages/vdsm/tool/configurator.py
-./usr/lib/python2.7/dist-packages/vdsm/tool/load_needed_modules.py
./usr/lib/python2.7/dist-packages/vdsm/tool/nwfilter.py
./usr/lib/python2.7/dist-packages/vdsm/tool/passwd.py
./usr/lib/python2.7/dist-packages/vdsm/tool/register.py
diff --git a/init/vdsmd_init_common.sh.in b/init/vdsmd_init_common.sh.in
index 43d0db5..47372fd 100644
--- a/init/vdsmd_init_common.sh.in
+++ b/init/vdsmd_init_common.sh.in
@@ -153,13 +153,6 @@
}
-task_load_needed_modules(){
- if ! _has_systemd; then
- "${VDSM_TOOL}" load-needed-modules
- fi
-}
-
-
task_dump_bonding_defaults(){
"${VDSM_TOOL}" dump-bonding-defaults
}
@@ -301,9 +294,6 @@
case "$1" in
--pre-start)
- # If dump_bonding_defaults is desired (for the uneliminable possibility
- # of added bonding options or tweaked kernel defaults) it has to be run
- # after load_needed_modules (modprobe bonding).
# NetworkManager must not crash on nmcli conn delete.
run_tasks " \
mkdirs \
@@ -318,7 +308,6 @@
syslog_available \
nwfilter \
dummybr \
- load_needed_modules \
tune_system \
test_space \
test_lo \
diff --git a/lib/vdsm/tool/Makefile.am b/lib/vdsm/tool/Makefile.am
index d93156e..c8979ca 100644
--- a/lib/vdsm/tool/Makefile.am
+++ b/lib/vdsm/tool/Makefile.am
@@ -22,12 +22,10 @@
include $(top_srcdir)/build-aux/Makefile.subs
EXTRA_DIST = \
- load_needed_modules.py.in \
validate_ovirt_certs.py.in \
$(NULL)
nodist_vdsmtool_PYTHON = \
- load_needed_modules.py \
validate_ovirt_certs.py \
$(NULL)
diff --git a/lib/vdsm/tool/load_needed_modules.py.in
b/lib/vdsm/tool/load_needed_modules.py.in
deleted file mode 100644
index dc7d533..0000000
--- a/lib/vdsm/tool/load_needed_modules.py.in
+++ /dev/null
@@ -1,60 +0,0 @@
-# Copyright IBM, Corp. 2012
-# Copyright 2013-2014 Red Hat, Inc.
-#
-# 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
-#
-
-
-from __future__ import absolute_import
-import os.path
-
-from . import expose, ExtraArgsError
-from ..utils import execCmd
-
-
-EX_MODPROBE = '@MODPROBE_PATH@'
-
-
-def _exec_command(argv):
- """
- This function executes a given shell command.
- """
- rc, out, err = execCmd(argv, raw=True)
- if rc != 0:
- raise RuntimeError(
- "Execute command %s failed: %s" % (argv, err)
- )
-
-
-def _enable_softdog():
- if not os.path.exists('/dev/watchdog'):
- _exec_command([EX_MODPROBE, 'softdog'])
-
-
-@expose('load-needed-modules')
-def load_needed_modules(*args):
- """
- load-needed-modules
- Load needed modules
- """
-
- if len(args) > 1:
- raise ExtraArgsError()
-
- for mod in ['bridge', 'tun', 'bonding', '8021q']:
- _exec_command([EX_MODPROBE, mod])
- _enable_softdog()
diff --git a/vdsm-tool/vdsm-tool.1.in b/vdsm-tool/vdsm-tool.1.in
index d29dc1e..571abc8 100644
--- a/vdsm-tool/vdsm-tool.1.in
+++ b/vdsm-tool/vdsm-tool.1.in
@@ -72,13 +72,6 @@
Defines a dummy bridge on a libvirt network.
.RE
.TP
-Options for the \fIload_needed_modules\fP module:
-.RS
-.TP
-.B load-needed-modules
-Loads the required modules.
-.RE
-.TP
Options for the \fInwfilter\fP module:
.RS
.TP
diff --git a/vdsm.spec.in b/vdsm.spec.in
index 2f5ffc8..e6bf872 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -1189,11 +1189,6 @@
%{_datadir}/%{vdsm_name}/config.py*
%{_datadir}/%{vdsm_name}/netinfo.py*
%endif
-%if 0%{?with_systemd}
-%exclude %{python_sitelib}/%{vdsm_name}/tool/load_needed_modules.py*
-%else
-%{python_sitelib}/%{vdsm_name}/tool/load_needed_modules.py*
-%endif
%{python_sitelib}/%{vdsm_name}/tool/configfile.py*
%{python_sitelib}/%{vdsm_name}/tool/dummybr.py*
%{python_sitelib}/%{vdsm_name}/tool/dump_bonding_defaults.py*
--
To view, visit
https://gerrit.ovirt.org/43040
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I44e4624c354401116040b3fd5bbb54b6f31ee727
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim <ybronhei(a)redhat.com>