Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

defaultLinuxLogsLocation not applied to start-rpm-template #675

Merged
merged 1 commit into from
Oct 7, 2015

Conversation

louisq
Copy link
Contributor

@louisq louisq commented Oct 2, 2015

Where an application is installed using an RPM and the defaultLinuxLogsLocation is set the rpm would correctly create the logging folders for the application at the new location. Unfortunately the daemon would still try to log in the default location which was hard coded which resulted in the daemon failing.

[louisq@localhost APPNAME]$ sudo rpm -Uvh target/rpm/RPMS/noarch/APPNAME-45-0.noarch.rpm 
[sudo] password for louisq: 
Preparing...                ########################################### [100%]
Creating system group: APPNAME
Creating system user: APPNAME in APPNAME with APPNAME user-daemon and shell /bin/false
   1:APPNAME                   ########################################### [100%]
Adding APPNAME to autostart using chkconfig
Starting APPNAME: [  OK  ]
bash: /var/log/APPNAME/daemon.log: No such file or directory

This change removes the hard coding from the logging in the start-rpm-template to instead use the value which originates from the LinuxPlugin. If the value is overridden the daemon will now log to the specified location.

An RPM built with those changes was run on a centos 6.7 machine and the universal/* and rpm/* tests were all run successfully

@muuki88
Copy link
Contributor

muuki88 commented Oct 2, 2015

LGTM. Can you add a regression test for this? Here is a small developer guide on how to run the tests. if you need any help, just ping here.

@louisq
Copy link
Contributor Author

louisq commented Oct 3, 2015

Thank you. Will do that tomorrow when I come back from an obligation that I have

@louisq
Copy link
Contributor Author

louisq commented Oct 6, 2015

Thank you for the link to the guide.
Added additional test that validates that the defaultLinuxLogLocation overrides the value in the init.d file generated with the rpm. Also added coverage for the defaultLinuxInstallLocation which can also be overridden in this file. Is there something else that you would like to see?

@muuki88
Copy link
Contributor

muuki88 commented Oct 6, 2015

Awesome. Can you squash the commits into one? Then this is ready to merge :)

…defaultLinuxLogsLocation is overridden the deamon log will be assigned to this overridden location. This was causing an issue given that the rpm would create the log location at the new location, but the daemon was still logging in the default location which was not created by the rpm. Tested on CENTOS 6.7

Added test coverage for defaultLinuxInstallLocation and defaultLinuxLogsLocation for init.d files generated upon creation of rpm
@louisq
Copy link
Contributor Author

louisq commented Oct 6, 2015

Completed the rebase of the branch

muuki88 added a commit that referenced this pull request Oct 7, 2015
defaultLinuxLogsLocation not applied to start-rpm-template
@muuki88 muuki88 merged commit 14229a8 into sbt:master Oct 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants