Linux NFS development
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.com>
To: Chuck Lever <chuck.lever@oracle.com>,
	Stefan Hajnoczi <stefanha@redhat.com>
Cc: Linux NFS Mailing List <linux-nfs@vger.kernel.org>,
	Jeff Layton <jlayton@redhat.com>,
	Abbas Naderi <abiusx@google.com>,
	Steve Dickson <steved@redhat.com>
Subject: Re: [PATCH nfs-utils v2 05/12] getport: recognize "vsock" netid
Date: Fri, 07 Jul 2017 14:13:38 +1000	[thread overview]
Message-ID: <87tw2ox4st.fsf@notabene.neil.brown.name> (raw)
In-Reply-To: <87wp7lvst9.fsf@notabene.neil.brown.name>

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

On Fri, Jul 07 2017, NeilBrown wrote:

> On Fri, Jun 30 2017, Chuck Lever wrote:
>>
>> Wouldn't it be nicer if it worked like this:
>>
>> (guest)$ cat /etc/hosts
>> 129.0.0.2  localhyper
>> (guest)$ mount.nfs localhyper:/export /mnt
>>
>> And the result was a working NFS mount of the
>> local hypervisor, using whatever NFS version the
>> two both support, with no changes needed to the
>> NFS implementation or the understanding of the
>> system administrator?
>
> Yes. Yes. Definitely Yes.
> Though I suspect you mean "127.0.0.2", not "129..."??
>
> There must be some way to redirect TCP connections to some address
> transparently through to the vsock protocol.
> The "sshuttle" program does this to transparently forward TCP connections
> over an ssh connection.  Using a similar technique to forward
> connections over vsock shouldn't be hard.
>
> Or is performance really critical, and you get too much copying when you
> try forwarding connections?  I suspect that is fixable, but it would be
> a little less straight forward.
>
> I would really *not* like to see vsock support being bolted into one
> network tool after another.

I've been digging into this a big more.  I came across
  https://vmsplice.net/~stefan/stefanha-kvm-forum-2015.pdf

which (on page 7) lists some reasons not to use TCP/IP between guest
and host.

 . Adding & configuring guest interfaces is invasive

That is possibly true.  But adding support for a new address family to
NFS, NFSD, and nfs-utils is also very invasive.  You would need to
install this software on the guest.  I suggest you install different
software on the guest which solves the problem better.

 . Prone to break due to config changes inside guest

This is, I suspect, a key issue.  With vsock, the address of the
guest-side interface is defined by options passed to qemu.  With
normal IP addressing, the guest has to configure the address.

However I think that IPv6 autoconfig makes this work well without vsock.
If I create a bridge interface on the host, run
  ip -6 addr  add fe80::1 dev br0
then run a guest with
   -net nic,macaddr=Ch:oo:se:an:ad:dr \
   -net bridge,br=br0 \

then the client can
  mount [fe80::1%interfacename]:/path /mountpoint

and the host will see a connection from
   fe80::ch:oo:se:an:ad:dr

So from the guest side, I have achieved zero-config NFS mounts from the
host.

I don't think the server can filter connections based on which interface
a link-local address came from.  If that was a problem that someone
wanted to be fixed, I'm sure we can fix it.

If you need to be sure that clients don't fake their IPv6 address, I'm
sure netfilter is up to the task.


 . Creates network interfaces on host that must be managed

What vsock does is effectively create a hidden interface on the host that only the
kernel knows about and so the sysadmin cannot break it.  The only
difference between this and an explicit interface on the host is that
the latter requires a competent sysadmin.

If you have other reasons for preferring the use of vsock for NFS, I'd be
happy to hear them.  So far I'm not convinced.

Thanks,
NeilBrown

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

  reply	other threads:[~2017-07-07  4:13 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-30 13:21 [PATCH nfs-utils v2 00/12] add NFS over AF_VSOCK support Stefan Hajnoczi
2017-06-30 13:21 ` [PATCH nfs-utils v2 01/12] mount: don't use IPPROTO_UDP for address resolution Stefan Hajnoczi
2017-06-30 14:34   ` Steve Dickson
2017-07-03  8:55     ` Stefan Hajnoczi
2017-07-03 16:35       ` Steve Dickson
2017-06-30 13:21 ` [PATCH nfs-utils v2 02/12] nfs-utils: add AF_VSOCK support to sockaddr.h Stefan Hajnoczi
2017-06-30 13:21 ` [PATCH nfs-utils v2 03/12] mount: present AF_VSOCK addresses Stefan Hajnoczi
2017-06-30 14:40   ` Steve Dickson
2017-07-03  9:00     ` Stefan Hajnoczi
2017-07-03 16:51       ` Steve Dickson
2017-07-03 21:04         ` Felix Janda
2017-07-10 18:14         ` Stefan Hajnoczi
2017-07-12 14:26           ` Steve Dickson
2017-07-06 17:16       ` J. Bruce Fields
2017-07-10 18:09         ` Stefan Hajnoczi
2017-06-30 13:21 ` [PATCH nfs-utils v2 04/12] mount: accept AF_VSOCK in nfs_verify_family() Stefan Hajnoczi
2017-06-30 13:21 ` [PATCH nfs-utils v2 05/12] getport: recognize "vsock" netid Stefan Hajnoczi
2017-06-30 15:01   ` Steve Dickson
2017-07-10 18:35     ` Stefan Hajnoczi
2017-06-30 15:52   ` Chuck Lever
2017-07-07  3:17     ` NeilBrown
2017-07-07  4:13       ` NeilBrown [this message]
2017-07-25 10:05         ` Stefan Hajnoczi
2017-07-27  5:13           ` NeilBrown
2017-07-27 10:58             ` Stefan Hajnoczi
2017-07-27 11:33               ` Jeff Layton
2017-07-27 23:11               ` NeilBrown
2017-08-03 15:24                 ` Stefan Hajnoczi
2017-08-03 21:45                   ` NeilBrown
2017-08-03 23:53                     ` Matt Benjamin
2017-08-04  3:25                       ` NeilBrown
2017-08-04 15:56                     ` Stefan Hajnoczi
2017-08-04 22:35                       ` NeilBrown
2017-08-08 14:07                         ` Stefan Hajnoczi
2017-07-07  4:14       ` Chuck Lever
2017-07-25 12:29       ` Stefan Hajnoczi
2017-07-19 15:11     ` Stefan Hajnoczi
2017-07-19 15:35       ` Jeff Layton
2017-07-19 15:40         ` Chuck Lever
2017-07-19 15:50       ` Chuck Lever
2017-07-28  0:35     ` Matt Benjamin
2017-06-30 13:21 ` [PATCH nfs-utils v2 06/12] mount: AF_VSOCK address parsing Stefan Hajnoczi
2017-06-30 13:21 ` [PATCH nfs-utils v2 07/12] exportfs: introduce host_freeaddrinfo() Stefan Hajnoczi
2017-06-30 13:21 ` [PATCH nfs-utils v2 08/12] exportfs: add AF_VSOCK address parsing and printing Stefan Hajnoczi
2017-06-30 13:21 ` [PATCH nfs-utils v2 09/12] exportfs: add AF_VSOCK support to set_addrlist() Stefan Hajnoczi
2017-06-30 13:21 ` [PATCH nfs-utils v2 10/12] exportfs: add support for "vsock:" exports(5) syntax Stefan Hajnoczi
2017-06-30 15:07   ` Steve Dickson
2017-06-30 13:21 ` [PATCH nfs-utils v2 11/12] nfsd: add --vsock (-v) option to nfsd Stefan Hajnoczi
2017-06-30 15:25   ` Steve Dickson
2017-07-10 18:39     ` Stefan Hajnoczi
2017-06-30 13:21 ` [PATCH nfs-utils v2 12/12] tests: add "vsock:" exports(5) test case Stefan Hajnoczi

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=87tw2ox4st.fsf@notabene.neil.brown.name \
    --to=neilb@suse.com \
    --cc=abiusx@google.com \
    --cc=chuck.lever@oracle.com \
    --cc=jlayton@redhat.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=stefanha@redhat.com \
    --cc=steved@redhat.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox