There should be a way to gracefully accept api calls for tokens when in RO mode
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical SSO provider |
Confirmed
|
High
|
Unassigned |
Bug Description
Bug Description:
I a recent Production RO mode db upgrade there was an outage for mumble. Mumble accesses SSO authorisation via api.
Currently when we go into read only mode the following happens when there is a call for a token via api
>>> from lazr.restfulcli
>>> from lazr.restfulcli
>>> basic = BasicHttpAuthor
>>> api = ServiceRoot(basic, 'https:/
>>> token = api.authenticat
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/
url, in_representation, http_method, extra_headers=
File "/usr/lib/
raise HTTPError(response, content)
lazr.restfulcli
Response headers:
---
connection: close
content-length: 4152
content-type: text/plain
date: Fri, 18 Feb 2011 17:15:49 GMT
server: Apache/2.2.14 (Ubuntu)
status: 500
x-powered-by: Zope (www.zope.org), Python (www.python.org)
---
Response body:
---
Attempted to insert while in read-only mode: 'INSERT INTO "oauth_token" ("consumer_id", "token", "token_secret", "name", "created_at", "updated_at") VALUES (%s, %s, %s, %s, %s, %s)' % ((255, 'mxbCEwqqyDSOKY
Traceback (most recent call last):
File "/usr/lib/
result = publication.
File "/usr/lib/
WebServiceP
File "/usr/lib/
return mapply(ob, request.
File "/usr/lib/
return debug_call(obj, args)
File "/usr/lib/
return obj(*args)
File "/usr/lib/
result = self.do_GET()
File "/usr/lib/
result = self.handleCust
File "/usr/lib/
return operation()
File "/usr/lib/
response = self.call(**values)
File "/usr/lib/
result = getattr(
File "/usr/lib/
return func(*args, **kwargs)
File "/usr/lib/
token = account.
File "/usr/lib/
token = consumer.
File "/usr/lib/
return super(RelatedMa
File "/usr/lib/
return self.get_
File "/usr/lib/
obj.
File "/usr/lib/
self.
File "/usr/lib/
result = manager.
File "/usr/lib/
return insert_
File "/usr/lib/
return query.execute_
File "/usr/lib/
cursor = super(InsertQuery, self).execute_
File "/usr/lib/
cursor.
File "/usr/lib/
return self.cursor.
File "/usr/lib/
{'command': command, 'sql': sql, 'params': params})
DatabaseError: Attempted to insert while in read-only mode: 'INSERT INTO "oauth_token" ("consumer_id", "token", "token_secret", "name", "created_at", "updated_at") VALUES (%s, %s, %s, %s, %s, %s)' % ((255, 'mxbCEwqqyDSOKY
---
OS:
64bif maverick
Browser:
n/a
Problem URL:
n/a
Steps To Reproduce:
1. Drop the SSO instance into RO mode
2. Use the python code above the error only substitute user userpass for your email login and password for SSO
3. In readonly the code give the above error, out of read only it passes fine.
Expected Result:
There should be away to obtain a token gracefully via api in read only mode or there should be an announcement made to warn that any of the api services that may not run while in read only mode and somehow show up in the applications.
Changed in canonical-identity-provider: | |
importance: | Undecided → High |
status: | New → Confirmed |
tags: | added: bug-1 |