mooli tayer has uploaded a new change for review.
Change subject: Avoid calling restorecon on a nonexistent dir.
......................................................................
Avoid calling restorecon on a nonexistent dir.
/var/log/core is only created when vdsm service goes up.
If vdsm never ran on the machine we might get:
restorecon: lstat(/var/log/core) failed: No such file or directory
Change-Id: Id7246b4947c0cdb52093c5fe0f60a690d72b1236
Signed-off-by: Mooli Tayer <mtayer(a)redhat.com>
---
M init/vdsmd_init_common.sh.in
M vdsm.spec.in
2 files changed, 4 insertions(+), 13 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/11/22211/1
diff --git a/init/vdsmd_init_common.sh.in b/init/vdsmd_init_common.sh.in
index 4b7d079..cc010fe 100644
--- a/init/vdsmd_init_common.sh.in
+++ b/init/vdsmd_init_common.sh.in
@@ -112,14 +112,6 @@
"@CHOWN_PATH@" @METADATAUSER@:@METADATAGROUP@
"${_DOM_METADATA_BACKUP_DIR}" > /dev/null 2>&1
}
-_mk_core_path() {
- local core_path=/var/log/core
- if ! [ -d "${core_path}" ]; then
- @MKDIR_P@ "${core_path}" > /dev/null 2>&1
- fi
- "@CHMOD_PATH@" a+tw "${core_path}" > /dev/null 2>&1
-}
-
_mk_run_path() {
local run_path
@@ -133,7 +125,6 @@
task_mkdirs(){
_mk_data_center
- _mk_core_path
_mk_dom_backup
_mk_run_path
"@CHMOD_PATH@" 1777 /dev/shm
diff --git a/vdsm.spec.in b/vdsm.spec.in
index 7ee0218..a63e415 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -590,6 +590,10 @@
install -Dm 0644 vdsm/limits.conf \
%{buildroot}/etc/security/limits.d/99-vdsm.conf
+# This is not commonplace, but we want /var/log/core to be a world-writable
+# dropbox for core dumps
+install -dDm 1777 %{buildroot}%{_localstatedir}/log/core
+
%if 0%{?with_systemd}
install -Dm 0755 init/systemd/systemd-vdsmd %{buildroot}/lib/systemd/systemd-vdsmd
install -Dm 0644 init/systemd/vdsmd.service %{buildroot}%{_unitdir}/vdsmd.service
@@ -615,10 +619,6 @@
%endif
%if 0%{?rhel}
-# This is not commonplace, but we want /var/log/core to be a world-writable
-# dropbox for core dumps
-install -dDm 1777 %{buildroot}%{_localstatedir}/log/core
-%else
# Install the configuration sample
install -Dm 0644 lib/vdsm/vdsm.conf.sample \
%{buildroot}%{_sysconfdir}/vdsm/vdsm.conf
--
To view, visit
http://gerrit.ovirt.org/22211
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id7246b4947c0cdb52093c5fe0f60a690d72b1236
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: mooli tayer <mtayer(a)redhat.com>