[node-patches] Change in ovirt-node[master]: More F20 node cleanup
rbarry at redhat.com
rbarry at redhat.com
Wed Mar 19 17:45:40 UTC 2014
Ryan Barry has uploaded a new change for review.
Change subject: More F20 node cleanup
......................................................................
More F20 node cleanup
Fix edit-node so edited images boot, add more selinux rules, fix
sosreport on F20, add grubby for initramfs generation on livecds.
Change-Id: I66f9b26a470d8b6ca76c65abb0031757e2932a17
Signed-off-by: Ryan Barry <rbarry at redhat.com>
---
M ovirt-node.spec.in
M recipe/common-post.ks
M recipe/ovirt17-install.ks
D recipe/ovirt20-pkgs.ks
A recipe/ovirt20-pkgs.ks
M semodule/ovirt.te.in
M tools/edit-node
7 files changed, 63 insertions(+), 3 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/09/25909/1
diff --git a/ovirt-node.spec.in b/ovirt-node.spec.in
index 970eef3..a653d57 100644
--- a/ovirt-node.spec.in
+++ b/ovirt-node.spec.in
@@ -68,6 +68,7 @@
Requires: ethtool
Requires: cracklib-python
Requires: dracut
+Requires: openssh-server
%if %{is_el6}
Requires: /bin/hostname
%else
diff --git a/recipe/common-post.ks b/recipe/common-post.ks
index 78acdbb..5052112 100644
--- a/recipe/common-post.ks
+++ b/recipe/common-post.ks
@@ -176,6 +176,39 @@
# sosreport fixups for node image:
# use .pyc for plugins enumeration, .py is blacklisted
# include *-release
+if [[ $(rpm -E "%{?fedora}") = 20 ]];then
+patch --fuzz 3 -d /usr/lib/python2.7/site-packages/sos -p0 << \EOF_sos_patch
+--- utilities.py.orig 2013-08-04 08:36:51.000000000 -0700
++++ utilities.py 2014-03-18 15:25:02.675059445 -0700
+@@ -296,13 +296,13 @@
+ plugins = [self._plugin_name(plugin)
+ for plugin in list_
+ if "__init__" not in plugin
+- and plugin.endswith(".py")]
++ and plugin.endswith(".pyc")]
+ plugins.sort()
+ return plugins
+
+ def _find_plugins_in_dir(self, path):
+ if os.path.exists(path):
+- py_files = list(find("*.py", path))
++ py_files = list(find("*.pyc", path))
+ pnames = self._get_plugins_from_list(py_files)
+ if pnames:
+ return pnames
+--- plugins/general.py.orig 2014-03-18 15:07:20.570811354 -0700
++++ plugins/general.py 2014-03-18 15:28:49.371866760 -0700
+@@ -51,8 +51,7 @@
+ super(RedHatGeneral, self).setup()
+
+ self.add_copy_specs([
+- "/etc/redhat-release",
+- "/etc/fedora-release",
++ "/etc/*-release",
+ ])
+EOF_sos_patch
+
+else
patch --fuzz 3 -d /usr/lib/python2.*/site-packages/sos -p0 << \EOF_sos_patch
--- sosreport.py.orig 2011-04-07 11:51:40.000000000 +0000
+++ sosreport.py 2011-07-06 13:26:44.000000000 +0000
@@ -203,6 +236,8 @@
self.addCopySpec("/etc/sos.conf")
self.addCopySpec("/etc/sysconfig")
EOF_sos_patch
+fi
+
python -m compileall /usr/lib/python2.*/site-packages/sos
# XXX someting is wrong with readonly-root and dracut
diff --git a/recipe/ovirt17-install.ks b/recipe/ovirt17-install.ks
index 258cbdd..e2f05df 100644
--- a/recipe/ovirt17-install.ks
+++ b/recipe/ovirt17-install.ks
@@ -1 +1 @@
-services --enabled=auditd,ntpd,ntpdate,iptables,network,rsyslog,multipathd,snmpd,ovirt-early,ovirt,ovirt-post,ovirt-kdump,anyterm,collectd,libvirtd,cgconfig,mcelog,tuned --disabled=kdump
+services --enabled=auditd,ntpd,ntpdate,iptables,network,rsyslog,multipathd,ovirt-early,ovirt,ovirt-post,ovirt-kdump,anyterm,collectd,libvirtd,cgconfig,mcelog,tuned --disabled=kdump
diff --git a/recipe/ovirt20-pkgs.ks b/recipe/ovirt20-pkgs.ks
deleted file mode 120000
index 2d39025..0000000
--- a/recipe/ovirt20-pkgs.ks
+++ /dev/null
@@ -1 +0,0 @@
-ovirt19-pkgs.ks
\ No newline at end of file
diff --git a/recipe/ovirt20-pkgs.ks b/recipe/ovirt20-pkgs.ks
new file mode 100644
index 0000000..95511c5
--- /dev/null
+++ b/recipe/ovirt20-pkgs.ks
@@ -0,0 +1,16 @@
+%include fedora-pkgs.ks
+grub2-efi
+firewalld
+selinux-policy-devel
+shim
+# qlogic firmware
+linux-firmware
+iptables
+net-tools
+vconfig
+bfa-firmware
+grubby
+glusterfs-server
+
+# Explicitly add these package, to prevent yum from pulling in the debug versions
+kernel-modules-extra
diff --git a/semodule/ovirt.te.in b/semodule/ovirt.te.in
index 9eac501..e47ab66 100644
--- a/semodule/ovirt.te.in
+++ b/semodule/ovirt.te.in
@@ -51,6 +51,7 @@
#============= systemd_localed_t ==============
@SEMODULE_WITH_SYSTEMD at allow systemd_localed_t etc_t:file { write rename create setattr };
@SEMODULE_WITH_SYSTEMD at allow systemd_localed_t init_t:dbus send_msg;
+ at SEMODULE_WITH_SYSTEMD@allow systemd_localed_t initrc_t:dbus send_msg;
@SEMODULE_WITH_SYSTEMD at allow systemd_localed_t systemd_unit_file_t:service start;
@SEMODULE_WITH_SYSTEMD at allow systemd_localed_t ovirt_t:dbus send_msg;
@@ -70,7 +71,8 @@
#============= loadkeys_t ==============
-allow loadkeys_t initrc_tmp_t:file read;
+allow loadkeys_t initrc_tmp_t:file { open read };
+allow loadkeys_t console_device_t:chr_file open;
#============= local_login_t ==============
@@ -133,6 +135,7 @@
#============= tuned_t ==============
allow tuned_t ovirt_t:dbus send_msg;
+allow tuned_t initrc_t:dbus send_msg;
#============= iscsid_t ==============
diff --git a/tools/edit-node b/tools/edit-node
index 7c229d2..0e8e3b9 100755
--- a/tools/edit-node
+++ b/tools/edit-node
@@ -1201,7 +1201,13 @@
dracut_conf.write('add_dracutmodules+="dmsquash-live"\n')
# ensure that isofs is included - needed to boot from a LiveCD
dracut_conf.write('add_drivers+="isofs"\n')
+ dracut_conf.write('hostonly="no"\n')
dracut_conf.close()
+ cmd = 'sed -ie \'s/^hostonly="yes"/hostonly="no"/\' ' + \
+ '/usr/lib/dracut/dracut.conf.d/01-dist.conf'
+ f = subprocess.Popen(cmd, shell=True, stdout=PIPE, stderr=STDOUT,
+ preexec_fn=self._chroot)
+ output, err = f.communicate()
cmd = "rpm -q kernel"
f = subprocess.Popen(cmd, shell=True, stdout=PIPE, stderr=STDOUT,
preexec_fn=self._chroot)
--
To view, visit http://gerrit.ovirt.org/25909
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I66f9b26a470d8b6ca76c65abb0031757e2932a17
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Ryan Barry <rbarry at redhat.com>
More information about the node-patches
mailing list