unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Christopher Baines <mail@cbaines.net>
To: Oleg Pykhalov <go.wigust@gmail.com>
Cc: 27855@debbugs.gnu.org
Subject: [bug#27855] [PATCH] gnu: Add rsync service.
Date: Sat, 12 Aug 2017 18:46:49 +0100	[thread overview]
Message-ID: <20170812184649.2003677a@cbaines.net> (raw)
In-Reply-To: <87valtylnc.fsf@gmail.com>

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

On Sat, 12 Aug 2017 16:13:11 +0300
Oleg Pykhalov <go.wigust@gmail.com> wrote:

> Hello Christopher,
> 
> Christopher Baines <mail@cbaines.net> writes:
> 
> …
> >> >> On Thu, 10 Aug 2017 08:18:20 +0100
> >> >> Christopher Baines <mail@cbaines.net> wrote:
> >> >>    
> >> >>> I've attached the beginnings of a system test for this. I
> >> >>> haven't got as far as actually testing the service directly
> >> >>> yet, but I'm going to try testing it, both when running as
> >> >>> root, and when not running as root.
> >> >>> 
> >> >>> A VM start script can be created from this rsync.scm file, by
> >> >>> running: guix system vm gnu/tests/rsync.scm
> >> >>> 
> >> >>> Also, the test itself can be run by doing:
> >> >>>   make check-system TESTS=rsync    
> >> >>
> >> >> I've now got around to actually testing the service. I've
> >> >> attached a patch which creates two system tests. One which
> >> >> tests the service with the default port, and one with a higher
> >> >> port (I randomly picked 2000).
> >> >>
> >> >> The default port test currently passes, but the higher port one
> >> >> currently fails as the rsync service can't create the PID file.
> >> >>
> >> >> One option to fix this would be to create a /var/run/rsync
> >> >> directory which is owned by the rsyncd user, and then create the
> >> >> PID file as /var/run/rsync/pid.    
> >> >
> >> > I'll check it later, if you'll not be faster than me.  :-)
> >> >    
> >> >> Just let me know if you have any questions?    
> >> > …
> >> >
> >> > I successfully passed you previous patch test, but the new patch
> >> > one with two “ports” fails.    
> >> 
> >> Trying to understand what is going on.  Working on your latest test
> >> patch.
> >> 
> >> This is what I currently have.  It's not differ from your patch
> >> except commented test below.  guix/gnu/tests/rsync.scm
> >> https://paste.pound-python.org/raw/ZyfPIvOWAbPd7blPRXf7/
> >> 
> >> I fully commented
> >> (test-equal "Test file correctly received from share" …).
> >> 
> >> (test-assert "Test file copied to share"
> >>   …
> >>   (zero? ; ERROR HERE
> >>    (system* "rsync" "/tmp/input" "localhost::files/")))
> >> 
> >> Bottom of test log:
> >> --8<---------------cut here---------------start------------->8---
> >> rsync: mkstemp ".input.Y6OhRW" (in files) failed: Permission denied
> >> (13) rsync error: some files/attrs were not transferred (see
> >> previous errors) (code 23) at main.c(1178) [sender=3.1.2] QEMU
> >> runs as PID 5 connected to QEMU's monitor
> >> read QEMU monitor prompt
> >> connected to guest REPL
> >> %%%% Starting test rsync  (Writing full log to "rsync.log")
> >> marionette is ready
> >> /gnu/store/bm3kvdwh8q3spvhxbmpmcjwz3fng8z5f-rsync-test-builder:1:
> >> FAIL Test file copied to share # of expected passes      2
> >> # of unexpected failures  1
> >> note: keeping build directory `/tmp/guix-build-rsync-test.drv-9'
> >> builder for
> >> `/gnu/store/1hv9c616m9xkgi549hgbn1y2vr8mnzfr-rsync-test.drv' failed
> >> with exit code 1 @
> >> build-failed /gnu/store/1hv9c616m9xkgi549hgbn1y2vr8mnzfr-rsync-test.drv
> >> - 1 builder for
> >> `/gnu/store/1hv9c616m9xkgi549hgbn1y2vr8mnzfr-rsync-test.drv' failed
> >> with exit code 1 TOTAL: 1
> >> FAIL: /gnu/store/s0rwmr3iha48jbw2b9xkzcqqsamdl21q-rsync-test make:
> >> *** [Makefile:5217: check-system] Error 1 --8<---------------cut
> >> here---------------end--------------->8---  
> >
> > With the change to add the uid to the rsync configuration file, the
> > rsync-with-default-port passes for me. What test are you running
> > here?  
> 
> It was “rsync-with-default-port”.  With “uid” passed successfully all
> tests in “rsync-with-default-port”.
> 
> Test 2000 port
> ==============
> 
> The “test-rsync-with-port-2000” fails, because we sync with default
> rsync protocol port in this test but we need 2000.
> 
> --8<---------------cut here---------------start------------->8---
> (test-assert "Test file copied to share"
>   …
>   (system* "rsync" "/tmp/input" "localhost::files/"))
> --8<---------------cut here---------------end--------------->8---
> 
> Why I thought about this:
> --8<---------------cut here---------------start------------->8---
> rsync: failed to connect to localhost (127.0.0.1): Connection refused
> (111) rsync error: error in socket IO (code 10) at
> clientserver.c(125) [sender=3.1.2] rsync: failed to connect to
> localhost (127.0.0.1): Connection refused (111) rsync error: error in
> socket IO (code 10) at clientserver.c(125) [Receiver=3.1.2]
> --8<---------------cut here---------------end--------------->8---
> 
> Next lines:
> --8<---------------cut here---------------start------------->8---
> ice-9/eval.scm:387:11: In procedure eval:
> ice-9/eval.scm:387:11: In procedure open-file: No such file or
> directory: "/tmp/output" QEMU runs as PID 5
> connected to QEMU's monitor
> read QEMU monitor prompt
> connected to guest REPL
> %%%% Starting test rsync  (Writing full log to "rsync.log")
> marionette is ready
> /gnu/store/ahmg6h2fnap2znwhl6b4jrjgp830h4dv-rsync-test-builder:1:
> FAIL Test file copied to
> share /gnu/store/ahmg6h2fnap2znwhl6b4jrjgp830h4dv-rsync-test-builder:1:
> FAIL Test file correctly received from share # of expected
> passes      2 # of unexpected failures  2 note: keeping build
> directory `/tmp/guix-build-rsync-test.drv-13' builder for
> `/gnu/store/9fakmd8dqzdw1ybff6gb00qfzhrwqdis-rsync-test.drv' failed
> with exit code 1 @
> build-failed /gnu/store/9fakmd8dqzdw1ybff6gb00qfzhrwqdis-rsync-test.drv
> - 1 builder for
> `/gnu/store/9fakmd8dqzdw1ybff6gb00qfzhrwqdis-rsync-test.drv' failed
> with exit code 1 TOTAL: 1
> FAIL: /gnu/store/rmb3hywspr34fwp5xinphaml7c4xjpvk-rsync-test make:
> *** [Makefile:5217: check-system] Error 1 --8<---------------cut
> here---------------end--------------->8---
> 
> I only fixed PID error in current moment.
> 
> gnu/tests/rsync.scm
> https://paste.pound-python.org/raw/D4ccInuJG0g0899GCdy2/
> 
> gnu/services/rsync.scm
> https://paste.pound-python.org/raw/URDLeIV3XFZ29SjcZYc6/

Yep, I think I just stopped writing the test after finding the issue
with the PID file.

I haven't looked in to how to fix this in the test, so if you could,
that would be great. Otherwise, I'll probably have time to look at this
again within a week or so.

You'll probably need to refactor the test a bit, as at the moment, the
information regarding the port isn't available where you run the
commands.

> >> Also, I have (is related?) error on top of test log.
> >> --8<---------------cut here---------------start------------->8---
> >> natsu@magnolia ~/src/guix$ ./pre-inst-env make check-system
> >> TESTS=rsync-with-default-port Compiling Scheme modules...
> >> warning: failed to load '(gnu tests admin)':
> >> ERROR: In procedure allocate-struct: Wrong type argument in
> >> position 2: 8 --8<---------------cut
> >> here---------------end--------------->8---  
> >
> > I think I may have seen this error too, no idea what it relates to
> > though.  
> 
> Should we report this as a bug?

Ideally yes, but I have no idea where the bug might be. I guess it
might be Guile, as I didn't find anything named allocate-struct in Guix.

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

  reply	other threads:[~2017-08-12 17:48 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-27 22:01 [bug#27855] [PATCH] gnu: Add rsync service Oleg Pykhalov
2017-07-27 22:22 ` [bug#27855] ERROR: rsync rsync://localhost/files Oleg Pykhalov
2017-07-28  6:45 ` [bug#27855] [PATCH] services: rsync: Fix invalid gid nobody Oleg Pykhalov
2017-07-28 22:17 ` [bug#27855] [PATCH] gnu: Add rsync service Christopher Baines
2017-07-29 11:03   ` Oleg Pykhalov
2017-07-29 11:55     ` Christopher Baines
2017-08-03 15:20       ` Oleg Pykhalov
2017-08-03 15:29         ` Oleg Pykhalov
2017-08-03 15:33         ` Christopher Baines
2017-08-03 16:20           ` Oleg Pykhalov
2017-08-03 16:34             ` Oleg Pykhalov
2017-08-10  7:18             ` Christopher Baines
2017-08-10 18:21               ` Christopher Baines
2017-08-10 18:56                 ` Oleg Pykhalov
2017-08-11 19:28                   ` Oleg Pykhalov
2017-08-12  6:59                     ` Christopher Baines
2017-08-12 13:13                       ` Oleg Pykhalov
2017-08-12 17:46                         ` Christopher Baines [this message]
2017-08-12 20:19                           ` Oleg Pykhalov
2017-08-12 21:19                             ` Christopher Baines
2017-08-19 20:34                               ` Oleg Pykhalov
2017-08-19 22:19                                 ` Christopher Baines
2017-08-24 22:40                                   ` Oleg Pykhalov
2017-08-30 23:59                                     ` Christopher Baines
2017-08-31 13:04                                       ` Ludovic Courtès
2017-09-16 22:44                                         ` Oleg Pykhalov
2017-09-16 22:49                                           ` Oleg Pykhalov
2017-09-17  8:40 ` [bug#27855] Status: " Oleg Pykhalov
2017-09-18  6:20 ` [bug#27855] " Christopher Baines
2017-09-23  1:47   ` Oleg Pykhalov
2017-09-23  2:38     ` Oleg Pykhalov
2017-09-23 20:12     ` bug#27855: " 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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=20170812184649.2003677a@cbaines.net \
    --to=mail@cbaines.net \
    --cc=27855@debbugs.gnu.org \
    --cc=go.wigust@gmail.com \
    /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 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).