"Fault 8002" when pushing a branch to an unregistered project

Bug #145894 reported by Andrew Bennetts
12
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Medium
James Henstridge

Bug Description

As reported on the Bazaar mailing list:

John Arbash Meinel wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> I just tried to push to the wrong location and I got this:
> % bzr push bzr+ssh://bazaar.launchpad.net/~bzr/bzr-cvsps-importer/trunk
> bzr: ERROR: Generic bzr smart protocol error: <Fault 8002: 'error'>
>
> versus
>
> % bzr push sftp://bazaar.launchpad.net/~bzr/bzr-cvsps-importer/trunk
> bzr: ERROR: Permission denied: "/~bzr/bzr-cvsps-importer/trunk": [Errno 13]
> Directories directly under a user directory must be named after a project name
> registered in Launchpad <https://launchpad.net/>.
>
> Fault 8002: doesn't really help figure out what I did wrong, but the sftp error
> message does.
>
> I know there was quite a bit of work done for the sftp server to report nice
> error messages. It would be nice if that could carry over to bzr+ssh.

This is almost certainly the fault of Launchpad, not the bzr+ssh code in Bazaar.
“Fault 8002” is probably an XML-RPC error on the server-side that isn't getting
caught and reported properly by bazaar.launchpad.net code.

-Andrew.

Tags: lp-code
Tim Penhey (thumper)
Changed in launchpad-bazaar:
assignee: nobody → thumper
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
James Henstridge (jamesh) wrote :

After investigating this, the <Fault 8002: 'error'> bit is what twisted.web.xmlrpc returns if a non-Fault exception gets raised. So in principle we can pass useful error messages back to the client, which is good.

After a bit of experimentation, the actual fault looks like a database integrity error. The XML-RPC method looks up the product, then creates a branch with that user, product and branch name.

Unfortunately, the product lookup returns None, so it ends up creating a +junk branch instead. On the next operation, it will look up the branch and find it doesn't exist and try to create it again. This then fails because the branch already exists (albeit in a different location).

The fix is to make the XML-RPC method return an appropriate fault if the product does not exist.

Changed in launchpad-bazaar:
assignee: thumper → jamesh
Revision history for this message
James Henstridge (jamesh) wrote :

Fix merged as r4985

Changed in launchpad-bazaar:
status: Confirmed → Fix Committed
Revision history for this message
James Henstridge (jamesh) wrote :

Included in latest rollout.

Changed in launchpad-bazaar:
status: Fix Committed → 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.