Sandro Bonazzola has uploaded a new change for review. Change subject: packaging: setup: produce setup logs at /var/log ......................................................................
packaging: setup: produce setup logs at /var/log although setup logs are not of daemon, they used to be stored at /var/log for future reference. The location of the logs is set to /var/log/ovirt-hosted-engine-setup/ Change-Id: Ic2fb666354bcf28b0d5b2b2cce0494b575b4461b Signed-off-by: Sandro Bonazzola <[email protected]> --- M ovirt-hosted-engine-setup.spec.in M src/bin/Makefile.am M src/ovirt_hosted_engine_setup/Makefile.am M src/ovirt_hosted_engine_setup/config.py.in M src/ovirt_hosted_engine_setup/constants.py M src/plugins/ovirt-hosted-engine-setup/core/misc.py 6 files changed, 15 insertions(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-hosted-engine-setup refs/changes/71/17871/1 diff --git a/ovirt-hosted-engine-setup.spec.in b/ovirt-hosted-engine-setup.spec.in index f602c42..ff36e25 100644 --- a/ovirt-hosted-engine-setup.spec.in +++ b/ovirt-hosted-engine-setup.spec.in @@ -81,6 +81,7 @@ %doc README %dir %{_sysconfdir}/ovirt-hosted-engine-setup.env.d %dir %{_sysconfdir}/ovirt-hosted-engine +%dir %{_localstatedir}/log/ovirt-hosted-engine-setup %{_sbindir}/hosted-engine %{_sbindir}/%{name} %{python_sitelib}/ovirt_hosted_engine_setup/ diff --git a/src/bin/Makefile.am b/src/bin/Makefile.am index 3d547ed..2b84a11 100644 --- a/src/bin/Makefile.am +++ b/src/bin/Makefile.am @@ -49,6 +49,7 @@ install-data-local: $(MKDIR_P) $(DESTDIR)/$(sysconfdir)/ovirt-hosted-engine-setup.env.d $(MKDIR_P) $(DESTDIR)/$(sysconfdir)/ovirt-hosted-engine + $(MKDIR_P) $(DESTDIR)/$(localstatedir)/log/ovirt-hosted-engine-setup install-exec-local: ovirt-hosted-engine-setup $(MKDIR_P) $(DESTDIR)/$(sbindir) diff --git a/src/ovirt_hosted_engine_setup/Makefile.am b/src/ovirt_hosted_engine_setup/Makefile.am index 2bef5b8..b523009 100644 --- a/src/ovirt_hosted_engine_setup/Makefile.am +++ b/src/ovirt_hosted_engine_setup/Makefile.am @@ -49,10 +49,11 @@ $(NULL) config.py: config.py.in - sed \ + $(SED) \ -e 's|@sysconfdir[@]|$(sysconfdir)|g' \ -e 's|@datadir[@]|$(datadir)|g' \ -e 's|@prefix[@]|$(prefix)|g' \ + -e 's|@localstatedir[@]|$(localstatedir)|g' \ -e 's|@PACKAGE_NAME[@]|$(PACKAGE_NAME)|g' \ -e 's|@PACKAGE_VERSION[@]|$(PACKAGE_VERSION)|g' < $< > $@ diff --git a/src/ovirt_hosted_engine_setup/config.py.in b/src/ovirt_hosted_engine_setup/config.py.in index ef59b00..028ab7e 100644 --- a/src/ovirt_hosted_engine_setup/config.py.in +++ b/src/ovirt_hosted_engine_setup/config.py.in @@ -25,6 +25,7 @@ PACKAGE_VERSION = '@PACKAGE_VERSION@' SYSCONFDIR = '@sysconfdir@' DATADIR = '@datadir@' +LOCALSTATEDIR = '@localstatedir@' # vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/ovirt_hosted_engine_setup/constants.py b/src/ovirt_hosted_engine_setup/constants.py index e67b601..15ab284 100644 --- a/src/ovirt_hosted_engine_setup/constants.py +++ b/src/ovirt_hosted_engine_setup/constants.py @@ -71,6 +71,12 @@ SD_METADATA_DIR_NAME = 'ha_agent' OVIRT_HOSTED_ENGINE = 'ovirt-hosted-engine' OVIRT_HOSTED_ENGINE_SETUP = 'ovirt-hosted-engine-setup' + OVIRT_HOSTED_ENGINE_SETUP_LOGDIR = os.path.join( + config.LOCALSTATEDIR, + 'log', + OVIRT_HOSTED_ENGINE_SETUP, + ) + VDS_CLIENT_DIR = os.path.join( DATADIR, 'vdsm', diff --git a/src/plugins/ovirt-hosted-engine-setup/core/misc.py b/src/plugins/ovirt-hosted-engine-setup/core/misc.py index 707229c..ab90a0e 100644 --- a/src/plugins/ovirt-hosted-engine-setup/core/misc.py +++ b/src/plugins/ovirt-hosted-engine-setup/core/misc.py @@ -59,6 +59,10 @@ ohostedcons.CoreEnv.DEPLOY_PROCEED, None ) + self.environment.setdefault( + otopicons.CoreEnv.LOG_DIR, + ohostedcons.FileLocations.OVIRT_HOSTED_ENGINE_SETUP_LOGDIR + ) @plugin.event( stage=plugin.Stages.STAGE_INIT, -- To view, visit http://gerrit.ovirt.org/17871 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic2fb666354bcf28b0d5b2b2cce0494b575b4461b Gerrit-PatchSet: 1 Gerrit-Project: ovirt-hosted-engine-setup Gerrit-Branch: master Gerrit-Owner: Sandro Bonazzola <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
