I think this is related to
https://github.com/systemd/systemd/issues/6680, specifically this
comment:

"hmm, so OnUnitActiveSec= operates relative to a unit becoming active,
but Type=oneshot service units actually never become active, unless you
combine them with RemainAfterExit=, hence the confusion...

Type=oneshot units after all do stuff during their start-up and when
that's complete they go down again, they never stay up continiously...
Hence, combining Type=oneshot with OnUnitActiveSec= can't really work...
This is a big underdocumented though"

Which seems relevant, since:

  $ cat /lib/systemd/system/motd-news.service
  [Unit]
  Description=Message of the Day
  After=network-online.target
  Documentation=man:update-motd(8)

  [Service]
  Type=oneshot
  ExecStart=/etc/update-motd.d/50-motd-news --force

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to base-files in Ubuntu.
https://bugs.launchpad.net/bugs/1829968

Title:
  motd [on at least some instances] does not auto-update daily

Status in base-files package in Ubuntu:
  New

Bug description:
  I have a VM running on AWS. It was launched on May 9th:

    $ uptime
     05:26:21 up 12 days,  6:34,  1 user,  load average: 0.00, 0.00, 0.00
    $ date
    Wed May 22 05:26:24 UTC 2019

  I touched none of the system defaults, and yet the motd has not
  updated automatically.

    $ ls -l /var/cache/motd-news
    -rw-r--r-- 1 root root 0 May  9 22:53 /var/cache/motd-news

  The systemd timer unit looks like this:

    $ systemctl status motd-news.timer 
    ● motd-news.timer - Message of the Day
       Loaded: loaded (/lib/systemd/system/motd-news.timer; enabled; vendor 
preset: enabled)
       Active: active (elapsed) since Thu 2019-05-09 22:51:58 UTC; 1 weeks 5 
days ago
      Trigger: n/a

    May 09 22:51:58 ip-172-31-23-224 systemd[1]: Started Message of the
  Day.

  If I run /etc/update-motd.d/50-motd-news --force manually, the file
  does update correctly.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/base-files/+bug/1829968/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to