Uploaded image for project: ' AGL Development'
  1. AGL Development
  2. SPEC-4112

Improve weston's systemd service file

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • Marlin 13.0.0
    • None
    • None

      A while back I've noticed that we're not really capturing all the output to compositor.log file.

      The original unit contains:

      [Unit]
      Description=Weston Wayland Compositor
      RequiresMountsFor=/run
      Conflicts=plymouth-quit.service
      After=systemd-user-sessions.service plymouth-quit-wait.service
      
      [Service]
      User=%i
      PAMName=login
      EnvironmentFile=-/etc/default/weston
      StandardError=journal
      PermissionsStartOnly=true
      IgnoreSIGPIPE=no
      
      ExecStart=/usr/bin/weston-start -v -e -- $OPTARGS
      

      With the drop-in containing:

      [Service]
      Type=notify
      Environment="XDG_RUNTIME_DIR=/run/platform/display"
      # Note that clearing PAMName (thus not having PAMName=login) disables
      # logind support for the session, which allows setting XDG_RUNTIME_DIR
      # to something other than /run/user/% (as is done above).
      # Without systemd-logind support, weston needs to be patched to allow
      # its direct launcher to work for non-root users in this scenario.
      PAMName=
      ExecStart=
      ExecStart=/usr/bin/agl-compositor --config /etc/xdg/weston/weston.ini --idle-time=0  --tty=7  --log=/run/platform/display/compositor.log  --debug 
      SmackProcessLabel=System::Weston
      
      • Should we modify the original weston@service, which I suppose comes from poky, to contain StandardOutput=journal and we remove --log=/run/platform/display/compositor.log from the drop-in?
      • Should we append StandardOutput=journalctl in our drop-in and remove --log=/run/platform/display/compositor.log?

      The log option is at this point not able to capture stderr hence the StandardError=journal while keeping --log to a file. I believe it would be worthwhile to keep everything in one place, meaning the journal. Been having some talks at this point to see if it makes sense to route also stderr to the file, but nothing conclusive at this point. 

      Secondly, recently been playing with running weston as a service, which uses systemd-logind, but haven't really tried in SMACK context. Maybe we should just defer this until we're done with the AppFW changes.

      Thoughts?

      /cc scottm jsmoeller

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            mvlad Marius Vlad
            mvlad Marius Vlad
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: