TheNewNormal/corectl

`corectl pull` fails while renaming image

Closed this issue · 9 comments

Please see the following issue: TheNewNormal/kube-solo-osx#49

corectl fails to rename the coreos image after the download with the following error:

Error: rename /tmp/coreos670171957/coreos_production_pxe.vmlinuz /Users/bruno/.coreos/images/stable/899.15.0/coreos_production_pxe.vmlinuz: cross-device link

as hard links are not allowed across volumes.

we do a move as it is computationaly way less expensive than a copy then delete original operation. reasonable move except if tmpdir and ~/.coreos on different volumes/devices. will try to detect/cover that corner case in very next release.

thanks, I'll look forward to the next release.

@BrunoBonacci, to validate...

do plz ...

git clone https://github.com/TheNewNormal/corectl.git
cd corectl
make 
./corectl pull 

if the ./corectl pull call works then this is fixed and i'll cut a new release :-)

thanks again for reporting and for your patience too...

I'm not familiar with the go building process/tools..

following your instruction with latest go version I get the following error

godep go build -o corectl -gcflags "" -ldflags " -w -s -X main.Version=v0.5.5-2-gc2999f-unreleased -X main.BuildDate=2016-05-12T16:34:06BST"
godep: [WARNING]: godep should only be used inside a valid go package directory and
godep: [WARNING]: may not function correctly. You are probably outside of your $GOPATH.
godep: [WARNING]:   Current Directory: /tmp/corectl
godep: [WARNING]:   $GOPATH: /workspace/go/golibs/
godep: WARNING: Go version (go1.6) & $GO15VENDOREXPERIMENT= wants to enable the vendor experiment, but disabling because a Godep workspace (Godeps/_workspace) exists
pull.go:29:2: cannot find package "github.com/TheNewNormal/corectl/image" in any of:
    /usr/local/go/src/github.com/TheNewNormal/corectl/image (from $GOROOT)
    /tmp/corectl/Godeps/_workspace/src/github.com/TheNewNormal/corectl/image (from $GOPATH)
    /workspace/go/golibs/src/github.com/TheNewNormal/corectl/image
run.go:32:2: cannot find package "github.com/TheNewNormal/corectl/uuid2ip" in any of:
    /usr/local/go/src/github.com/TheNewNormal/corectl/uuid2ip (from $GOROOT)
    /tmp/corectl/Godeps/_workspace/src/github.com/TheNewNormal/corectl/uuid2ip (from $GOPATH)
    /workspace/go/golibs/src/github.com/TheNewNormal/corectl/uuid2ip
godep: go exit status 1
make: *** [corectl] Error 1

mkdir -p /workspace/go/golibs/src/github.com/TheNewNormal/

mv /tmp/corectl /workspace/go/golibs/src/github.com/TheNewNormal/corectl

cd /workspace/go/golibs/src/github.com/TheNewNormal/corectl

make should now work. i hope

Hi, thanks for the help with the go build process.

After compiling from the source I still get the same errror:

$ ./corectl pull
[corectl] downloading and verifying alpha/1045.0.0
32.22 MB / 32.22 MB [=====================================================================================================================================================] 100.00 %
[corectl] SHA512 hash for coreos_production_pxe.vmlinuz OK
247.77 MB / 247.77 MB [===================================================================================================================================================] 100.00 %
[corectl] SHA512 hash for coreos_production_pxe_image.cpio.gz OK
Error: rename /var/folders/fg/xv5l7gd96d7gssfwzc7mqp900000gn/T/coreos446695276/coreos_production_pxe.vmlinuz /Users/bruno/.coreos/images/alpha/1045.0.0/coreos_production_pxe.vmlinuz: cross-device link

Usage:
  corectl pull [flags]

Aliases:
  pull, get, fetch

Flags:
      --channel string   CoreOS channel (default "alpha")
  -f, --force            forces rebuild of local image, if already present
  -h, --help             help for pull
      --version string   CoreOS version (default "latest")
  -w, --warmup           ensures that all channels are on their latest versions

Global Flags:
      --debug   adds extra verbosity, and options, for debugging purposes and/or power users

All flags can also be configured via upper-case environment variables prefixed with "COREOS_"
For example, "--debug" => "COREOS_DEBUG"

@BrunoBonacci

git pull -f; make; ./corectl pull again plz. hopefully this time all angles ironed 🙏

test passed ! thx

GREAT to hear! sorry the lag. will coin 0.5.6 in a bit.

THANKS again for your patience!