9front - general discussion about 9front
 help / color / mirror / Atom feed
* [9front] srv(3) clone and srvid
@ 2023-03-29 17:45 unobe
  2023-03-29 17:51 ` Jacob Moody
  0 siblings, 1 reply; 5+ messages in thread
From: unobe @ 2023-03-29 17:45 UTC (permalink / raw)
  To: 9front

I'm trying to run ndb/dns in a separate namespace so that I can use it
to forward requests (in the namespace) to another DNS server.
Recently, ndb/dns was updated to use /srv instead of '#s', which is
necessary to keep it separate from the primary devsrv.  srv(3) states
I can clone /srv and access that in two ways, via /srv/id or directly
using srvspec:

          bind -c #s$srvspec /srv

          /srv/clone
          /srv/id/...
          /srv/service1
          /srv/service2

The functionality is explained near the end of the man page:
          Opening the clone file allocates a new service directory.
          Reading clone returns the id of the new directory.  This new
          service directory can then be accessed at /srv/id.  Directo-
          ries are recursive; each new service directory contains its
          own clone file and sub-directories.  Directories can be
          walked from the root such as #s/id1/id2/id3 which makes them
          globally addressable.  As a convention, /lib/namespace
          accepts the path to the service directory from the environ-
          ment variable $srvspec, making it possible to start a new
          namespace using a specific service directory as a starting
          point.

If I do:
	cpu% cat /srv/clone
	15cpu%

I get a new id.  I expected to be able to go to the clone using
/srv/15, but that is not available:
	cpu% lc /srv/15
	ls: /srv/15: '/srv/15' file does not exist

I can, however, specify the srvspec to (supposedly) bind to a new
service directtory:
	cpu% srvspec=`{cat /srv/clone} bind -c '#s'^$srvspec /srv
	cpu%

Yet I would have expected this cloned service directory to be
disassociated from its parents so that manipulating it would not
affect the parent.  Right now, that is not the case.  If I rm
/srv/dns', after cloning the service directory, it is reflected across
all namespaces.  Is this a feature that hasn't been implemented?  Am I
misunderstanding how it's meant to work?


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

end of thread, other threads:[~2023-03-29 20:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-29 17:45 [9front] srv(3) clone and srvid unobe
2023-03-29 17:51 ` Jacob Moody
2023-03-29 19:00   ` ori
2023-03-29 20:15     ` unobe
2023-03-29 20:31       ` Jacob Moody

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 NNTP newsgroup(s).