syndicate-storage / syndicate

Internet-scale software-defined storage system
Apache License 2.0
56 stars 10 forks source link

Create root MSEntry on Volume create #30

Closed jcnelson closed 11 years ago

jcnelson commented 11 years ago

When a Volume is created, it's root directory should be created as well.

johnwhelchel commented 11 years ago

The current line of code creating root directories for the debug/setup is as follows:

rc = storage.make_root( volume,
                             ftype=MSENTRY_TYPE_DIR,
                             fs_path="/",
                             url="http://localhost:32780/",
                             version=1,
                             ctime_sec=1360015114,
                             ctime_nsec=0,
                             mtime_sec=1360015114,
                             mtime_nsec=0,
                             owner_id=user.owner_id,
                             acting_owner_id=user.owner_id,
                             volume_id=volume.volume_id,
                             mode=0777,
                             size=4096,
                             max_read_freshness=5000,
                             max_write_freshness=0
                          )

For creating this when Volumes are created, how should these differ? For example, the url seems to be matching the url of the UG's in the setup script, but since when you're creating a volume, you don't know yet what UG it's attached to, should that be left blank? When later attaching a UG and volume, should the root setting change to reflect this change? Is size connected at all to blocksize, and do the time settings need to change at all?

jcnelson commented 11 years ago

Directories are owned by the MS, not any particular UG. Just replace the url with "https://syndicate-metadata.appspot.com".

-Jude

----- Original Message ----- From: "johnwhelchel" notifications@github.com To: "jcnelson/syndicate" syndicate@noreply.github.com Cc: "Jude Nelson" jcnelson@CS.Princeton.EDU Sent: Sunday, July 21, 2013 5:00:47 PM Subject: Re: [syndicate] Create root MSEntry on Volume create (#30)

The current line of code creating root directories for the debug/setup is as follows: rc = storage.make_root( volume, ftype=MSENTRY_TYPE_DIR, fs_path="/", url="http://localhost:32780/", version=1, ctime_sec=1360015114, ctime_nsec=0, mtime_sec=1360015114, mtime_nsec=0, owner_id=user.owner_id, acting_owner_id=user.owner_id, volume_id=volume.volume_id, mode=0777, size=4096, max_read_freshness=5000, max_write_freshness=0 )

For creating this when Volumes are created, how should these differ? For example, the url seems to be matching the url of the UG's in the setup script, but since when you're creating a volume, you don't know yet what UG it's attached to, should that be left blank? When later attaching a UG and volume, should the root setting change to reflect this change? Is size connected at all to blocksize, and do the time settings need to change at all?

— Reply to this email directly or view it on GitHub .

johnwhelchel commented 11 years ago

The rest of the defaults are ok?

jcnelson commented 11 years ago

Actually, let's make the mode 0755, and set the ctime_sec, ctime_nsec, mtime_sec, mtime_nsec to the current time.