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

SystemV service template does not actually generate any logs #1021

Closed
timcharper opened this issue Aug 28, 2017 · 3 comments
Closed

SystemV service template does not actually generate any logs #1021

timcharper opened this issue Aug 28, 2017 · 3 comments
Labels

Comments

@timcharper
Copy link
Contributor

Expected behaviour

Logs should be generated to the specified file when daemonStdoutLogFile := Some("appname") is provided

Actual behaviour

The file is not created and all process output is discarded.

Information

  • What sbt-native-packager are you using: 1.2.2
  • What sbt version: 0.13.x
  • What is your build system (e.g. Ubuntu, MacOS, Windows, Debian ): Debian
  • What package are you building (e.g. docker, rpm, ...): Deb
  • What version has your build tool (find out with e.g. rpm --version): Using JDebPackaging
  • What is your target system (e.g. Ubuntu 16.04, CentOS 7): Debian Jessie with SystemV
@timcharper
Copy link
Contributor Author

timcharper commented Aug 28, 2017

I wonder if the assumption is flawed in that redirects are assumed to be specifiable via an environment variable:

For example, the below program does not output to greetings.txt, is simply outputs hello >> greetings.txt

#!/bin/sh
args=">> greetings.txt"
echo hello $args

@timcharper
Copy link
Contributor Author

I can provide a repro case, if helpful. Getting a SystemV OS with OpenJDK 8 is a bit of a feat, I am not sure the best way to write an integration test for this.

timcharper added a commit to timcharper/sbt-native-packager that referenced this issue Aug 28, 2017
The current implementation has no effect; nothing is logged. '>>' seems
to be passed to the process as a parameter and not something that is
interpretted by the shell.

This approach is in line with the accepted solution suggested at
https://stackoverflow.com/a/21029952/183863

Fixes sbt#1021
@muuki88 muuki88 added the debian label Nov 1, 2017
@muuki88
Copy link
Contributor

muuki88 commented Nov 1, 2017

Sorry for the late reply here as well 😢 and thanks for the pull request.
Integration tests are really hard for these ones and SystemV is really messy, so
I'm fine with releasing your change and see if others have issues with the new
way of starting the service. Thanks for the detailed commit message with the
related SO question 😍

@muuki88 muuki88 closed this as completed in 7bb9504 Feb 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants