cloudfoundry-attic / bosh-init

bosh-init is a tool used to create and update the Director VM
Apache License 2.0
31 stars 33 forks source link

'invalid cross-device link' with `bosh export-release` #98

Closed voelzmo closed 7 years ago

voelzmo commented 7 years ago

Seems like the go CLI has a problem with the working directory being on a different disk than the users home directory. I saw this using export-release, there might be other points where that happens.

Steps to reproduce:

Expected:

Actual:

Downloading exported release:
  Moving to final destination:
    rename /home/vcap/.bosh/tmp/director-resource-9dcff854-a9d4-43b1-9b3c-63e15c1747b6576285208 /home/vcap/workspace/exported-releases/bosh-257.3-ubuntu-trusty-3262.2-20160818-120024-386166845.tgz: invalid cross-device link

Here is my current disk situation:

vcap@jumpbox:~/workspace/exported-releases$ lsblk
NAME   MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
vda    253:0    0  40G  0 disk
└─vda1 253:1    0  40G  0 part /
vdb    253:16   0  40G  0 disk
└─vdb1 253:17   0  40G  0 part /home/vcap/workspace
$ bosh-go -v
version 0.0.20-5fa85a8-2016-08-08T16:20:05Z
cppforlife commented 7 years ago

yup one possible solution is to have $HOME/.bosh/tmp directory that's used by the CLI.

cppforlife commented 7 years ago

ah nm we already do that. i think we need to add a new method to FileSystem that would be fine to copy during a rename.

dpb587-pivotal commented 7 years ago

Sort of related: https://www.pivotaltracker.com/story/show/128789021

ljfranklin commented 7 years ago

CPI team hit this as well during a create-release inside Concourse. Temporary workaround is to cp the release directory into $HOME then do create-release.

cppforlife commented 7 years ago

Fixed in https://github.com/cloudfoundry/bosh-cli/releases/tag/v0.0.51