unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#43062: --expose in vm does not reflect file modifications in guest
@ 2020-08-27  2:04 elaexuotee--- via Bug reports for GNU Guix
  2020-08-28 14:11 ` Ludovic Courtès
  0 siblings, 1 reply; 5+ messages in thread
From: elaexuotee--- via Bug reports for GNU Guix @ 2020-08-27  2:04 UTC (permalink / raw)
  To: 43062


[-- Attachment #1.1: Type: text/plain, Size: 3165 bytes --]

## Overview

When using --expose to mirror a path between host and guest, the guest mirror
fails to reflect file modifications from the host. However, file creation and
deletion are correctly propogated.

To pick up file modifications in the guest, it is sufficient to remount
mirroring 9p filesystem.

Is this behaviour expected?


## Reproduction

The following should be sufficient to reproduce the issue:

Create a container and expose a path:

    host$ guix system --expose /some/path vm.scm
    /gnu/store/<hash>-run-vm.sh

Spin up the vm:

    host$ /gnu/store/<hash>-run-vm.sh

From the host, create a new file under /some/path, and check that the guest
sees this file:

    host$ touch /some/path/test
    guest$ cat /some/path/test
    <file is empty>

Now change the contents of this file on the host, and verify that the guest
does not see the change:

    host$ echo foo >/some/path/test
    guest$ cat /some/path/test
    <file is empty>

Finally, remount the filesystem at /some/path, and see that the guest now picks
up the changes:

    guest$ sudo mount -o remount,ro /some/path
    guest$ cat /some/path/test
    foo


## Version Information

    $ guix describe
    Generation 123	Aug 25 2020 23:19:12	(current)
      guix 253fcfe
        repository URL: https://git.savannah.gnu.org/git/guix.git
        branch: master
        commit: 253fcfe6fec8fb9d70cde8623fe562dc3ca67262

    $ cat vm.scm
    (use-modules (gnu))
    (use-service-modules networking ssh)
    (use-package-modules admin linux ncurses tmux)
    
    (operating-system
      (host-name "fmadio")
      (timezone "Asia/Tokyo")
      (locale "en_US.utf8")
    
      (bootloader (bootloader-configuration (bootloader #f) (target #f)))
      (kernel linux-libre-4.9)
      (file-systems %base-file-systems)
      (users (cons (user-account
                     (name "x")
                     (password (crypt "x" "Jr1er07l0lOUQ95GQLijow=="))
                     (group "users")
                     (supplementary-groups '("wheel")))
                   %base-user-accounts))
      (packages (cons* ncurses tcpdump tmux %base-packages))
      (services (cons* (service dhcp-client-service-type)
                       (service openssh-service-type)
                       %base-services)))


## Notes

In the above, I am running linux-libre@4.9 in the guest, but another user on
#guix confirmed the issue with linux-libre@5.8. The same user reported seeing
the following after modifying the host file and remounting in the guest:

    guest$ cat /some/path/test
    [   49.263620] FS-Cache: Duplicate cookie detected
    [   49.263644] FS-Cache: O-cookie c=00000000fe189610 [p=000000004224ad86 fl=226 nc=0 na=1]
    [   49.263664] FS-Cache: O-cookie d=0000000023080181 n=00000000825c3154
    [   49.263680] FS-Cache: O-key=[8] 'c3f51c0500000000'
    [   49.263695] FS-Cache: N-cookie c=00000000c11e31c7 [p=000000004224ad86 fl=2 nc=0 na=1]
    [   49.263715] FS-Cache: N-cookie d=0000000023080181 n=00000000dad562d4
    [   49.263731] FS-Cache: N-key=[8] 'c3f51c0500000000'
    foo

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-08-31 13:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-27  2:04 bug#43062: --expose in vm does not reflect file modifications in guest elaexuotee--- via Bug reports for GNU Guix
2020-08-28 14:11 ` Ludovic Courtès
2020-08-29  6:38   ` elaexuotee--- via Bug reports for GNU Guix
2020-08-30 18:23   ` Christopher Baines
2020-08-31 13:52     ` Ludovic Courtès

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).