Subject: bug#41961: closed (Re: [bug#41961] [PATCH 1/1] services: childhurd: Support more than one instance.)

From: [email-masked] (GNU bug Tracking System)
Date: Sun, 21 Jun 2020 10:56:02 +0000

Your bug report

#41961: [PATCH 0/1] services: childhurd: Support more than one instance.

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

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
41961: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=41961
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: [bug#41961] [PATCH 1/1] services: childhurd: Support more than one instance.
From: Jan Nieuwenhuizen <[email-masked]>
To: Mathieu Othacehe <[email-masked]>
Cc: [email-masked], [email-masked]
Date: Sun, 21 Jun 2020 12:55:27 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Mathieu Othacehe writes:

>> Hmm...yes, this looked a bit awkward to me too.  It's being used like
>> this:
>>
>> o--8<---------------cut here---------------start------------->8---
>>   (let ((image       (hurd-vm-configuration-image config))
>>      ...)
>>     (define vm-command
>>       #~(list
>>          (string-append #$qemu "/bin/qemu-system-i386")
>>          #$@(if (file-exists? "/dev/kvm") '("--enable-kvm") '())
>>          "-m" (number->string #$memory-size)
>>          #$@net-options
>>          #$@options
>>          #+image))
>
> What about having something like:
>
> (define vm-command
>   #~(list
>      (string-append #$qemu "/bin/qemu-system-i386")
>      #$@(if (file-exists? "/dev/kvm") '("--enable-kvm") '())
>      "-m" (number->string #$memory-size)
>      #$@options
>      #+@(list "--hda" image)))
>
> instead?

So we hardcode it.  Simply changed to

--8<---------------cut here---------------start------------->8---
    (define vm-command
      #~(list
         (string-append #$qemu "/bin/qemu-system-i386")
         #$@(if (file-exists? "/dev/kvm") '("--enable-kvm") '())
         "-m" (number->string #$memory-size)
         #$@net-options
         #$@options
         "--hda" #+image))
--8<---------------cut here---------------end--------------->8---

I guess that's better than the original fragile softcoding, because it's
more robust and we have no usecase for changing '--hda' yet.  Maybe I'm
a bit too inclined to always enable the user to override stuff, even if
I cannot imagine its use case yet :-)

Pushed to master as, b7249aa4726193653e05e694ec4bb311aa4ec6c2.

Thanks,
Janneke

-- 
Jan Nieuwenhuizen <[email-masked]> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com

Subject: [PATCH 0/1] services: childhurd: Support more than one instance.
From: "Jan (janneke) Nieuwenhuizen" <[email-masked]>
To: [email-masked]
Cc: [email-masked], Jan Nieuwenhuizen <[email-masked]>
Date: Sat, 20 Jun 2020 11:16:56 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

From: Jan Nieuwenhuizen <[email-masked]>

Hi!

The first thing "someone" asked me when we finally got this amazing service
running and were still pretty excited about it, was

    can we have more than one Childhurd per host?[0]

Sounds like appreciation combined with a valid request, especially since it
implies the intention to setup some serious Hurd build nodes ;-)

Running two Childhurd instances on my laptop right now, using this
configuration

--8<---------------cut here---------------start------------->8---
      (service hurd-vm-service-type
               (hurd-vm-configuration
                (disk-size (* 5000 (expt 2 20))) ;5G
                (memory-size 1024)))

      (service hurd-vm-service-type
               (hurd-vm-configuration
                (os (operating-system
                      (inherit %hurd-vm-operating-system)
                      (host-name "childhurd1")))
                (id 1)))
--8<---------------cut here---------------end--------------->8---

look:

--8<---------------cut here---------------start------------->8---
$ sudo herd status | grep hurd
 + hurd-vm
 + hurd-vm1
11:10:46 janneke@dundal:~/src/guix/master [env]
$ ssh childhurd 'hostname; df --si / 2>/dev/null | tail -1'
childhurd
-               5.3G  934M  4.1G  19% /
11:11:00 janneke@dundal:~/src/guix/master [env]
$ ssh childhurd1 'hostname; df --si / 2>/dev/null | tail -1'
childhurd1
-               1.3G  894M  272M  77% /
--8<---------------cut here---------------end--------------->8---

Greetings,
Janneke

[0] http://logs.guix.gnu.org/guix/2020-06-13.log#001939

Jan (janneke) Nieuwenhuizen (1):
  services: childhurd: Support more than one instance.

 doc/guix.texi                   | 35 ++++++++++++++++++++--------
 gnu/services/virtualization.scm | 41 +++++++++++++++++++++++++--------
 2 files changed, 58 insertions(+), 18 deletions(-)

-- 
Jan Nieuwenhuizen <[email-masked]> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com