upgrade fails over ftp

Bug #281325 reported by Jelmer Vernooij
Affects Status Importance Assigned to Milestone
Won't Fix

Bug Description

charis:~/foo% bzr upgrade ftp://rhonwyn/home/jelmer/foo
Authenticated as <email address hidden>
Format <RepositoryFormatKnit1> for ftp://rhonwyn/home/jelmer/foo/.bzr/ is deprecated - please use 'bzr upgrade' to get better performance
starting upgrade of ftp://rhonwyn/home/jelmer/bio/
making backup of tree history
bzr: ERROR: Generic path error: './branch/lock': error with list_dir: 550 No files found.

Tags: ftp

Related branches

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

This is a known problem with some FTP servers. Basically, instead of returning the empty list when there are no files in a directory, they instead raise a 550 error. The problem is that they strings are not generally helpful as they vary wildly based on the ftp server, and 550 can mean a lot of things. For example:
550 Permission denied
550 No such file

According to the second link 550 is supposed to be a permission error. And it is a bit rude of them to treat "no files in directory" as a permission problem.

Do you know the FTP server which is on "rhonwyn"?

A while back we encountered this with a 450 error. We have this code in "bzrlib/transport/ftp/__init__.py"
except ftplib.error_temp, e:
    # xs4all's ftp server raises a 450 temp error when listing an empty
    # directory. Check for that and just return an empty list in that
    # case. See bug #215522
    if str(e).lower().startswith('450 no files found'):
        mutter('FTP Server returned "%s" for nlst.'
               ' Assuming it means empty directory',
        return []

So either
a) You have a permission issue on that directory or
b) It is given a bogus error rather than just saying there isn't anything ther.

I'm also really surprised that .bzr/branch/lock is failing. As we never have a cause (that *I* know of) to list that directory. We *do* a list on .bzr/repository/obsolete_packs which is where this came up in the past.

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

We need more info about the specific trigger. A traceback would be nice. Also I would like documented what version of server is causing this. And is 550 a 'temp' error or a 'permanent' error?

Changed in bzr:
importance: Undecided → Medium
status: New → Incomplete
Revision history for this message
Martin Pool (mbp) wrote :

So it seems to me this is only incidentally to do with upgrade, and the real bug is: some ftp servers give error 550 to listdir if it's an empty directory, and we should handle that.

Changed in bzr:
status: Incomplete → Confirmed
Revision history for this message
Martin Pool (mbp) wrote :

Hash: SHA1

  tags ftp
  title "ftp server gives error listing empty directory"
Version: GnuPG v1.4.9 (GNU/Linux)


Revision history for this message
Jelmer Vernooij (jelmer) wrote :

I suspect this was running a Heimdal ftp server.

Jelmer Vernooij (jelmer)
tags: added: ftp upgrade
tags: removed: upgrade
Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
Jelmer Vernooij (jelmer)
Changed in brz:
status: New → Triaged
importance: Undecided → Low
tags: removed: check-for-breezy
Jelmer Vernooij (jelmer)
Changed in brz:
milestone: none → 3.0.0
status: Triaged → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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