syndicate-storage / syndicate

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

Volume & UG page error on MS #32

Closed iychoi closed 11 years ago

iychoi commented 11 years ago

Hi, John.

Current MS has some bug on Volume & UG registration page.

On My Volumes page, it doesn't show my volumes.

And, on All Volumes page, what does the version field mean? (Only my test volume has version 4.)

Also, while UG registration, I get an below error.

NameError at /syn/UG/create global name 'volume_name' is not defined

Request Method: POST

Request URL: https://syndicate-metadata.appspot.com/syn/UG/create

Django Version: 1.4.3

Exception Type: NameError

Exception Value: global name 'volume_name' is not defined

Exception Location: /base/data/home/apps/s~syndicate-metadata/1.368945069964938501/django_ug/views.py in create, line 279

Python Executable: /base/data/home/runtimes/python27/python27_dist/python

Python Version: 2.7.5

Python Path: ['/base/data/home/apps/s~syndicate-metadata/1.368945069964938501', '/base/data/home/runtimes/python27/python27_dist/lib/python27.zip', '/base/data/home/runtimes/python27/python27_dist/lib/python2.7', '/base/data/home/runtimes/python27/python27_dist/lib/python2.7/plat-linux2', '/base/data/home/runtimes/python27/python27_dist/lib/python2.7/lib-tk', '/base/data/home/runtimes/python27/python27_dist/lib/python2.7/lib-old', '/base/data/home/runtimes/python27/python27_dist/lib/python2.7/lib-dynload', '/base/data/home/runtimes/python27/python27_dist/lib/python2.7/site-packages', '/base/data/home/runtimes/python27/python27_lib/versions/1', '/base/data/home/runtimes/python27/python27_lib/versions/third_party/django-1.4', '/base/data/home/runtimes/python27/python27_lib/versions/third_party/lxml-2.3', '/base/data/home/runtimes/python27/python27_lib/versions/third_party/pycrypto-2.6', '/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2', '/base/data/home/runtimes/python27/python27_lib/versions/third_party/webob-1.1.1', '/base/data/home/runtimes/python27/python27_lib/versions/third_party/yaml-3.10', '/base/data/home/apps/s~syndicate-metadata/1.368945069964938501/django_syndicate_web/../django_lib/']

Server time: Sun, 21 Jul 2013 22:11:33 +0000

johnwhelchel commented 11 years ago

I think the reason why your volume is not showing up in MyVolumes is because of the way I re-created it. I thought I made the ownership for it right, but it might not be. Can you still access it from AllVolumes? If you make a new one, does that show up in MyVolumes? I'm thinking about eliminating that distinction all together anyway, considering this will be an admin site.

EDIT: It might also be because of a stale cache. I'm flushing it right now; if that fixed it let me know.

So version has to do with how many times a volume has been modified. This way, the different gateways can know when they're not up to date. Each time a volume changes, the version increments too.

What did you enter into the fields that produced the UG error so I can re-create it? Does the error message give any context for the line where the error occurs? Currently my django_ug/views.py is different so I can't quite tell which line 279 in the uploaded version is on my copy.

johnwhelchel commented 11 years ago

I have found the UG creation error. The offending line was

session['message'] = "Must have read rights to volume %s to create UG for it." % volume_name

I've fixed the error so that shouldn't happen again. It looks like though were trying to create a UG for a volume you hadn't created (or no one had given you permission for). Do you need to me to take out this restriction for your testing purposes? When I'm done today I'll update the live version so this error shouldn't happen.

Looking at the logs, I see there were other errors you encountered. It looks like after I made a new volume for you, the old UG's were still attached to the broken one. I've since moved them over. The reason why myvolumes is not working is because the MS still has you owning two old volumes that no longer exist. Consequently, when zip() is called in python it doesn't get as many items as it expects and in the end the page doesn't print out any volumes. Unfortunately, in GAE you can't modify list properties from the admin console. I can either clear the entire datastore and re-run test/setup, then let you go from there, or you can just use allvolumes for right now. I think you're the only one using the live site for work so that should be fine. I'll also make sure to try and avoid deleting things via GAE instead of in the admin site. It might make sense to get rid of volume secrets for this reason @jcnelson.

iychoi commented 11 years ago

Now "my volumes" page and UG registration work well.

Thank you :-)

johnwhelchel commented 11 years ago

No problem!