This repository was archived by the owner on Dec 7, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 230
This repository was archived by the owner on Dec 7, 2023. It is now read-only.
Feature: Consume piped content when --interactive
#558
Copy link
Copy link
Closed
Description
Perhaps I've missed some Ignite-fu:
When using containers its common to find variations on this pattern in use:
echo piped content | docker run -i ubuntu:18.04 cat -
In Ignite (with autologin configured):
$ echo param here | sudo ignite start podman --interactive
INFO[0001] Networking is handled by "cni"
INFO[0001] Started Firecracker VM "66b3b12ddabee624" in a container with ID "ignite-66b3b12ddabee624"
66b3b12ddabee624
panic: provided file is not a console
goroutine 1 [running]:
github.com/containerd/console.Current(...)
/go/src/github.com/weaveworks/ignite/vendor/github.com/containerd/console/console.go:67
github.com/weaveworks/ignite/pkg/runtime/containerd.(*ctdClient).AttachContainer(0xc0001e3bc0, 0xc000039480, 0x17, 0x0, 0x0)
/go/src/github.com/weaveworks/ignite/pkg/runtime/containerd/client.go:318 +0xa01
github.com/weaveworks/ignite/cmd/ignite/run.Attach(0xc000081be0, 0xc0004b9c00, 0x0)
/go/src/github.com/weaveworks/ignite/cmd/ignite/run/attach.go:34 +0x1c0
github.com/weaveworks/ignite/cmd/ignite/run.Start(0xc0000407f0, 0x7ffd1d8f3808, 0x6)
/go/src/github.com/weaveworks/ignite/cmd/ignite/run/start.go:64 +0x2a1
github.com/weaveworks/ignite/cmd/ignite/cmd/vmcmd.NewCmdStart.func1.1(0xc0001e3260, 0xc0001e3540, 0x1, 0x2, 0x0, 0x0)
/go/src/github.com/weaveworks/ignite/cmd/ignite/cmd/vmcmd/start.go:33 +0x80
github.com/weaveworks/ignite/cmd/ignite/cmd/vmcmd.NewCmdStart.func1(0xc00033cc80, 0xc0001e3540, 0x1, 0x2)
/go/src/github.com/weaveworks/ignite/cmd/ignite/cmd/vmcmd/start.go:34 +0x48
github.com/spf13/cobra.(*Command).execute(0xc00033cc80, 0xc0001e34e0, 0x2, 0x2, 0xc00033cc80, 0xc0001e34e0)
/go/src/github.com/weaveworks/ignite/vendor/github.com/spf13/cobra/command.go:830 +0x2ae
github.com/spf13/cobra.(*Command).ExecuteC(0xc0002c9b80, 0xc000096000, 0x12a5420, 0xc000096008)
/go/src/github.com/weaveworks/ignite/vendor/github.com/spf13/cobra/command.go:914 +0x2fc
github.com/spf13/cobra.(*Command).Execute(...)
/go/src/github.com/weaveworks/ignite/vendor/github.com/spf13/cobra/command.go:864
main.Run(0xc0004b9f88, 0xc00007e058)
/go/src/github.com/weaveworks/ignite/cmd/ignite/ignite.go:24 +0xb5
main.main()
/go/src/github.com/weaveworks/ignite/cmd/ignite/ignite.go:13 +0x22
Note in the above example /root/.profile
contains:
if [ "$(tty)" == "/dev/ttyS0" ]; then
echo 'Execute when login via ttyS0'
cat -
fi
Metadata
Metadata
Assignees
Labels
No labels