Fix vagrant install
--- tests/example-provider ‹develop* ⁇› » vagrant up pixelated Bringing machine 'pixelated' up with 'libvirt' provider... ==> pixelated: Creating image (snapshot of base box volume). ==> pixelated: Creating domain with the following settings... ==> pixelated: -- Name: example-provider_pixelated ==> pixelated: -- Domain type: kvm ==> pixelated: -- Cpus: 1 ==> pixelated: -- Memory: 1536M ==> pixelated: -- Management MAC: ==> pixelated: -- Loader: ==> pixelated: -- Base box: LEAP/jessie ==> pixelated: -- Storage pool: default ==> pixelated: -- Image: /home/varac/vagrant/storagepool/example-provider_pixelated.img (10G) ==> pixelated: -- Volume Cache: default ==> pixelated: -- Kernel: ==> pixelated: -- Initrd: ==> pixelated: -- Graphics Type: vnc ==> pixelated: -- Graphics Port: 5900 ==> pixelated: -- Graphics IP: 127.0.0.1 ==> pixelated: -- Graphics Password: Not defined ==> pixelated: -- Video Type: cirrus ==> pixelated: -- Video VRAM: 9216 ==> pixelated: -- Keymap: en-us ==> pixelated: -- TPM Path: ==> pixelated: -- INPUT: type=mouse, bus=ps2 ==> pixelated: -- Command line : ==> pixelated: Creating shared folders metadata... ==> pixelated: Starting domain. ==> pixelated: Waiting for domain to get an IP address... ==> pixelated: Waiting for SSH to become available... pixelated: pixelated: Vagrant insecure key detected. Vagrant will automatically replace pixelated: this with a newly generated keypair for better security. pixelated: pixelated: Inserting generated public key within guest... pixelated: Removing insecure key from the guest if it's present... pixelated: Key inserted! Disconnecting and reconnecting using new SSH key... ==> pixelated: Forwarding ports... ==> pixelated: 443 (guest) => 4443 (host) (adapter eth0) ==> pixelated: 8080 (guest) => 8080 (host) (adapter eth0) ==> pixelated: 4430 (guest) => 4430 (host) (adapter eth0) ==> pixelated: Configuring and enabling network interfaces... /home/varac/.vagrant.d/gems/gems/vagrant-libvirt-0.0.33/lib/vagrant-libvirt/action/prepare_nfs_settings.rb:80:in `ping': Object#timeout is deprecated, use Timeout.timeout instead. ==> pixelated: Exporting NFS shared folders... ==> pixelated: Preparing to edit /etc/exports. Administrator privileges will be required... [sudo] password for varac: ● nfs-server.service - NFS server and services Loaded: loaded (/lib/systemd/system/nfs-server.service; enabled; vendor preset: enabled) Active: active (exited) since Fri 2016-09-09 18:01:43 CEST; 3 days ago Main PID: 3118 (code=exited, status=0/SUCCESS) Tasks: 0 Memory: 0B CPU: 0 CGroup: /system.slice/nfs-server.service Sep 09 18:01:43 rocinante systemd[1]: Starting NFS server and services... Sep 09 18:01:43 rocinante systemd[1]: Started NFS server and services. ==> pixelated: Mounting NFS shared folders... ==> pixelated: Running provisioner: shell... pixelated: Running: inline script ==> pixelated: Running provisioner: puppet... ==> pixelated: Running Puppet with install-platform.pp... ==> pixelated: Info: Loading facts ==> pixelated: Info: Loading facts ==> pixelated: Info: Loading facts ==> pixelated: Info: Loading facts ==> pixelated: Info: Loading facts ==> pixelated: Info: Loading facts ==> pixelated: Info: Loading facts ==> pixelated: Info: Loading facts ==> pixelated: Notice: Compiled catalog for leap-jessie.local in environment production in 0.92 seconds ==> pixelated: Info: Applying configuration version '1473751710' ==> pixelated: Notice: /Stage[main]/Main/File[/srv/leap]/ensure: created ==> pixelated: Notice: /Stage[main]/Main/File[/srv/leap/configuration]/ensure: created ==> pixelated: Notice: /Stage[main]/Common::Moduledir/File[/var/lib/puppet/modules]/ensure: created ==> pixelated: Notice: /Stage[main]/Apt/Apt::Apt_conf[02show_upgraded]/File[/etc/apt/apt.conf.d/02show_upgraded]/ensure: defined content as '{md5}f8b9fbb99496bc2d919bb757b9819540' ==> pixelated: Info: /Stage[main]/Apt/Apt::Apt_conf[02show_upgraded]/File[/etc/apt/apt.conf.d/02show_upgraded]: Scheduling refresh of Exec[update_apt] ==> pixelated: Info: Computing checksum on file /etc/apt/sources.list ==> pixelated: Info: /Stage[main]/Apt/File[/etc/apt/sources.list]: Filebucketed /etc/apt/sources.list to puppet with sum 8db38c0bcab6cca6df885f42bd3e7877 ==> pixelated: Notice: /Stage[main]/Apt/File[/etc/apt/sources.list]/content: content changed '{md5}8db38c0bcab6cca6df885f42bd3e7877' to '{md5}cca89227a70f22450bf99030b8666fd9' ==> pixelated: Info: /Stage[main]/Apt/File[/etc/apt/sources.list]: Scheduling refresh of Exec[update_apt] ==> pixelated: Notice: /Stage[main]/Apt::Preferences/File[/etc/apt/preferences]/ensure: created ==> pixelated: Notice: /Stage[main]/Apt/Apt::Apt_conf[03clean]/File[/etc/apt/apt.conf.d/03clean]/ensure: defined content as '{md5}9c94d212b6be1a8a08d1facc24424f8b' ==> pixelated: Info: /Stage[main]/Apt/Apt::Apt_conf[03clean]/File[/etc/apt/apt.conf.d/03clean]: Scheduling refresh of Exec[update_apt] ==> pixelated: Notice: /Stage[main]/Apt/Common::Module_dir[apt]/File[/var/lib/puppet/modules/apt]/ensure: created ==> pixelated: Notice: /Stage[main]/Apt/File[/var/cache/local]/ensure: created ==> pixelated: Notice: /Stage[main]/Apt/File[/var/cache/local/preseeding]/ensure: created ==> pixelated: Notice: /Stage[main]/Apt/Apt::Sources_list[backports]/File[/etc/apt/sources.list.d/backports.list]/ensure: created ==> pixelated: Info: /Stage[main]/Apt/Apt::Sources_list[backports]/File[/etc/apt/sources.list.d/backports.list]: Scheduling refresh of Exec[update_apt] ==> pixelated: Notice: /Stage[main]/Apt/Exec[update_apt]: Triggered 'refresh' from 4 events ==> pixelated: Notice: /Stage[main]/Ruby/Package[rake]/ensure: ensure changed 'purged' to 'present' ==> pixelated: Notice: /Stage[main]/Git::Base/Package[git]/ensure: ensure changed 'purged' to 'present' ==> pixelated: Notice: /Stage[main]/Ruby/Package[ruby-dev]/ensure: ensure changed 'purged' to 'present' ==> pixelated: Notice: /Stage[main]/Rubygems/File[/etc/gemrc]/ensure: defined content as '{md5}94d1b5f2048c1519439636f1583831f2' ==> pixelated: Notice: /Stage[main]/Bundler::Install/Package[bundler]/ensure: ensure changed 'purged' to 'present' ==> pixelated: Notice: /Stage[main]/Leap::Cli::Install/Vcsrepo[/srv/leap/cli]/ensure: Creating repository from present ==> pixelated: Notice: /Stage[main]/Leap::Cli::Install/Vcsrepo[/srv/leap/cli]/ensure: created ==> pixelated: Info: /Stage[main]/Leap::Cli::Install/Vcsrepo[/srv/leap/cli]: Scheduling refresh of Exec[install_leap_cli] ==> pixelated: Notice: /Stage[main]/Leap::Cli::Install/Exec[install_leap_cli]: Triggered 'refresh' from 1 events ==> pixelated: Notice: /Stage[main]/Main/File[/var/log/leap]/ensure: created ==> pixelated: Info: Creating state file /var/lib/puppet/state/state.yaml ==> pixelated: Notice: Finished catalog run in 88.58 seconds ==> pixelated: Running provisioner: shell... pixelated: Running: /tmp/vagrant-shell20160913-22338-17iq8z0.sh ==> pixelated: =============================================== ==> pixelated: configuring leap ==> pixelated: =============================================== ==> pixelated: sudo: /usr/local/bin/leap: command not found ==> pixelated: Generating public/private rsa key pair. ==> pixelated: Your identification has been saved in /home/vagrant/.ssh/id_rsa. ==> pixelated: Your public key has been saved in /home/vagrant/.ssh/id_rsa.pub. ==> pixelated: The key fingerprint is: ==> pixelated: 56:dd:dd:f8:2d:3d:95:d4:3b:8a:fe:e5:1f:52:27:9f vagrant@leap-jessie ==> pixelated: The key's randomart image is: ==> pixelated: +---[RSA 2048]----+ ==> pixelated: | ..| ==> pixelated: | . ..o+| ==> pixelated: | . . o.=| ==> pixelated: | . =o| ==> pixelated: | S . +o*| ==> pixelated: | . . ..++| ==> pixelated: | . . E.| ==> pixelated: | . + .| ==> pixelated: | .. .o| ==> pixelated: +-----------------+ ==> pixelated: sudo: /usr/local/bin/leap: command not found ==> pixelated: sudo: /usr/local/bin/leap: command not found ==> pixelated: sudo: /usr/local/bin/leap: command not found ==> pixelated: sudo: /usr/local/bin/leap: command not found ==> pixelated: /tmp/vagrant-shell: line 34: services/webapp.json: No such file or directory ==> pixelated: sudo: /usr/local/bin/leap: command not found ==> pixelated: Initialized empty Git repository in /home/vagrant/leap/configuration/.git/ ==> pixelated: [master (root-commit) ad5b68e] configured provider ==> pixelated: Committer: vagrant ==> pixelated: Your name and email address were configured automatically based ==> pixelated: on your username and hostname. Please check that they are accurate. ==> pixelated: You can suppress this message by setting them explicitly: ==> pixelated: ==> pixelated: git config --global user.name "Your Name" ==> pixelated: git config --global user.email you@example.com ==> pixelated: ==> pixelated: After doing this, you may fix the identity used for this commit with: ==> pixelated: ==> pixelated: git commit --amend --reset-author ==> pixelated: ==> pixelated: 2 files changed, 3 insertions(+) ==> pixelated: create mode 100644 Leapfile ==> pixelated: create mode 100644 files/nodes/node1/node1_ssh.pub ==> pixelated: sudo: /usr/local/bin/leap: command not found ==> pixelated: node init failed 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.
Turned out that rake install
failed while compiling nokogiri because gcc
was missing and rake still returns 0 (wtf???):
/var/lib/gems/2.1.0/gems/nokogiri-1.6.8/test/xslt/test_exception_handling.rb /var/lib/gems/2.1.0/gems/nokogiri-1.6.8/test_all Building native extensions. This could take a while... /usr/bin/ruby2.1 extconf.rb Using pkg-config version 1.1.7 checking if the C compiler accepts ... *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=/usr/bin/ruby2.1 --help --clean /usr/lib/ruby/2.1.0/mkmf.rb:456:in `try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. from /usr/lib/ruby/2.1.0/mkmf.rb:571:in `block in try_compile' from /usr/lib/ruby/2.1.0/mkmf.rb:522:in `with_werror' from /usr/lib/ruby/2.1.0/mkmf.rb:571:in `try_compile' from extconf.rb:138:in `nokogiri_try_compile' from extconf.rb:162:in `block in add_cflags' from /usr/lib/ruby/2.1.0/mkmf.rb:621:in `with_cflags' from extconf.rb:161:in `add_cflags' from extconf.rb:414:in `' ERROR: Error installing /srv/leap/cli/pkg/leap_cli-1.9.gem: ERROR: Failed to build gem native extension. Building has failed. See above output for more information on the failure. extconf failed, exit code 1 Gem files will remain installed in /var/lib/gems/2.1.0/gems/nokogiri-1.6.8 for inspection. Results logged to /var/lib/gems/2.1.0/extensions/x86_64-linux/2.1.0/nokogiri-1.6.8/gem_make.out root@leap-jessie:/srv/leap/cli# echo $? 0
I'd like to wait until we have a leap_cli gem build from develop that we can use here (#7996).
(from redmine: created on 2016-09-13, closed on 2016-11-08)