Uploaded image for project: 'Product Technical Learning'
  1. Product Technical Learning
  2. PTL-15612

DO188: ch02s09 - rootless containers use default target not multi-user - RHT2462462

XMLWordPrintable

    • False
    • Hide

      None

      Show
      None
    • False
    • 2
    • en-US (English)
    • Oct 2 - Oct 17

      URL: ch02s09
      Reporter RHNID: acancell
      Section title: Managing the Container Lifecycle
      Language: English

      Issue description

      There are several errors for quadlets:

      A)
      For rootless containers, since multi-user.target is not defined in the user mode in systemd (you can verify this by running the command systemctl --user status multi-user.target. It is only defined in the system mode systemctl status multi-user.target without --user). That is:
      system → use multi-user.target
      rootless/user → use default.target

       

      B)
      /run/containers/systemd/ and $XDG_RUNTIME_DIR/containers/systemd/ are the path where the auto generated {}.service{} is created.
      The correct path for {}.container{} is instead:

      • ~/.config/containers/systemd (must be created first)
      • /etc/containers/systemd

      C)
      With the auto-generated .service you can
      use systemctl start|stop|status .service
      but NOT systemctl enable .service , it will return "failed to enable unit: unit /run/user/1000/systemd/generator/example.service is transient or generated"; but doesn’t matter, since you already set WantedBy

       

              asernabo@redhat.com Alejandro Serna-Borja
              carias@redhat.com Carlos Arias
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: