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

fix journalctl --since #865

wants to merge 1 commit into
base: stretch-unstable


Copy link

yalh76 commented Dec 30, 2019

The problem

Difficult to explain, as it's more sensations and difficult to reproduce...

Sometime you try to install a package and even if the service is started and the line_match can be found in journalctl, ynh_systemd_action doesn't detect it.

Same during package_check with services fail to starts but start during manual installation


Diving in ynh_systemd_action and in journalctl arguments. It seems that --since=-0 is documented nowhere

PR Status


How to test

Make some install and check what happens :/


  • Principle agreement 0/2 :
  • Quick review 0/1 :
  • Simple test 0/1 :
  • Deep review 0/1 :

This comment has been minimized.

Copy link

Josue-T commented Dec 31, 2019


I also detected sometime that this helper is sometime a little bit buggy. Mainly with gitea so without systemd.

Did you see that your patch fix your issue ?


This comment has been minimized.

Copy link

maniackcrudelis commented Dec 31, 2019

--since=-0 is since minus 0 seconds.
Just tried the command, it works the exact same way with -0 and now

Are you sure that's the issue you had ?


This comment has been minimized.

Copy link
Contributor Author

yalh76 commented Dec 31, 2019

I'm like 95% of the issue I had but no proof, no logs, no screenshot, nothing....

I can just tell the conditions...

I was working on YunoHost-Apps/distbin_ynh#52 => applying last example_ynh on distbin_ynh

As I worked like a barbarian, change_url script wasn't working.... And as I didn't took time to read all logs, I decided to test manually change_url on distbin_ynh

I applied a snapshot and started a virtual machine, launch three ssh windows with a command for each one:

  1. $ yunohost app install distbin --debug
  2. $ journalctl -u distbin -fe
  3. $ journalctl -u nginx-fe

like that:

At the end of the install, ynh_systemd_action was waiting distbin service start... but in the $ journalctl -u distbin -fe windows I seen that the disbin service was really started. So I launch a fourth ssh to execute $ service distbin restart and the package installation ended well.

I have seen that a few times on different packages but wasn't able to reproduce systematically...

I will try to make additional tests. and let you know.


This comment has been minimized.

Copy link

maniackcrudelis commented Dec 31, 2019

The thing is, using --since=-0 as well as --since="now" will just start to follow the log with no lines before.

The behavior is the same, as said before, between now and 0s before now.
So I really think the problem is elsewhere.

You should probably try to follow $templog as well in a separate terminal to see if the helper really miss something.

Also, instead of a sleep 60, you can use the timeout option of ynh_systemd_action.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
3 participants
You can’t perform that action at this time.