all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Christopher Baines <mail@cbaines.net>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 28198@debbugs.gnu.org
Subject: [bug#28198] [PATCH 1/4] vm: Add disk-image-size to <virtual-machine>.
Date: Mon, 25 Sep 2017 21:36:48 +0100	[thread overview]
Message-ID: <20170925213648.25ef5dd1@cbaines.net> (raw)
In-Reply-To: <87y3pzudh7.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 2647 bytes --]

On Thu, 31 Aug 2017 14:29:56 +0200
ludo@gnu.org (Ludovic Courtès) wrote:

> Hi Chris,

Thanks for reviewing these patches Ludo, unfortunately its taken me
nearly a month to get around to replying.

Thankfully, I've made some progress in that time.

> Christopher Baines <mail@cbaines.net> skribis:
> 
> > * gnu/system/vm.scm (<virtual-machine>): Add
> >   disk-image-size.
> >   (port-forwardings->qemu-options): Use disk-image-size from
> >   <virtual-machine>.  
> 
> In which case is it useful?  Perhaps if you want to create lots of
> data on the root file system in the MongoDB test?
> 
> Currently <virtual-machine> builds a shared-store VM (like ‘guix
> system vm’) in which the root file system has a fixed size that’s
> usually good enough.

The best answer I have at the moment is that I think MongoDB creates a
rather large file, even if it has no data to store in it. I'll do some
more investigation to confirm this though.

> > --- a/gnu/system/vm.scm
> > +++ b/gnu/system/vm.scm
> > @@ -653,6 +653,8 @@ it is mostly useful when FULL-BOOT?  is true."
> >                      (default #f))
> >    (memory-size      virtual-machine-memory-size   ;integer (MiB)
> >                      (default 256))
> > +  (disk-image-size  virtual-machine-disk-image-size   ;integer
> > (bytes)
> > +                    (default (* 70 (expt 2 20))))  
> 
> I think we can use 'guess here as the default value (and we should do
> the same in places where #:disk-image-size has an arbitrary default.)

I've been looking at this in the last few days. Making 'guess the
default value here does mean something, and I think it's a good idea.

As far as I can tell, for this specific test, these are the 3 functions
that are called on the way to using the actual size, and the defaults
they have:

system-qemu-image/shared-store-script default:
  (* (if full-boot? 500 70)
     (expt 2 20)))

system-qemu-image/shared-store default: 
  (* (if full-boot? 500 30) 
     (expt 2 20)))

qemu-image default:
  'guess

From my tests, if the default in the <virtual-machine> is set to
'guess, then for the mongodb test the guess seems to be 0 MiB at the
moment, which doesn't work. I've started looking at setting a sensible
default in qemu-image, so that the root filesystem size isn't 0 MiB.

While testing with the system tests, I noticed that the ones I was
testing with didn't pass without my changes, so I've started looking in
to that now. So far, I've got one patch that helps [1], but I think
there are other issues.

1: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=28600



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 963 bytes --]

  reply	other threads:[~2017-09-25 20:37 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-23  9:18 [bug#28198] [PATCH] Add MongoDB package and service Christopher Baines
2017-08-23  9:25 ` [bug#28198] [PATCH 1/4] vm: Add disk-image-size to <virtual-machine> Christopher Baines
2017-08-23  9:25   ` [bug#28198] [PATCH 2/4] gnu: Add mongodb Christopher Baines
2017-08-31 12:32     ` Ludovic Courtès
2017-09-30  8:04       ` Christopher Baines
2017-08-23  9:25   ` [bug#28198] [PATCH 3/4] services: Add MongoDB Christopher Baines
2017-08-31 12:34     ` Ludovic Courtès
2017-09-30  8:05       ` Christopher Baines
2017-08-23  9:25   ` [bug#28198] [PATCH 4/4] tests: databases: Add MongoDB test Christopher Baines
2017-08-31 12:37     ` Ludovic Courtès
2017-09-30  8:09       ` Christopher Baines
2017-08-31 12:29   ` [bug#28198] [PATCH 1/4] vm: Add disk-image-size to <virtual-machine> Ludovic Courtès
2017-09-25 20:36     ` Christopher Baines [this message]
2017-09-26  7:14       ` Ludovic Courtès
2017-09-29  6:48         ` [bug#28635] " Christopher Baines
2017-08-26 22:33 ` [bug#28198] [PATCH] Add MongoDB package and service Roel Janssen
2017-08-27 22:30   ` Christopher Baines
2017-09-30  7:59 ` [bug#28198] [PATCH 1/3] vm: Add disk-image-size to <virtual-machine> Christopher Baines
2017-09-30  7:59   ` [bug#28198] [PATCH 2/3] gnu: Add mongodb Christopher Baines
2017-10-04 14:40     ` Ludovic Courtès
2017-09-30  7:59   ` [bug#28198] [PATCH 3/3] services: Add MongoDB Christopher Baines
2017-10-04 14:44     ` Ludovic Courtès
2017-10-06 20:29       ` bug#28198: " Christopher Baines

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170925213648.25ef5dd1@cbaines.net \
    --to=mail@cbaines.net \
    --cc=28198@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.