ncabatoff / piinit

Initialize raspberry pi consul/nomad cluster
28 stars 3 forks source link

'vagrant up' is failing #1

Open veyalla opened 4 years ago

veyalla commented 4 years ago

Thanks for these instructions. I got an error when trying vagrant up:

    default: OK
    default: Hit:1 https://download.docker.com/linux/ubuntu xenial InRelease
    default: Hit:2 http://ppa.launchpad.net/gophers/archive/ubuntu xenial InRelease
    default: Get:3 http://security.ubuntu.com/ubuntu xenial-security InRelease [109 kB]
    default: Hit:4 http://archive.ubuntu.com/ubuntu xenial InRelease
    default: Get:5 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]
    default: Hit:6 http://ppa.launchpad.net/longsleep/golang-backports/ubuntu xenial InRelease
    default: Get:7 http://archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB]
    default: Fetched 325 kB in 1s (215 kB/s)
    default: Reading package lists...
    default: Reading package lists...
    default: Building dependency tree...
    default: Reading state information...
    default: unzip is already the newest version (6.0-20ubuntu1).
    default: curl is already the newest version (7.47.0-1ubuntu2.14).
    default: git is already the newest version (1:2.7.4-0ubuntu1.7).
    default: vim is already the newest version (2:7.4.1689-3ubuntu1.3).
    default: wget is already the newest version (1.17.1-1ubuntu1.5).
    default: jq is already the newest version (1.5+dfsg-1ubuntu0.1).
    default: golang-1.11-go is already the newest version (1.11.5+ppa-0ubuntu1~ppa2~ubuntu16.04.1).
    default: 0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
    default: /tmp ~
    default: Archive:  packer_1.3.4_linux_amd64.zip
    default:   inflating: packer
    default: ~
    default: # google.golang.org/api/option
    default: work/src/google.golang.org/api/option/option.go:153:14: undefined: grpc.RoundRobin
    default: work/src/google.golang.org/api/option/option.go:154:42: undefined: grpc.WithBalancer
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.
ncabatoff commented 4 years ago

Hi @veyalla, thanks for the bug report.

Looks like an upstream dependency changed and now requires a newer Go to build it. I've done the first part of the work to address this: I forked the upstream repo and setup a mechanism to publish binaries for it. Tomorrow I'll follow up and update this project to make use of that binary instead of building it in the vagrant guest.

veyalla commented 4 years ago

Amazing, thanks much!

ncabatoff commented 4 years ago

Should be fixed now - at least, I've done a vagrant destroy -f && vagrant up and could see everything running in the Prometheus targets page, and in the Consul services page.

veyalla commented 4 years ago

@ncabatoff Thanks, this got me past the failure, but now running into:

    default:
    default: Reading state information...
    default: unzip is already the newest version (6.0-20ubuntu1).
    default: curl is already the newest version (7.47.0-1ubuntu2.14).
    default: git is already the newest version (1:2.7.4-0ubuntu1.7).
    default: vim is already the newest version (2:7.4.1689-3ubuntu1.3).
    default: wget is already the newest version (1.17.1-1ubuntu1.5).
    default: jq is already the newest version (1.5+dfsg-1ubuntu0.1).
    default: golang-1.11-go is already the newest version (1.11.5+ppa-0ubuntu1~ppa2~ubuntu16.04.1).
    default: 0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
    default: /tmp /home/vagrant
    default: Archive:  packer_1.3.4_linux_amd64.zip
    default:   inflating: packer
    default: /home/vagrant
    default: Archive:  /tmp/go-getter_1.4.1_linux_amd64.zip
    default:   inflating: /usr/local/bin/go-getter
==> default: Running provisioner: make-pkgs (shell)...
    default: Running: /var/folders/fh/5kvnjjhn5qz5kyh05gl9hhc40000gn/T/vagrant-shell20200117-51155-xxfkcu.sh
    default: 2020/01/18 05:12:19 error hard linking downloads/consul-1.5.3-amd64/consul to bin/consul-1.5.3-amd64: link downloads/consul-1.5.3-amd64/consul bin/consul-1.5.3-amd64: operation not permitted

Does this work on macOS?

ncabatoff commented 4 years ago

Whoops, sorry about that. I've reproduced this issue by moving aside my packages directory. Apparently you can't do hard links from within virtualbox on a virtualbox shared folder. I usually run make packages from outside the VM because downloading is really slow within the VM for me, not sure why. Which is how I let this regression bug creep in.

I'll have a fix out this week. If you're impatient, you could install Go on your host machine and run make packages from the project root. Then the downloaded files will be seen by the stuff running in the VM via the shared folder, and won't run the problematic code.

I'm mostly using MacOS these days, so everything should "work" there, modulo this issue.

veyalla commented 4 years ago

Sounds good, thanks for the tip!