[systemd-devel] Machinectl shell/login do not attach to console

arnaud gaboury arnaud.gaboury at gmail.com
Mon Oct 12 09:35:28 PDT 2015


On Mon, Oct 5, 2015 at 2:30 PM, Chris Bell <cwbell at narmos.org> wrote:
> Hi all,
>
> I have an Arch machine with systemd 226,
which arch version exactly? I had the same issue with 226. It is gone
with 226-3.
setup: Arch host running Fedora container.

running an Arch container, also
> with systemd 226. For whatever reason in 225, `machinectl login` stopped
> working correctly, and in 226 `machinectl login` does not work properly. It
> attaches to the machine, but does not seem to redirect stdin and stdout to
> the machine. When I attempt to use login, the login prompt is never printed
> to the command line:
>
> # machinectl login gitlab
> Connected to machine gitlab. Press ^] three times within 1s to exit session.
> <<Nothing happens, so I escape>>^]^]
> Connection to machine gitlab terminated.
>
> And nothing of note is printed in the journal (relevant date is Oct 5,
> machine was last started on Sep 28):
>
> # systemctl status systemd-nspawn at gitlab.service
>systemd-nspawn at gitlab.service - Container gitlab
>    Loaded: loaded (/usr/lib/systemd/system/systemd-nspawn at .service; enabled;
> vendor preset: disabled)
>   Drop-In: /etc/systemd/system/systemd-nspawn at gitlab.service.d
>            └─override.conf
>    Active: active (running) since Mon 2015-09-28 08:11:33 EDT; 1 weeks 0
> days ago
>      Docs: man:systemd-nspawn(1)
>  Main PID: 18746 (systemd-nspawn)
>    Status: "Container running."
>    Memory: 1010.7M
>       CPU: 37min 13.126s
>    CGroup: /machine.slice/systemd-nspawn at gitlab.service
>            ├─18746 /usr/bin/systemd-nspawn --quiet --keep-unit --boot
> --link-journal=try-guest --network-bridge=br0 --machine=gitlab
>            ├─init.scope
>            │ └─18753 /usr/lib/systemd/systemd
>            └─system.slice
>              ├─gitlab-sidekiq.service
>              │ ├─18886 sh -c sidekiq -q post_receive -q mailer -q
> system_hook -q project_web_hook -q gitlab_shell -q common -q default -q
> archive_repo -e production -L /var/log/gitlab/sidekiq.log >>
> /var/log/gitlab/sidekiq.log 2>&1
>              │ └─18904 sidekiq 3.3.0 gitlab [0 of 25 busy]
>              ├─dbus.service
>              │ └─18789 /usr/bin/dbus-daemon --system --address=systemd:
> --nofork --nopidfile --systemd-activation
>              ├─redis.service
>              │ └─18797 /usr/bin/redis-server 127.0.0.1:6379
>              ├─postfix.service
>              │ ├─18881 /usr/lib/postfix/bin/master -w
>              │ ├─18883 qmgr -l -t unix -u
>              │ └─25044 pickup -l -t unix -u
>              ├─systemd-journald.service
>              │ └─18772 /usr/lib/systemd/systemd-journald
>              ├─gitlab-unicorn.service
>              │ ├─18887 unicorn_rails master -c
> /usr/share/webapps/gitlab/config/unicorn.rb -E production
>              │ ├─25086 unicorn_rails worker[1] -c
> /usr/share/webapps/gitlab/config/unicorn.rb -E production
>              │ ├─25184 unicorn_rails worker[2] -c
> /usr/share/webapps/gitlab/config/unicorn.rb -E production
>              │ └─25355 unicorn_rails worker[0] -c
> /usr/share/webapps/gitlab/config/unicorn.rb -E production
>              ├─systemd-logind.service
>              │ └─18788 /usr/lib/systemd/systemd-logind
>              ├─postgresql.service
>              │ ├─18815 /usr/bin/postgres -D /var/lib/postgres/data
>              │ ├─18854 postgres: checkpointer process
>              │ ├─18855 postgres: writer process
>              │ ├─18856 postgres: wal writer process
>              │ ├─18857 postgres: autovacuum launcher process
>              │ ├─18858 postgres: stats collector process
>              │ ├─18945 postgres: gitlab_db gitlabhq_production [local] idle
>              │ ├─21179 postgres: gitlab_db gitlabhq_production [local] idle
>              │ ├─25090 postgres: gitlab_db gitlabhq_production [local] idle
>              │ ├─25366 postgres: gitlab_db gitlabhq_production [local] idle
>              │ └─25382 postgres: gitlab_db gitlabhq_production [local] idle
>              └─console-getty.service
>                └─19441 /sbin/agetty --noclear --keep-baud console 115200
> 38400 9600 vt220
>
> Sep 28 08:11:35 zombie.narmos.org systemd-nspawn[18746]: zombie login: [  OK
> ] Started PostgreSQL database server.
> Sep 28 08:11:35 zombie.narmos.org systemd-nspawn[18746]: [  OK  ] Started
> GitLab Sidekiq Worker.
> Sep 28 08:11:35 zombie.narmos.org systemd-nspawn[18746]: [  OK  ] Started
> GitLab Unicorn Server.
> Sep 28 08:11:35 zombie.narmos.org systemd-nspawn[18746]: [  OK  ] Reached
> target Multi-User System.
> Sep 28 08:11:36 zombie.narmos.org systemd-nspawn[18746]: Arch Linux
> 4.1.6-1-ARCH (console)
> Sep 28 08:12:38 zombie.narmos.org systemd-nspawn[18746]: gitlab login:
> Sep 28 08:12:38 zombie.narmos.org systemd-nspawn[18746]: Arch Linux
> 4.1.6-1-ARCH (console)
> Sep 28 08:12:38 zombie.narmos.org systemd-nspawn[18746]: gitlab login: The
> Zombie, brought to you by Arch Linux 4.1.6-1-ARCH (pts/0)
> Sep 28 08:12:55 zombie.narmos.org systemd-nspawn[18746]: zombie login:
> Sep 28 08:12:55 zombie.narmos.org systemd-nspawn[18746]: The Zombie, brought
> to you by Arch Linux 4.1.6-1-ARCH (pts/0)
>
> Note the login prompts as the last couple lines. This is interesting, too,
> as the guest is named gitlab, and the host is named zombie. Both login
> prompts somehow appear in the journal for the guest container.
>
> Machinectl shell produces the same immediate behavior, except now the end of
> the journal entry has:
>
> Oct 05 08:26:18 zombie.narmos.org systemd-nspawn[18746]: zombie login:
> Oct 05 08:26:18 zombie.narmos.org systemd-nspawn[18746]: The Zombie, brought
> to you by Arch Linux 4.1.6-1-ARCH (pts/0)
>
> Which is the hostname and /etc/issue of my HOST machine. So I can't even
> begin to guess what I've done to make it stop working and think it's an
> entirely different machine.
>
> The only way I can semi-manage this host now is to do a nasty chroot and
> pray everything goes as expected, I'd really like to fix the login and shell
> functionalities!
>
> I appreciate any help!!
>
> Regards,
> Chris
>
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel



-- 

google.com/+arnaudgabourygabx


More information about the systemd-devel mailing list