bzr branch fails on a ssh mount of remote ext4 fs with Error 95 Operation Not Supported

Bug #1075108 reported by Dimiter Naydenov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
High
Unassigned
2.4
Fix Released
High
John A Meinel
2.5
Fix Released
High
Unassigned
2.6
Fix Released
High
Unassigned
bzr (Ubuntu)
Confirmed
High
Unassigned

Bug Description

I'm using a VM, running 12.10, upgraded from 12.04.1 (server). Using a bzr checkout dir on the VM and mounting that locally on the host with SSH from /home/USER/.gvfs/home/VMUSER/work/maas, symlinked to /home/USER/work/maas, then running bzr branch --switch on the host, while in the symlink dir. I get an Error 95 Operation not supported. And looking at the traceback in the log, it seems the fs reports erroneously supporting fdatasync, but actually fails later when bzr tries to do it.

Running the same command on the VM locally works.

Traceback (most recent call last):
  File ".../bzrlib/commands.py", line 920, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File ".../bzrlib/commands.py", line 1131, in run_bzr
    ret = run(*run_argv)
  File ".../bzrlib/commands.py", line 673, in run_argv_aliases
    return self.run(**all_cmd_args)
  File ".../bzrlib/commands.py", line 695, in run
    return self._operation.run_simple(*args, **kwargs)
  File ".../bzrlib/cleanup.py", line 136, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File ".../bzrlib/cleanup.py", line 166, in _do_with_cleanups
    result = func(*args, **kwargs)
  File ".../bzrlib/builtins.py", line 1493, in run
    source_branch=br_from)
  File ".../bzrlib/bzrdir.py", line 366, in sprout
    create_tree_if_local=create_tree_if_local)
  File ".../bzrlib/cleanup.py", line 132, in run
    self.cleanups, self.func, self, *args, **kwargs)
  File ".../bzrlib/cleanup.py", line 166, in _do_with_cleanups
    result = func(*args, **kwargs)
  File ".../bzrlib/bzrdir.py", line 416, in _sprout
    result_repo.fetch(source_repository, fetch_spec=fetch_spec)
  File ".../bzrlib/vf_repository.py", line 1267, in fetch
    find_ghosts=find_ghosts, fetch_spec=fetch_spec)
  File ".../bzrlib/decorators.py", line 218, in write_locked
    result = unbound(self, *args, **kwargs)
  File ".../bzrlib/vf_repository.py", line 2584, in fetch
    find_ghosts=find_ghosts)
  File ".../bzrlib/fetch.py", line 77, in __init__
    self.__fetch()
  File ".../bzrlib/fetch.py", line 104, in __fetch
    self._fetch_everything_for_search(search_result)
  File ".../bzrlib/fetch.py", line 132, in _fetch_everything_for_search
    stream, from_format, [])
  File ".../bzrlib/vf_repository.py", line 2050, in insert_stream
    hint = self.target_repo.commit_write_group()
  File ".../bzrlib/repository.py", line 633, in commit_write_group
    result = self._commit_write_group()
  File ".../bzrlib/repofmt/pack_repo.py", line 1727, in _commit_write_group
    hint = self._pack_collection._commit_write_group()
  File ".../bzrlib/repofmt/pack_repo.py", line 1612, in _commit_write_group
    self._new_pack.finish()
  File ".../bzrlib/repofmt/pack_repo.py", line 496, in finish
    want_fdatasync=self._pack_collection.config_stack.get('repository.fdatasync'))
  File ".../bzrlib/transport/__init__.py", line 237, in close
    self.fdatasync()
  File ".../bzrlib/transport/__init__.py", line 268, in fdatasync
    self.file_handle.flush()
IOError: [Errno 95] Operation not supported

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: bzr 2.5.1-0ubuntu2
ProcVersionSignature: Ubuntu 3.2.0-32.51-generic 3.2.30
Uname: Linux 3.2.0-32-generic x86_64
NonfreeKernelModules: fglrx
ApportVersion: 2.0.1-0ubuntu14
Architecture: amd64
Date: Mon Nov 5 11:16:01 2012
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release amd64 (20111012)
PackageArchitecture: all
SourcePackage: bzr
UpgradeStatus: Upgraded to precise on 2012-05-03 (186 days ago)

Related branches

Revision history for this message
Dimiter Naydenov (dimitern) wrote :
John A Meinel (jameinel)
Changed in bzr:
importance: Undecided → High
status: New → Confirmed
Changed in bzr (Ubuntu):
importance: Undecided → High
status: New → Confirmed
Martin Packman (gz)
description: updated
Revision history for this message
John A Meinel (jameinel) wrote :

Essentially, we just need a try/except IOError (OSError?) that traps ENOTSUP, as this is meant to be just advisory anyway. (We already just skip the operation if the file handle doesn't support it.)

summary: - bzr branch fails on a ssh mount of remove ext4 fs with Error 95
+ bzr branch fails on a ssh mount of remote ext4 fs with Error 95
Operation Not Supported
Revision history for this message
John A Meinel (jameinel) wrote :

fdatasync was introduced in bzr-2.4, so we'll just fix it there and merge the fix up.

Vincent Ladeuil (vila)
Changed in bzr:
status: Confirmed → Fix Released
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.