* [bug#38720] [PATCH] system: linux-container: Recommend guix container
@ 2019-12-23 14:07 Efraim Flashner
2019-12-30 22:05 ` Ludovic Courtès
0 siblings, 1 reply; 5+ messages in thread
From: Efraim Flashner @ 2019-12-23 14:07 UTC (permalink / raw)
To: 38720
[-- Attachment #1.1: Type: text/plain, Size: 642 bytes --]
I've been using guix containers on foreign systems to bring some Guixy
goodness to the unwashed sysadmins out there. When the container starts
up it displays a message like "Run 'sudo nsenter -a -t 65698' to get a
shell into it." Sometimes when I try to do that I'll get an error
message back about the system's nsenter not knowing about the '-a' flag.
I have found that using a 'guix container' command works well for me.
--
Efraim Flashner <efraim@flashner.co.il> אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[-- Attachment #1.2: 0001-system-linux-container-Recommend-guix-container.patch --]
[-- Type: text/plain, Size: 1663 bytes --]
From f2cd59c9eb756e243a5a01e6cd3a6a6e58a02be6 Mon Sep 17 00:00:00 2001
From: Efraim Flashner <efraim@flashner.co.il>
Date: Mon, 23 Dec 2019 16:05:04 +0200
Subject: [PATCH] system: linux-container: Recommend guix container.
* gnu/system/linux-container.scm (container-script)[script]: Recommend
using 'guix container' to get a shell inside the running container.
---
gnu/system/linux-container.scm | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/gnu/system/linux-container.scm b/gnu/system/linux-container.scm
index 2ab679ff3f..7d9e02b945 100644
--- a/gnu/system/linux-container.scm
+++ b/gnu/system/linux-container.scm
@@ -2,6 +2,7 @@
;;; Copyright © 2015 David Thompson <davet@gnu.org>
;;; Copyright © 2016, 2017, 2019 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2019 Arun Isaac <arunisaac@systemreboot.net>
+;;; Copyright © 2019 Efraim Flashner <efraim@flashner.co.il>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -195,9 +196,7 @@ that will be shared with the host system."
;; XXX: We can't quite call 'bindtextdomain' so there's actually
;; no i18n.
(info (G_ "system container is running as PID ~a~%") pid)
- ;; XXX: Should we recommend 'guix container exec'? It's more
- ;; verbose and doesn't bring much.
- (info (G_ "Run 'sudo nsenter -a -t ~a' to get a shell into it.~%")
+ (info (G_ "Run 'sudo guix container exec ~a /run/current-system/profile/bin/bash --login' to get a shell into it.~%")
pid)
(newline (guix-warning-port)))
--
2.24.1
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [bug#38720] [PATCH] system: linux-container: Recommend guix container
2019-12-23 14:07 [bug#38720] [PATCH] system: linux-container: Recommend guix container Efraim Flashner
@ 2019-12-30 22:05 ` Ludovic Courtès
2020-01-05 18:27 ` Efraim Flashner
0 siblings, 1 reply; 5+ messages in thread
From: Ludovic Courtès @ 2019-12-30 22:05 UTC (permalink / raw)
To: Efraim Flashner; +Cc: 38720
Hi!
Efraim Flashner <efraim@flashner.co.il> skribis:
> I've been using guix containers on foreign systems to bring some Guixy
> goodness to the unwashed sysadmins out there. When the container starts
> up it displays a message like "Run 'sudo nsenter -a -t 65698' to get a
> shell into it." Sometimes when I try to do that I'll get an error
> message back about the system's nsenter not knowing about the '-a' flag.
> I have found that using a 'guix container' command works well for me.
Oh. I was conservative and thought that people would rather use
“standard” tools.
> From f2cd59c9eb756e243a5a01e6cd3a6a6e58a02be6 Mon Sep 17 00:00:00 2001
> From: Efraim Flashner <efraim@flashner.co.il>
> Date: Mon, 23 Dec 2019 16:05:04 +0200
> Subject: [PATCH] system: linux-container: Recommend guix container.
>
> * gnu/system/linux-container.scm (container-script)[script]: Recommend
> using 'guix container' to get a shell inside the running container.
[...]
> - ;; XXX: Should we recommend 'guix container exec'? It's more
> - ;; verbose and doesn't bring much.
> - (info (G_ "Run 'sudo nsenter -a -t ~a' to get a shell into it.~%")
> + (info (G_ "Run 'sudo guix container exec ~a /run/current-system/profile/bin/bash --login' to get a shell into it.~%")
> pid)
The comment is still correct: “guix container exec” is more verbose.
:-)
Should we change it so that “guix container exec PID” without additional
arguments runs /bin/sh by default, or something like that?
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [bug#38720] [PATCH] system: linux-container: Recommend guix container
2019-12-30 22:05 ` Ludovic Courtès
@ 2020-01-05 18:27 ` Efraim Flashner
2020-01-06 9:56 ` Ludovic Courtès
0 siblings, 1 reply; 5+ messages in thread
From: Efraim Flashner @ 2020-01-05 18:27 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 38720
[-- Attachment #1.1: Type: text/plain, Size: 2731 bytes --]
On Mon, Dec 30, 2019 at 11:05:02PM +0100, Ludovic Courtès wrote:
> Hi!
>
> Efraim Flashner <efraim@flashner.co.il> skribis:
>
> > I've been using guix containers on foreign systems to bring some Guixy
> > goodness to the unwashed sysadmins out there. When the container starts
> > up it displays a message like "Run 'sudo nsenter -a -t 65698' to get a
> > shell into it." Sometimes when I try to do that I'll get an error
> > message back about the system's nsenter not knowing about the '-a' flag.
> > I have found that using a 'guix container' command works well for me.
>
> Oh. I was conservative and thought that people would rather use
> “standard” tools.
>
> > From f2cd59c9eb756e243a5a01e6cd3a6a6e58a02be6 Mon Sep 17 00:00:00 2001
> > From: Efraim Flashner <efraim@flashner.co.il>
> > Date: Mon, 23 Dec 2019 16:05:04 +0200
> > Subject: [PATCH] system: linux-container: Recommend guix container.
> >
> > * gnu/system/linux-container.scm (container-script)[script]: Recommend
> > using 'guix container' to get a shell inside the running container.
>
> [...]
>
> > - ;; XXX: Should we recommend 'guix container exec'? It's more
> > - ;; verbose and doesn't bring much.
> > - (info (G_ "Run 'sudo nsenter -a -t ~a' to get a shell into it.~%")
> > + (info (G_ "Run 'sudo guix container exec ~a /run/current-system/profile/bin/bash --login' to get a shell into it.~%")
> > pid)
>
> The comment is still correct: “guix container exec” is more verbose.
> :-)
I can update the comment :)
> Should we change it so that “guix container exec PID” without additional
> arguments runs /bin/sh by default, or something like that?
I've never really used docker, but I'm pretty sure when you enter a
docker container you also need to give it the path to a binary you want
to run.
I've thought about it a bit and now it displays this:
(ins)efraim@E5400 ~/workspace/guix$ sudo /gnu/store/7l5qdb0lw4bbghd17cam8pzdaz86zd3l-run-container
system container is running as PID 13663
Run 'sudo guix container exec 13663 /run/current-system/profile/bin/bash --login'
or run 'sudo nsenter -a -t 13663' to get a shell into it.
making '/gnu/store/8rrwm6wdyzl5i4g38va29azxki412nkr-system' the current system...
setting up setuid programs in '/run/setuid-programs'...
populating /etc from /gnu/store/lvxrcy913ga9g4sg549kk06krb8bbq6m-etc...
I think I like it like this with both options.
--
Efraim Flashner <efraim@flashner.co.il> אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[-- Attachment #1.2: 0001-system-linux-container-Recommend-guix-container.patch --]
[-- Type: text/plain, Size: 2030 bytes --]
From 1e85542ad6de76f761a366ba8d83f61b63789384 Mon Sep 17 00:00:00 2001
From: Efraim Flashner <efraim@flashner.co.il>
Date: Mon, 23 Dec 2019 16:05:04 +0200
Subject: [PATCH] system: linux-container: Recommend guix container.
* gnu/system/linux-container.scm (container-script)[script]: Recommend
using 'guix container' to get a shell inside the running container.
---
gnu/system/linux-container.scm | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/gnu/system/linux-container.scm b/gnu/system/linux-container.scm
index 2ab679ff3f..c8807398b3 100644
--- a/gnu/system/linux-container.scm
+++ b/gnu/system/linux-container.scm
@@ -2,6 +2,7 @@
;;; Copyright © 2015 David Thompson <davet@gnu.org>
;;; Copyright © 2016, 2017, 2019 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2019 Arun Isaac <arunisaac@systemreboot.net>
+;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -194,11 +195,13 @@ that will be shared with the host system."
(define (explain pid)
;; XXX: We can't quite call 'bindtextdomain' so there's actually
;; no i18n.
+ ;; XXX: Should we really give both options? 'guix container exec'
+ ;; is a more verbose command. Hard to fail to enter the container
+ ;; when we list two options.
(info (G_ "system container is running as PID ~a~%") pid)
- ;; XXX: Should we recommend 'guix container exec'? It's more
- ;; verbose and doesn't bring much.
- (info (G_ "Run 'sudo nsenter -a -t ~a' to get a shell into it.~%")
+ (info (G_ "Run 'sudo guix container exec ~a /run/current-system/profile/bin/bash --login'\n")
pid)
+ (info (G_ "or run 'sudo nsenter -a -t ~a' to get a shell into it.~%") pid)
(newline (guix-warning-port)))
(call-with-container file-systems
--
2.24.1
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [bug#38720] [PATCH] system: linux-container: Recommend guix container
2020-01-05 18:27 ` Efraim Flashner
@ 2020-01-06 9:56 ` Ludovic Courtès
2020-01-06 10:20 ` bug#38720: " Efraim Flashner
0 siblings, 1 reply; 5+ messages in thread
From: Ludovic Courtès @ 2020-01-06 9:56 UTC (permalink / raw)
To: Efraim Flashner; +Cc: 38720
Hello!
Efraim Flashner <efraim@flashner.co.il> skribis:
> From 1e85542ad6de76f761a366ba8d83f61b63789384 Mon Sep 17 00:00:00 2001
> From: Efraim Flashner <efraim@flashner.co.il>
> Date: Mon, 23 Dec 2019 16:05:04 +0200
> Subject: [PATCH] system: linux-container: Recommend guix container.
>
> * gnu/system/linux-container.scm (container-script)[script]: Recommend
> using 'guix container' to get a shell inside the running container.
OK, looks reasonable to me.
Thanks!
Ludo’.
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#38720: [PATCH] system: linux-container: Recommend guix container
2020-01-06 9:56 ` Ludovic Courtès
@ 2020-01-06 10:20 ` Efraim Flashner
0 siblings, 0 replies; 5+ messages in thread
From: Efraim Flashner @ 2020-01-06 10:20 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 38720-done
[-- Attachment #1: Type: text/plain, Size: 235 bytes --]
Thanks. Patch pushed
--
Efraim Flashner <efraim@flashner.co.il> אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-01-06 10:22 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-23 14:07 [bug#38720] [PATCH] system: linux-container: Recommend guix container Efraim Flashner
2019-12-30 22:05 ` Ludovic Courtès
2020-01-05 18:27 ` Efraim Flashner
2020-01-06 9:56 ` Ludovic Courtès
2020-01-06 10:20 ` bug#38720: " Efraim Flashner
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).