If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

delete account failed: ValueError: unknown url type: test-sync2...

VERIFIED FIXED

Status

Cloud Services
Server: Account Portal
VERIFIED FIXED
6 years ago
6 years ago

People

(Reporter: atoll, Assigned: telliott)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [qa-])

Attachments

(1 attachment, 2 obsolete attachments)

(Reporter)

Description

6 years ago
While trying to delete a user that apparently has been assigned to node test-sync2.s.m.c, I got this traceback:

2011-07-26 14:44:44,913 ERROR [accountportal] Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/services/util.py", line 495, in __call__
    return self.app(environ, start_response)
  File "/usr/lib/python2.6/site-packages/beaker/middleware.py", line 152, in __call__
    return self.wrap_app(environ, session_start_response)
  File "/usr/lib/python2.6/site-packages/webob/dec.py", line 147, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/python2.6/site-packages/webob/dec.py", line 208, in call_func
    return self.func(req, *args, **kwargs)
  File "/usr/lib/python2.6/site-packages/accountportal/wsgiapp.py", line 178, in __call__
    result = function(request, **params)
  File "/usr/lib/python2.6/site-packages/accountportal/controllers/account.py", line 182, in delete_account
    if not client.delete_data():
  File "/usr/lib/python2.6/site-packages/accountportal/clients/sync.py", line 100, in delete_data
    extra_headers=extra)
  File "/usr/lib/python2.6/site-packages/services/util.py", line 556, in get_url
    res = urllib2.urlopen(req, timeout=timeout)
  File "/usr/lib64/python2.6/urllib2.py", line 124, in urlopen
    return _opener.open(url, data, timeout)
  File "/usr/lib64/python2.6/urllib2.py", line 375, in open
    protocol = req.get_type()
  File "/usr/lib64/python2.6/urllib2.py", line 241, in get_type
    raise ValueError, "unknown url type: %s" % self.__original
ValueError: unknown url type: test-sync2.services.mozilla.com1.1/dbreqs742eyotoox542rchru6qmt57te/storage
(Reporter)

Comment 1

6 years ago
dn: uidNumber=27663,ou=users,dc=mozilla
primaryNode: weave:test-sync2.services.mozilla.com
syncNode: test-sync2.services.mozilla.com
(Assignee)

Comment 2

6 years ago
Node isn't wrapped with http:// and / so it's choking. We used to do that in the lib, and now we don't, since it doesn't come through a specific function.
(Assignee)

Comment 3

6 years ago
Created attachment 548623 [details] [diff] [review]
Forces the url into https and gets more cautious about the / at the end of the host
Assignee: nobody → telliott
Attachment #548623 - Flags: review?(rmiller)
(Assignee)

Comment 4

6 years ago
Created attachment 548631 [details] [diff] [review]
Forces the url into https and gets more cautious about the / at the end of the host

Better handling when there's no url
Attachment #548623 - Attachment is obsolete: true
Attachment #548623 - Flags: review?(rmiller)
Attachment #548631 - Flags: review?(rmiller)
(Assignee)

Comment 5

6 years ago
Created attachment 548637 [details] [diff] [review]
Now without the stray exception import
Attachment #548631 - Attachment is obsolete: true
Attachment #548631 - Flags: review?(rmiller)
Attachment #548637 - Flags: review?(rmiller)
Comment on attachment 548637 [details] [diff] [review]
Now without the stray exception import

Review of attachment 548637 [details] [diff] [review]:
-----------------------------------------------------------------

LGTM
Attachment #548637 - Flags: review?(rmiller) → review+
(Assignee)

Comment 7

6 years ago
Fixed in http://hg.mozilla.org/services/account-portal/rev/ea69539d71c5
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Status: RESOLVED → VERIFIED
Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.