[tahoe-dev] Review needed for #833 (reject mutable children when *reading* an immutable dirnode)

David-Sarah Hopwood david-sarah at jacaranda.org
Sun Jan 24 17:40:32 UTC 2010


Zooko Wilcox-O'Hearn wrote:
> On Saturday, 2010-01-23, at 6:11 , David-Sarah Hopwood wrote:
> 
>> It would be nice to have a public gateway to the test grid upgraded  
>> with this patch, so that we can collaboratively test usability  
>> issues with unknown caps. It needn't be the usual  
>> testgrid.allmydata.org gateway; in fact it would be better for it  
>> not to be so that we can compare the behaviour with and without the  
>> patch.
> 
> Okay I upgraded http://testgrid.allmydata.org:3567/ to trunk (-r4170)  
> and added http://testgrid.allmydata.org:3568/ which is trunk plus the  
> patch from #833 named "all-with-json-fix-diff.txt".

Excellent, thanks. Last night I also created a directory on the testgrid
to experiment with unknown caps (it's linked as davidsarah/ from the main
public directory):

URI:DIR2:bntvvn2bf37vwmrd3ttbygt4s4:qymwa2lcvhjvi3hnamxew6ywro5jmj7zfnspmrpqv3n7faibprlq/

(prefix with http://testgrid.allmydata.org:3567/uri/ or
http://testgrid.allmydata.org:3568/uri/ to see the old and new
behaviours).

Everything seems to work as I intended -- the unknown read cap URIs are
prefixed with ro. in the mutable directory, and imm. in the immutable
directory. The JSON link on the info page of an unknown dirnode now
works.

The only odd thing is that there is no "tahoe" field in the metadata of
'immutable-dir/only-child-from-the-future' (which was created by a
mkdir-immutable operation). It should have been added automatically.
I think that's probably a preexisting bug that doesn't have anything to
do with the #833 changes, but I'll investigate.


BTW, I'd like to thank Jody Harris for donating a cloud server on which
to run a node. I did get Tahoe running on it, but the node didn't seem
to be accepting connections. We can look at why not later.


Unknown nodes still can't be created using the WUI (although they can be
renamed, etc.) To create your own caps-from-the-future:

Install 'restez' (a Python command-line HTTP client) from
restez.googlecode.com.

  svn checkout http://restez.googlecode.com/svn/trunk/ restez-read-only
  cd restez-read-only
  python setup.py install

Then create a set-children.json text file with contents similar to:

{
  "your-name-here": [
    "filenode",
    {
      "rw_uri": "x-lafs:writecap-from-the-future",
      "ro_uri": "x-lafs:readcap-from-the-future",
      "metadata": {}
    }
  ]
}

and enter the following command (one line):

restez POST
http://testgrid.allmydata.org:3568/uri/URI%3ADIR2%3Abntvvn2bf37vwmrd3ttbygt4s4%3Aqymwa2lcvhjvi3hnamxew6ywro5jmj7zfnspmrpqv3n7faibprlq?t=set-children
 set-children.json

-- 
David-Sarah Hopwood  ⚥  http://davidsarah.livejournal.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 292 bytes
Desc: OpenPGP digital signature
URL: <http://tahoe-lafs.org/pipermail/tahoe-dev/attachments/20100124/cdde6be8/attachment.asc>


More information about the tahoe-dev mailing list