Douglas Schilling Landgraf has uploaded a new change for review. Change subject: pre-start: touch/configure vdsm logs ......................................................................
pre-start: touch/configure vdsm logs During pre-start of vdsm we must create vdsm logs files with proper perms/user/group/ if they doesn't exist. Change-Id: I6ca927cb447eeb24195cff6a1174e0f9a7295214 Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1055153 Signed-off-by: Douglas Schilling Landgraf <[email protected]> --- M init/vdsmd_init_common.sh.in 1 file changed, 24 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/12/25912/1 diff --git a/init/vdsmd_init_common.sh.in b/init/vdsmd_init_common.sh.in index 7f5652e..50d2359 100644 --- a/init/vdsmd_init_common.sh.in +++ b/init/vdsmd_init_common.sh.in @@ -32,6 +32,29 @@ fi } +task_configure_vdsm_logs() { + local vdsm_logs=( + "@VDSMLOGDIR@/metadata.log" \ + "@VDSMLOGDIR@/mom.log" \ + "@VDSMLOGDIR@/vdsm.log" + ) + + for logfile in "${vdsm_logs[@]}" + do + if [ ! -f "${logfile}" ]; then + touch ${logfile} + chmod 0644 ${logfile} + chown @VDSMUSER@:@VDSMGROUP ${logfile} + fi + done + + if [ ! -f @VDSMLOGDIR@/supervdsm.log ]; then + touch @VDSMLOGDIR@/supervdsm.log + chmod 0644 @VDSMLOGDIR@/supervdsm.log + chown root:root @VDSMLOGDIR@/supervdsm.log + fi +} + task_run_init_hooks(){ "@PYTHON@" "@VDSMDIR@/hooks.pyc" before_vdsm_start } @@ -221,6 +244,7 @@ run_tasks " \ mkdirs \ configure_coredump \ + configure_vdsm_logs \ run_init_hooks \ gencerts \ check_is_configured \ -- To view, visit http://gerrit.ovirt.org/25912 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6ca927cb447eeb24195cff6a1174e0f9a7295214 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Douglas Schilling Landgraf <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
