Failure to 'bzr register-branch' when redirected to beta.launchpad.net

Bug #92097 reported by John A Meinel
20
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Undecided
James Henstridge

Bug Description

I don't know when this regression occurred, but currently when trying to do 'bzr register-branch' I get a Zope Exception.

It would seem that one of the apis has been made private or removed that is currently in use.

Here is the traceback:

bzr: ERROR: xmlrpclib.Fault: <Fault -1: "Unexpected Zope exception: Unauthorized: (<zope.app.publisher.xmlrpc.metaconfig
ure.BranchSetAPI object at 0x10c87c10>, '__call__', 'launchpad.AnyPerson')">

Traceback (most recent call last):
  File "/local/01/system/srv/bzr/public/mirrors/bzr.dev/bzrlib/commands.py", line 650, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/local/01/system/srv/bzr/public/mirrors/bzr.dev/bzrlib/commands.py", line 612, in run_bzr
    ret = run(*run_argv)
  File "/local/01/system/srv/bzr/public/mirrors/bzr.dev/bzrlib/commands.py", line 304, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/local/01/system/srv/bzr/public/mirrors/bzr.dev/bzrlib/plugins/launchpad/__init__.py", line 110, in run
    branch_object_url = rego.submit(service)
  File "/local/01/system/srv/bzr/public/mirrors/bzr.dev/bzrlib/plugins/launchpad/lp_registration.py", line 140, in submi
t
    return service.send_request(self._methodname, self._request_params())
  File "/local/01/system/srv/bzr/public/mirrors/bzr.dev/bzrlib/plugins/launchpad/lp_registration.py", line 107, in send_
request
    result = method(*method_params)
  File "/usr/lib/python2.4/xmlrpclib.py", line 1096, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib/python2.4/xmlrpclib.py", line 1383, in __request
    verbose=self.__verbose
  File "/usr/lib/python2.4/xmlrpclib.py", line 1147, in request
    return self._parse_response(h.getfile(), sock)
  File "/usr/lib/python2.4/xmlrpclib.py", line 1286, in _parse_response
    return u.close()
  File "/usr/lib/python2.4/xmlrpclib.py", line 744, in close
    raise Fault(**self._stack[0])
Fault: <Fault -1: "Unexpected Zope exception: Unauthorized: (<zope.app.publisher.xmlrpc.metaconfigure.BranchSetAPI objec
t at 0x10c87c10>, '__call__', 'launchpad.AnyPerson')">

bzr 0.16.0dev0 on python 2.4.3.final.0 (linux2)

Tags: lp-code
Revision history for this message
Björn Tillenius (bjornt) wrote : Re: [Bug 92097] Failure to 'bzr register-branch'

On Wed, Mar 14, 2007 at 12:08:44AM -0000, John A Meinel wrote:
> Public bug reported:
>
> I don't know when this regression occurred, but currently when trying to
> do 'bzr register-branch' I get a Zope Exception.
>
> It would seem that one of the apis has been made private or removed that
> is currently in use.
>
> Here is the traceback:
>

[snip]

> Fault: <Fault -1: "Unexpected Zope exception: Unauthorized: (<zope.app.publisher.xmlrpc.metaconfigure.BranchSetAPI objec
> t at 0x10c87c10>, '__call__', 'launchpad.AnyPerson')">

This could indicate that your username or password is incorrect, are you
sure you didn't mistype the password or something?

Could you try setting the BZR_LP_XMLRPC_URL to
https://xmlrpc.staging.launchpad.net/bazaar and try again? If that
doesn't work either, it'd be good if you could try using bzr
0.15candidate0 as well. I successfully registered a branch on staging
with that version.

Revision history for this message
John A Meinel (jameinel) wrote : Re: Failure to 'bzr register-branch'

Sorry, I posted the wrong traceback. That was my test with a bad password to make sure it was a different error.
This is what I get with the right password:

bzr: ERROR: xmlrpclib.Fault: <Fault -1: "Unexpected Zope exception: ForbiddenAttribute: ('publishTraverse', <canonical.launchpad.webapp.publisher.RedirectionView object at 0x131aa110>)">

Traceback (most recent call last):
  File "/local/01/system/srv/bzr/public/mirrors/bzr.dev/bzrlib/commands.py", line 650, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/local/01/system/srv/bzr/public/mirrors/bzr.dev/bzrlib/commands.py", line 612, in run_bzr
    ret = run(*run_argv)
  File "/local/01/system/srv/bzr/public/mirrors/bzr.dev/bzrlib/commands.py", line 304, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/local/01/system/srv/bzr/public/mirrors/bzr.dev/bzrlib/plugins/launchpad/__init__.py", line 110, in run
    branch_object_url = rego.submit(service)
  File "/local/01/system/srv/bzr/public/mirrors/bzr.dev/bzrlib/plugins/launchpad/lp_registration.py", line 140, in submit
    return service.send_request(self._methodname, self._request_params())
  File "/local/01/system/srv/bzr/public/mirrors/bzr.dev/bzrlib/plugins/launchpad/lp_registration.py", line 107, in send_request
    result = method(*method_params)
  File "/usr/lib/python2.4/xmlrpclib.py", line 1096, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib/python2.4/xmlrpclib.py", line 1383, in __request
    verbose=self.__verbose
  File "/usr/lib/python2.4/xmlrpclib.py", line 1147, in request
    return self._parse_response(h.getfile(), sock)
  File "/usr/lib/python2.4/xmlrpclib.py", line 1286, in _parse_response
    return u.close()
  File "/usr/lib/python2.4/xmlrpclib.py", line 744, in close
    raise Fault(**self._stack[0])
Fault: <Fault -1: "Unexpected Zope exception: ForbiddenAttribute: ('publishTraverse', <canonical.launchpad.webapp.publisher.RedirectionView object at 0x131aa110>)">

bzr 0.16.0dev0 on python 2.4.3.final.0 (linux2)
arguments: ['/home/jameinel/bin/bzr', 'reg', 'raise helpful errors for knit corruption.']

** please send this report to <email address hidden>

I'll try the alternative URL next.

Revision history for this message
John A Meinel (jameinel) wrote :

When I use:

BZR_LP_XMLRPC_URL=https://xmlrpc.staging.launchpad.net/bazaar

It succeeds without complaint. (Though it naturally doesn't add it to the running list of registered branches)

Revision history for this message
Björn Tillenius (bjornt) wrote : Re: [Bug 92097] Re: Failure to 'bzr register-branch'

On Wed, Mar 14, 2007 at 01:51:48PM -0000, John A Meinel wrote:
> Sorry, I posted the wrong traceback. That was my test with a bad password to make sure it was a different error.
> This is what I get with the right password:
>
> bzr: ERROR: xmlrpclib.Fault: <Fault -1: "Unexpected Zope exception:
> ForbiddenAttribute: ('publishTraverse',
> <canonical.launchpad.webapp.publisher.RedirectionView object at
> 0x131aa110>)">
>
> Traceback (most recent call last):
> File "/local/01/system/srv/bzr/public/mirrors/bzr.dev/bzrlib/commands.py", line 650, in run_bzr_catch_errors
> return run_bzr(argv)
> File "/local/01/system/srv/bzr/public/mirrors/bzr.dev/bzrlib/commands.py", line 612, in run_bzr
> ret = run(*run_argv)
> File "/local/01/system/srv/bzr/public/mirrors/bzr.dev/bzrlib/commands.py", line 304, in run_argv_aliases
> return self.run(**all_cmd_args)
> File "/local/01/system/srv/bzr/public/mirrors/bzr.dev/bzrlib/plugins/launchpad/__init__.py", line 110, in run
> branch_object_url = rego.submit(service)
> File "/local/01/system/srv/bzr/public/mirrors/bzr.dev/bzrlib/plugins/launchpad/lp_registration.py", line 140, in submit
> return service.send_request(self._methodname, self._request_params())
> File "/local/01/system/srv/bzr/public/mirrors/bzr.dev/bzrlib/plugins/launchpad/lp_registration.py", line 107, in send_request
> result = method(*method_params)
> File "/usr/lib/python2.4/xmlrpclib.py", line 1096, in __call__
> return self.__send(self.__name, args)
> File "/usr/lib/python2.4/xmlrpclib.py", line 1383, in __request
> verbose=self.__verbose
> File "/usr/lib/python2.4/xmlrpclib.py", line 1147, in request
> return self._parse_response(h.getfile(), sock)
> File "/usr/lib/python2.4/xmlrpclib.py", line 1286, in _parse_response
> return u.close()
> File "/usr/lib/python2.4/xmlrpclib.py", line 744, in close
> raise Fault(**self._stack[0])
> Fault: <Fault -1: "Unexpected Zope exception: ForbiddenAttribute: ('publishTraverse', <canonical.launchpad.webapp.publisher.RedirectionView object at 0x131aa110>)">

Oh, this traceback is a bit more helpful. My initial guess is that it
has something to do with you being in the Beta Tester team, so you get
re-directed to beta. I'm assigning it to James, since he wrote the
redirection code.

> I'll try the alternative URL next.

Could you please try setting BZR_LP_XMLRPC_URL to
https://xmlrpc.beta.launchpad.net/bazaar/ and try again? If that works
it's indeed the automatic redirection to beta that is the problem.

Changed in launchpad-bazaar:
assignee: nobody → jamesh
Revision history for this message
John A Meinel (jameinel) wrote : Re: Failure to 'bzr register-branch'

Check. Using:
BZR_LP_XMLRPC_URL=https://xmlrpc.beta.launchpad.net/bazaar/

does indeed succeed. And I can see the branch listed in my personal branch listing. So the registration has succeeded. I'll update the bug description.

Changed in launchpad-bazaar:
status: Unconfirmed → Confirmed
Revision history for this message
John A Meinel (jameinel) wrote :

Well, the workaround now seems to be broken.

If I do:
BZR_LP_XMLRPC_URL='https://beta.launchpad.net/bazaar/'

I get the error:
bzr: ERROR: xmlrpc protocol error connecting to https://beta.launchpad.net/bazaar/: 303 See Other

If I don't use anything, I get the original error:
bzr: ERROR: xmlrpclib.Fault: <Fault -1: "Unexpected Zope exception: ForbiddenAttribute: ('publishTraverse', <canonical.l
aunchpad.webapp.publisher.RedirectionView object at 0x2aaac286b910>)">

And if I use:
BZR_LP_XMLRPC_URL='http://beta.launchpad.net/bazaar/'

I get:
  File "/local/01/system/srv/bzr/public/mirrors/bzr.dev/bzrlib/plugins/launchpad/lp_registration.py", line 113, in send_
request
    raise NotImplementedError("should resend request to %s, but this isn't implemented"
NotImplementedError: should resend request to https://beta.launchpad.net/bazaar/, but this isn't implemented

Revision history for this message
James Henstridge (jamesh) wrote :

John: if you want to do XML-RPC, it needs to be against the XML-RPC hostname to be routed to the right place. For the beta site, that is xmlrpc.beta.launchpad.net -- not beta.launchpad.net.

Revision history for this message
Tim Penhey (thumper) wrote :

John, is this fixed now?

Revision history for this message
John A Meinel (jameinel) wrote :

I seem to be able to register a branch even though I'm part of the beta tester team. So it does, indeed, seem to be fixed.

Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 92097] Re: Failure to 'bzr register-branch' when redirected to beta.launchpad.net

On Mon, 2008-02-25 at 22:01 +0000, John A Meinel wrote:
> I seem to be able to register a branch even though I'm part of the beta
> tester team. So it does, indeed, seem to be fixed.

Thats because we use edge by default now :).

-Rob
--
GPG key available at: <http://www.robertcollins.net/keys.txt>.

Tim Penhey (thumper)
Changed in launchpad-bazaar:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.