<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p>I also found that when i start <br>
    </p>
    <p>docker run --rm -it  --security-opt=seccomp:unconfined --cap-add
      SYS_ADMIN --cap-add MKNOD  -v /sys/fs/cgroup:/sys/fs/cgroup:ro  
      fedora-25-image
        bash</p>
    <p>and then run the systemd (so that it is not pid 1)<br>
    </p>
    <p>/lib/systemd/systemd --system --show-status=true
      --log-level=debug<br>
    </p>
    ==> then systemd starts normally (as pid 2) and the /dev/console
    node is _not_ deleted and it works as expected!<br>
    <br>
    So still puzzled what is happening, then run this as described
    below.<br>
    <br>
    docker --version<br>
    Docker version 1.12.1, build 23cf638<br>
    cat /proc/version<br>
    Linux version 4.7.3-200.fc24.x86_64
    (<a class="moz-txt-link-abbreviated" href="mailto:mockbuild@bkernel01.phx2.fedoraproject.org">mockbuild@bkernel01.phx2.fedoraproject.org</a>) (gcc version 6.1.1
    20160621 (Red Hat 6.1.1-3) (GCC) ) #1 SMP Wed Sep 7 17:31:21 UTC
    2016<br>
    <br>
    <br>
    <br>
    <div class="moz-cite-prefix">Am 18.09.2016 um 14:30 schrieb
      <a class="moz-txt-link-abbreviated" href="mailto:baldur@email.de">baldur@email.de</a>:<br>
    </div>
    <blockquote cite="mid:d307189b-927c-3ada-ec84-7e0d3237058c@web.de"
      type="cite">
      <meta http-equiv="Context-Type" content="text/html; charset=utf-8">
      <p>Hello,</p>
      <p>i hope this is the right list to ask this, if not it would be
        kind if you would point me to the right forum. Currently i have
        systemd running in a docker container, which works well in
        version 229  (fedora 24 image).  I have configured journald
        there to log to console, so that i can see the logs via a simple
        docker logs -f <containername>. Everything works fine with
        this. <br>
      </p>
      <p>Recently i decided to to to run systemd 231 on fedora 25 beta
        and rebuild my Dockerfile for fedora 25. After starting the
        container it turned out that nothing was shown in docker logs -f
        <containername > and after some investigation, that
        journald was terribly slow with logging. After some strace
        sessions in the container i found that writing to /dev/console
        was failing with "EIO" (-1).   So i did another test if this was
        docker problem and run simply a bash shell with the container.
        To my surprise this worked fine.</p>
      <p>With a "docker exec run -it fedora-25-image bash"  i could
        write to console without any problems, when i did run a 'echo
        "Hello world" >/dev/console" in the container. So i came to
        the conclusion that the problem lies within systemd 231 and not
        withing Docker, as this worked fine for fedora-24 based systemd
        229 and also the simple bash test.</p>
      <p>At this point i investiged what was the difference.  Basically
        it turned out that on bash (and also on systemd 229 on fedora
        24) the is shown when i do a <br>
      </p>
      <p>cat /proc/1/mountinfo |grep console   ( /33 varies if you run
        more than one container)<br>
      </p>
      2769 2749 0:20 /33 /dev/console rw,nosuid,noexec,relatime - devpts
      devpts rw,gid=5,mode=620,ptmxmode=0<br>
      <br>
      when i do this with a fedora 25 image, where systemd is started as
      process 1 i get  for<br>
      <br>
      cat /proc/1/mountinfo |grep console  <br>
      2769 2749 0:20 <b>/33//deleted </b>/dev/console
      rw,nosuid,noexec,relatime - devpts devpts
      rw,gid=5,mode=620,ptmxmode=000<br>
      <br>
      <br>
      It seems that systemd somehow has deleted the /dev/console device,
      and therefore a journald which wants to log to /dev/console in the
      container gets an EIO  .  <br>
      <br>
      <br>
      In general i have started the systemd runs with the following
      options (24 or 25) <br>
      docker run --rm -it  --security-opt=seccomp:unconfined --cap-add
      SYS_ADMIN -v /sys/fs/cgroup:/sys/fs/cgroup:ro  fedora-25-image
      /lib/systemd/systemd<br>
      <br>
      <br>
      My question is now is this a bug, or is this some kind of new
      feature, where i need to set a special flag in systemd 231  (which
      one?) <br>
      <br>
      <br>
      Hope the description was sufficient.<br>
      <br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
systemd-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:systemd-devel@lists.freedesktop.org">systemd-devel@lists.freedesktop.org</a>
<a class="moz-txt-link-freetext" href="https://lists.freedesktop.org/mailman/listinfo/systemd-devel">https://lists.freedesktop.org/mailman/listinfo/systemd-devel</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>