Re: [lxc-users] why does ssh + lxc hang? (used to work)
This is https://github.com/lxc/lxd/issues/5519 On Sun, Feb 24, 2019 at 1:34 PM Tomasz Chmielewski wrote: > > This works (executed on a host): > > host# lxc exec container -- date > Sun Feb 24 12:25:21 UTC 2019 > host# > > This however hangs and doesn't return (executed from a remote system, > i.e. your laptop or a different server): > > laptop$ ssh root@host "export PATH=$PATH:/snap/bin ; lxc exec container > -- date" > Sun Feb 24 12:28:04 UTC 2019 > (...command does not return...) > > Or a direct path to lxc binary - also hangs: > > laptop$ ssh root@host "/snap/bin/lxc exec container -- date" > Sun Feb 24 12:29:54 UTC 2019 > (...command does not return...) > > > Of course a simple "date" execution via ssh on the host does not hang: > > laptop$ ssh root@host date > Sun Feb 24 12:31:33 UTC 2019 > laptop$ > > > Why do commands executed via ssh and lxc hang? It used to work some 1-2 > months ago, not sure with which lxd version it regressed like this. > > > Tomasz Chmielewski > ___ > lxc-users mailing list > lxc-users@lists.linuxcontainers.org > http://lists.linuxcontainers.org/listinfo/lxc-users -- Stéphane ___ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users
Re: [lxc-users] why does ssh + lxc hang? (used to work)
Yes, these parameters passed to lxc command don't really help. "ssh -t" makes "lxc exec" return after executing the command. Though I'd be interested to understand why it suddenly started to happen; have a number of scripts which broke because of this change. Tomasz Chmielewski https://lxadm.com On 2019-02-25 00:39, Kees Bos wrote: Did you try '-T, --force-noninteractive' ? (Disable pseudo-terminal allocation) i.e. laptop$ ssh root@host "/snap/bin/lxc exec container -T -- date" On Sun, 2019-02-24 at 21:33 +0900, Tomasz Chmielewski wrote: This works (executed on a host): host# lxc exec container -- date Sun Feb 24 12:25:21 UTC 2019 host# This however hangs and doesn't return (executed from a remote system, i.e. your laptop or a different server): laptop$ ssh root@host "export PATH=$PATH:/snap/bin ; lxc exec container -- date" Sun Feb 24 12:28:04 UTC 2019 (...command does not return...) Or a direct path to lxc binary - also hangs: laptop$ ssh root@host "/snap/bin/lxc exec container -- date" Sun Feb 24 12:29:54 UTC 2019 (...command does not return...) Of course a simple "date" execution via ssh on the host does not hang: laptop$ ssh root@host date Sun Feb 24 12:31:33 UTC 2019 laptop$ Why do commands executed via ssh and lxc hang? It used to work some 1-2 months ago, not sure with which lxd version it regressed like this. Tomasz Chmielewski ___ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users ___ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users ___ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users
Re: [lxc-users] why does ssh + lxc hang? (used to work)
Did you try '-T, --force-noninteractive' ? (Disable pseudo-terminal allocation) i.e. laptop$ ssh root@host "/snap/bin/lxc exec container -T -- date" On Sun, 2019-02-24 at 21:33 +0900, Tomasz Chmielewski wrote: > This works (executed on a host): > > host# lxc exec container -- date > Sun Feb 24 12:25:21 UTC 2019 > host# > > This however hangs and doesn't return (executed from a remote > system, > i.e. your laptop or a different server): > > laptop$ ssh root@host "export PATH=$PATH:/snap/bin ; lxc exec > container > -- date" > Sun Feb 24 12:28:04 UTC 2019 > (...command does not return...) > > Or a direct path to lxc binary - also hangs: > > laptop$ ssh root@host "/snap/bin/lxc exec container -- date" > Sun Feb 24 12:29:54 UTC 2019 > (...command does not return...) > > > Of course a simple "date" execution via ssh on the host does not > hang: > > laptop$ ssh root@host date > Sun Feb 24 12:31:33 UTC 2019 > laptop$ > > > Why do commands executed via ssh and lxc hang? It used to work some > 1-2 > months ago, not sure with which lxd version it regressed like this. > > > Tomasz Chmielewski > ___ > lxc-users mailing list > lxc-users@lists.linuxcontainers.org > http://lists.linuxcontainers.org/listinfo/lxc-users ___ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users
[lxc-users] why does ssh + lxc hang? (used to work)
This works (executed on a host): host# lxc exec container -- date Sun Feb 24 12:25:21 UTC 2019 host# This however hangs and doesn't return (executed from a remote system, i.e. your laptop or a different server): laptop$ ssh root@host "export PATH=$PATH:/snap/bin ; lxc exec container -- date" Sun Feb 24 12:28:04 UTC 2019 (...command does not return...) Or a direct path to lxc binary - also hangs: laptop$ ssh root@host "/snap/bin/lxc exec container -- date" Sun Feb 24 12:29:54 UTC 2019 (...command does not return...) Of course a simple "date" execution via ssh on the host does not hang: laptop$ ssh root@host date Sun Feb 24 12:31:33 UTC 2019 laptop$ Why do commands executed via ssh and lxc hang? It used to work some 1-2 months ago, not sure with which lxd version it regressed like this. Tomasz Chmielewski ___ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users