Changes to galaxysession cookie?
Hello, A quick question: If I recall correctly, it was possible to set the galaxy session cookie name with the "session_key" variable in "universe_wsgi.ini". I'm not sure about that, but I think it was possible, because I'm running two instances (at least) from the same server, and I explicitly set the cookie names to by different. Now it seems that the cookie is always "galaxysession" - was that changed recently, or am I missing something? One reason that I ask: The "path" of the cookie is always hard-coded to "/" (probably in lib/galaxy/web/framework/__init__.py:set_cookie as the default parameter) - so when I run two galaxies from the same server (with different "prefix" filter) - they are now forced to share the same session cookie. I think this is causing some history related problems in one of my servers: galaxy always thinks there is no active history selected. Example: 1. I click "list saved histories" 2. Select a history 3. The history pane is updated. 4. I click on "refresh" history 5. a new, "unnamed history" is created, without any datasets. The log shows error like: alaxy.web.framework DEBUG 2010-04-04 23:48:39,512 Error: this request returned None from get_history(): http://rave.cshl.edu/devglx/history/list Any ideas ? Thanks, -gordon
Follow-up: The immediate cause for this behavior was that I was having two instances of two galaxy opened at the same time (in two tabs in firefox). Those two instances were overwriting each other's "galaxysession" cookie, so it would happen that one would try to use the other's "session" cookie value due to automatic refresh in history pane (and the fact that they are both hosted on the same server). Again, I'm (almost) certain it used to be possible to do that (having two instances open at the same time, not sharing a cookie). The obvious workaround is "don't do that" - have only one instance open per server at any given time. A more long-term solution might be to respect the "prefix" filter in the cookie path, or allow changing the cookie name in the INI file. regards, -gordon Assaf Gordon wrote:
Hello,
A quick question:
If I recall correctly, it was possible to set the galaxy session cookie name with the "session_key" variable in "universe_wsgi.ini".
I'm not sure about that, but I think it was possible, because I'm running two instances (at least) from the same server, and I explicitly set the cookie names to by different.
Now it seems that the cookie is always "galaxysession" - was that changed recently, or am I missing something?
One reason that I ask: The "path" of the cookie is always hard-coded to "/" (probably in lib/galaxy/web/framework/__init__.py:set_cookie as the default parameter) - so when I run two galaxies from the same server (with different "prefix" filter) - they are now forced to share the same session cookie.
I think this is causing some history related problems in one of my servers: galaxy always thinks there is no active history selected. Example: 1. I click "list saved histories" 2. Select a history 3. The history pane is updated. 4. I click on "refresh" history 5. a new, "unnamed history" is created, without any datasets.
The log shows error like: alaxy.web.framework DEBUG 2010-04-04 23:48:39,512 Error: this request returned None from get_history(): http://rave.cshl.edu/devglx/history/list
Any ideas ?
Thanks, -gordon _______________________________________________ galaxy-dev mailing list galaxy-dev@lists.bx.psu.edu http://lists.bx.psu.edu/listinfo/galaxy-dev
Assaf Gordon wrote:
Follow-up:
The immediate cause for this behavior was that I was having two instances of two galaxy opened at the same time (in two tabs in firefox). Those two instances were overwriting each other's "galaxysession" cookie, so it would happen that one would try to use the other's "session" cookie value due to automatic refresh in history pane (and the fact that they are both hosted on the same server).
Again, I'm (almost) certain it used to be possible to do that (having two instances open at the same time, not sharing a cookie).
The obvious workaround is "don't do that" - have only one instance open per server at any given time.
A more long-term solution might be to respect the "prefix" filter in the cookie path, or allow changing the cookie name in the INI file.
I implemented this in 3636:9678e1225651, but the difference is that a completely separate config option, 'cookie_path' can be set in the INI file, under the [app:] section. It's a little kludgey to have a second option which should probably be identical to the prefix in the filter, but due to the way Paste/PasteDeploy works, this is much simpler code. --nate
regards, -gordon
Assaf Gordon wrote:
Hello,
A quick question:
If I recall correctly, it was possible to set the galaxy session cookie name with the "session_key" variable in "universe_wsgi.ini".
I'm not sure about that, but I think it was possible, because I'm running two instances (at least) from the same server, and I explicitly set the cookie names to by different.
Now it seems that the cookie is always "galaxysession" - was that changed recently, or am I missing something?
One reason that I ask: The "path" of the cookie is always hard-coded to "/" (probably in lib/galaxy/web/framework/__init__.py:set_cookie as the default parameter) - so when I run two galaxies from the same server (with different "prefix" filter) - they are now forced to share the same session cookie.
I think this is causing some history related problems in one of my servers: galaxy always thinks there is no active history selected. Example: 1. I click "list saved histories" 2. Select a history 3. The history pane is updated. 4. I click on "refresh" history 5. a new, "unnamed history" is created, without any datasets.
The log shows error like: alaxy.web.framework DEBUG 2010-04-04 23:48:39,512 Error: this request returned None from get_history(): http://rave.cshl.edu/devglx/history/list
Any ideas ?
Thanks, -gordon _______________________________________________ galaxy-dev mailing list galaxy-dev@lists.bx.psu.edu http://lists.bx.psu.edu/listinfo/galaxy-dev
_______________________________________________ galaxy-dev mailing list galaxy-dev@lists.bx.psu.edu http://lists.bx.psu.edu/listinfo/galaxy-dev
participants (2)
-
Assaf Gordon
-
Nate Coraor