GNU bug report logs - #61627
Cannot start a container built with `guix system container --network'.

Previous Next

Package: guix;

Reported by: Pierre Langlois <pierre.langlois <at> gmx.com>

Date: Sun, 19 Feb 2023 15:07:02 UTC

Severity: normal

Merged with 61856

Done: Pierre Langlois <pierre.langlois <at> gmx.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Pierre Langlois <pierre.langlois <at> gmx.com>
Subject: bug#61627: closed (Re: bug#61627: Cannot start a container built
 with `guix system container --network'.)
Date: Sun, 26 Mar 2023 13:44:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#61627: Cannot start a container built with `guix system container --network'.

which was filed against the guix package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 61627 <at> debbugs.gnu.org.

-- 
61627: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=61627
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Pierre Langlois <pierre.langlois <at> gmx.com>
To: 61627-done <at> debbugs.gnu.org
Cc: Arun Isaac <arunisaac <at> systemreboot.net>, Bruno Victal <mirai <at> makinata.eu>,
 Ludovic Courtès <ludo <at> gnu.org>,
 Pierre Langlois <pierre.langlois <at> gmx.com>
Subject: Re: bug#61627: Cannot start a container built with `guix system
 container --network'.
Date: Sun, 26 Mar 2023 14:41:53 +0100
[Message part 3 (text/plain, inline)]
Pierre Langlois <pierre.langlois <at> gmx.com> writes:

> [[PGP Signed Part:Undecided]]
> Hi Arun and Bruno,
>
> Arun Isaac <arunisaac <at> systemreboot.net> writes:
>
>>> I'm inclined to keep it in %network-configuration-files just to be
>>> safe.
>>
>> I agree. I don't really understand the implications of removing
>> /etc/hosts from %network-configuration-files. I would err on the side of
>> caution and leave it there for now.
>
> That sounds very sensible.
>
>>
>> @Pierre: Could you make a patch of the fix you suggested earlier
>> (removing hosts-service-type when the --network flag is provided) and
>> push it? Thank you!
>
> Sounds good! Just testing the following patch and will push it in a
> minute.
>
> [[End of PGP Signed Part]]
> From 42fbe62d52a82d1003c3d7039d3c4a46806c5cee Mon Sep 17 00:00:00 2001
> Message-Id: <42fbe62d52a82d1003c3d7039d3c4a46806c5cee.1679836531.git.pierre.langlois <at> gmx.com>
> From: Pierre Langlois <pierre.langlois <at> gmx.com>
> Date: Sun, 26 Mar 2023 13:55:14 +0100
> Subject: [PATCH] linux-container: Remove hosts-service-type when network is
>  shared.
>
> Fixes <https://issues.guix.gnu.org/61627>.
>
> * gnu/system/linux-container.scm (container-essential-services): When
> shared-network? is true, remove the hosts-service-type service kind.

Pushed as 42fbe62d52a82d1003c3d7039d3c4a46806c5cee

Thanks,
Pierre
[signature.asc (application/pgp-signature, inline)]
[Message part 5 (message/rfc822, inline)]
From: Pierre Langlois <pierre.langlois <at> gmx.com>
To: bug-guix <at> gnu.org
Subject: Cannot start a container built with `guix system container --network'.
Date: Sun, 19 Feb 2023 14:58:29 +0000
[Message part 6 (text/plain, inline)]
Hi Guix!

There seems to be a bug with the --network flag to `guix system
container', if we try to use docker-image.tmpl as an example we get the
following failure:

--8<---------------cut here---------------start------------->8---
$ sudo `guix system container -v3 --network gnu/system/examples/docker-image.tmpl`
Password:
system container is running as PID 17630
WARNING: (guile-user): imported module (guix build utils) overrides core binding `delete'
Run 'sudo guix container exec 17630 /run/current-system/profile/bin/bash --login'
or run 'sudo nsenter -a -t 17630' to get a shell into it.

WARNING: (guile-user): imported module (guix build utils) overrides core binding `delete'
making '/gnu/store/2w0c609is7iilv6r2l1vrchb9qsbfgkp-system' the current system...
WARNING: (guile-user): imported module (guix build utils) overrides core binding `delete'
setting up setuid programs in '/run/setuid-programs'...
populating /etc from /gnu/store/ywsdjyq161a2clhvz6kx5m4ppz5ziqp1-etc...
Backtrace:
          11 (primitive-load "/gnu/store/5wdqg0jpiw1zd9pn13wmzy3f85g…")
In gnu/build/linux-container.scm:
    300:8 10 (call-with-temporary-directory #<procedure 7fa5741fdd70…>)
   397:16  9 (_ "/tmp/guix-directory.KgjoQ6")
     62:6  8 (call-with-clean-exit #<procedure 7fa57420fd40 at gnu/b…>)
In unknown file:
           7 (primitive-load "/gnu/store/2w0c609is7iilv6r2l1vrchb9qs…")
In ice-9/eval.scm:
    619:8  6 (_ #f)
In unknown file:
           5 (primitive-load "/gnu/store/xfd58fw9x65n7wr5kw2gnciszkl…")
In srfi/srfi-1.scm:
    634:9  4 (for-each #<procedure primitive-load (_)> _)
In unknown file:
           3 (primitive-load "/gnu/store/3gwb0jydx90f61a6kizawsjdi6h…")
In srfi/srfi-1.scm:
    634:9  2 (for-each #<procedure 7fa57410e0e0 at gnu/build/activa…> …)
In gnu/build/activation.scm:
   268:20  1 (_ "hosts")
In unknown file:
           0 (copy-file "/etc/static/hosts" "/etc/hosts")

ERROR: In procedure copy-file:
In procedure copy-file: Read-only file system
--8<---------------cut here---------------end--------------->8---

Doing a git bisect, the problem started with this commit it seems:
802ea1f3a43e5fb8d0b8bd2882954d8a6e49cde6

--8<---------------cut here---------------start------------->8---
system: Deprecate hosts-file.

* gnu/system.scm (operating-system-hosts-file): Deprecate procedure.
(warn-hosts-file-field-deprecation): New procedure, helper for
deprecated variable.
(operating-system)[hosts-file]: Use helper to warn deprecated field.
(local-host-aliases): Mark as deprecated.
(local-host-entries): New procedure.
(operating-system-default-essential-services,
hurd-default-essential-services): Use hosts-service-type.  Use
'%operating-system-hosts-file' and 'local-host-entries'.
(default-/etc/hosts): Remove procedure.
(operating-system-etc-service): Remove hosts file.
* doc/guix.texi (operating-system Reference)
(Networking Services) (Virtualization Services): Rewrite documentation
entries to use hosts-service-type.
--8<---------------cut here---------------end--------------->8---

Thanks!
Pierre
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 2 years and 110 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.