[node-patches] Change in ovirt-node[master]: finish snmp.py to plugin conversion

jboggs at redhat.com jboggs at redhat.com
Sat Sep 8 01:10:25 UTC 2012


Joey Boggs has uploaded a new change for review.

Change subject: finish snmp.py to plugin conversion
......................................................................

finish snmp.py to plugin conversion

This moves snmp.py into a new plugins subdir and also places the black/whitelisting
into snmp.minimize that will be deployed to /etc/ovirt-plugins.d

firewall rules are left in place in the kickstart until edit-ndoe supports it

Change-Id: Ibb6e08c17b295f3ab792e0990ce46f36ed263be6
Signed-off-by: Joey Boggs <jboggs at redhat.com>
---
M Makefile.am
M configure.ac
M ovirt-node.spec.in
A plugins/Makefile.am
R plugins/snmp.py
M recipe/common-minimizer.ks
M recipe/common-pkgs.ks
M scripts/Makefile.am
M scripts/ovirt-config-setup.py
9 files changed, 37 insertions(+), 21 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/53/7853/1

diff --git a/Makefile.am b/Makefile.am
index d65007d..15d7117 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -30,6 +30,7 @@
   scripts \
   services \
   logrotate \
+  plugins \
   modules \
   tools
 
diff --git a/configure.ac b/configure.ac
index aef6a50..ee4734d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -68,6 +68,7 @@
                 recipe/Makefile
                 logrotate/Makefile
                 modules/Makefile
+                plugins/Makefile
                 $MAIN_KS
                 recipe/image-minimizer.ks
                 ovirt-node.spec])
diff --git a/ovirt-node.spec.in b/ovirt-node.spec.in
index 964d38e..a83eb1e 100644
--- a/ovirt-node.spec.in
+++ b/ovirt-node.spec.in
@@ -111,11 +111,16 @@
 %package plugin-snmp
 Summary:        SNMP plugin for %{product_family} image
 Group:          Applications/System
+Requires:       net-snmp
+Requires:       perl-libs
 
 %define snmp_root %{_datadir}/%{name}
 
 %description plugin-snmp
 This package provides an snmp plugin tools for use with%{product_family} image.
+
+%post plugin-snmp
+systemctl enable snmpd.service
 
 %prep
 %setup -q
@@ -245,6 +250,7 @@
 
 %files plugin-snmp
 %{python_sitelib}/ovirt_config_setup/snmp.py
+%{_sysconfdir}/ovirt-plugins.d/snmp.minimize
 
 %files
 %defattr(-,root,root)
diff --git a/plugins/Makefile.am b/plugins/Makefile.am
new file mode 100644
index 0000000..301f45a
--- /dev/null
+++ b/plugins/Makefile.am
@@ -0,0 +1,26 @@
+# Copyright (C) 2012 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; version 2 of the License.
+#
+# 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.  A copy of the GNU General Public License is
+# also available at http://www.gnu.org/copyleft/gpl.html.
+
+pluginsdir = $(sysconfdir)/ovirt-plugins.d
+pyovirtconfigsetupdir =$(pythondir)/ovirt_config_setup
+
+dist_pyovirtconfigsetup_SCRIPTS = \
+  snmp.py
+
+dist_plugins_DATA = \
+  snmp.minimize
+
diff --git a/scripts/ovirt_config_setup/snmp.py b/plugins/snmp.py
similarity index 100%
rename from scripts/ovirt_config_setup/snmp.py
rename to plugins/snmp.py
diff --git a/recipe/common-minimizer.ks b/recipe/common-minimizer.ks
index c6b3644..abe756c 100644
--- a/recipe/common-minimizer.ks
+++ b/recipe/common-minimizer.ks
@@ -34,8 +34,6 @@
 # cronie pulls in exim (sendmail) which pulls in all kinds of perl deps
 droprpm exim
 droprpm perl*
-# keep libperl for snmpd
-keeprpm perl-libs
 droprpm postfix
 droprpm mysql*
 
@@ -301,14 +299,6 @@
 drop /etc/pki/java
 drop /etc/pki/nssdb
 
-# minimize net-snmp
-drop /etc/rc.d/init.d/snmptrapd
-drop /etc/snmp/snmptrapd.conf
-drop /etc/sysconfig/snmptrapd
-drop /usr/sbin/snmptrapd
-drop /usr/bin/net-snmp-create-v3-user
-drop /usr/bin/snmpconf
-drop /usr/share/snmp/snmpconf-data
 
 #desktop files
 drop /etc/xdg/autostart/restorecond.desktop
@@ -320,6 +310,8 @@
 # remove bogus kdump script (rpmdiff complains)
 drop /etc/kdump-adv-conf
 
+# drop net-snmp
+droprpm net-snmp
 #cim
 droprpm tog-pegasus
 droprpm tog-pegasus-libs
diff --git a/recipe/common-pkgs.ks b/recipe/common-pkgs.ks
index 2b93582..d1b818c 100644
--- a/recipe/common-pkgs.ks
+++ b/recipe/common-pkgs.ks
@@ -77,8 +77,6 @@
 dosfstools
 # kdump
 kexec-tools
-# SNMP support rhbz#614870
-net-snmp
 # qlogic firmware
 ql2100-firmware
 ql2200-firmware
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index 19bbdc6..154f5ad 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -68,8 +68,7 @@
 pyovirtconfigsetup_PYTHON = \
   ovirt_config_setup/__init__.py \
   ovirt_config_setup/cim.py \
-  ovirt_config_setup/plugins.py \
-  ovirt_config_setup/snmp.py
+  ovirt_config_setup/plugins.py
 
 if TARGET_FEDORA
 pyovirtconfigsetup_PYTHON += \
diff --git a/scripts/ovirt-config-setup.py b/scripts/ovirt-config-setup.py
index ab2b89e..7f9d324 100755
--- a/scripts/ovirt-config-setup.py
+++ b/scripts/ovirt-config-setup.py
@@ -532,13 +532,6 @@
     def password_check_callback(self):
         resp, msg = password_check(self.root_password_1.value(),
                                    self.root_password_2.value())
-        if self.__current_page == SNMP_PAGE:
-            if len(self.root_password_1.value()) < 8:
-                self.root_password_1.set("")
-                msg = "Password must be at least 8 characters"
-            if len(self.root_password_2.value()) < 8:
-                self.root_password_2.set("")
-                msg = "Password must be at least 8 characters"
         self.pw_msg.setText(msg)
         return
 


--
To view, visit http://gerrit.ovirt.org/7853
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibb6e08c17b295f3ab792e0990ce46f36ed263be6
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Joey Boggs <jboggs at redhat.com>



More information about the node-patches mailing list