Openwhisk on-premise install error - openwhisk

I tried to install an openwhisk VM on a windows 10 machine.
Cloned the git repo, cd'd to openwhisk/tools/vagrant and run ./hello.
Many, many minutes later, I get the following error.
==> default: :index
==> default: :goPrepare
==> default: FAILED
==> default: FAILURE:
==> default: Build failed with an exception.
==> default:
==> default: * What went wrong:
==> default: Execution failed for task ':goPrepare'.
==> default: > Create symbolic link at /home/vagrant/openwhisk/bin/openwhisk-cli/.gogradle/project_gopath/src/github.com/apache/incubator-openwhisk-cli
failed
Though I can find the index task in build.gradle, I can not find the goPrepare task under openwhisk-cli or the parent directories.
I presume this command was run on the newly created VM as I get
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.
But running vagrant ssh does log me on to the VM.
Looking at the vagrantfile, there is
# Clone and Build CLI
echo "`date`: build-cli-start" >> /tmp/vagrant-times.txt
cd ${OPENWHISK_HOME}/bin
rm -rf openwhisk-cli
su vagrant -c 'git clone --depth=1 https://github.com/apache/incubator-openwhisk-cli.git openwhisk-cli'
cd openwhisk-cli
su vagrant -c './gradlew releaseBinaries'
echo "`date`: build-cli-end" >> /tmp/vagrant-times.txt
The log in /tmp shows build-cli-start but not build-cli-end.
The releaseBinaries task is in build.gradle but no links there.
Has anyone else come across this error? Does anyone know where the goPrepare task is?
Regards

Raised defect at https://github.com/apache/incubator-openwhisk/issues/3649.
Fixed in https://github.com/apache/incubator-openwhisk/pull/3651.
Updated git, run hello again and it works. Congrats to the openwhisk team for responding so quickly.

Related

Running chef-solo gives HTTPServerException 404 "Not Found

I am trying to provision VM by chef. I have written default.rb scripts and kept the files which i want to copy to the VM.
cookbook_file "/etc/hosts" do
source "etc_hosts"
mode 0644
owner "root"
group "root"
end
end
This fails with below error..
Error executing action `create` on resource 'cookbook_file[/etc/hosts]'
==> default: ================================================================================
==> default:
==> default: Net::HTTPServerException
==> default: ------------------------
==> default: 404 "Not Found"
The file is correctly placed.
When tried to run the chef script again this is success.
It fails on alternate runs. Anything which I may be missing ?
Assuming you didn't actually have that commented out, make sure you have the file content at files/etc_hosts in the cookbook.

Is there a CLI command to report if vagrant provisioning is complete?

While vagrant up is executing, any call to vagrant status will report that the machine is 'running', even if the provisioning is not yet complete.
Is there a simple command for asking whether the vagrant up call is done and the machine is fully-provisioned?
You could have your provision script write to a networked file and query that. Or you could vagrant ssh -c /check/for/something if there was a file or service to check agains. Your provision script could also ping out to a listener you set up.
You could also use the Vagrant log or debug output to check when provisioning is done.

Unable to launch vagrant-lxc

I'm trying to launch vagrant-lxc on Ubuntu 14.04. I'm using the latest Vagrant download (rather than the ancient version in the Debian repos).
vagrant plugin install vagrant-lxc
runs successfully, as does:
vagrant init fgrehm/precise64-lxc
I ran
sudo vagrant lxc sudoers
to handle the sudo issues mentioned here.
But when I run
vagrant up --provider=lxc
(both with and without sudo) the container doesn't load, spitting out this:
> Bringing machine 'default' up with 'lxc' provider...
==> default: Checking if box 'fgrehm/precise64-lxc' is up to date...
==> default: Setting up mount entries for shared folders...
default: /vagrant => /home/ubuntu
==> default: Starting container...
There was an error executing ["sudo", "/usr/local/bin/vagrant-lxc-wrapper", "lxc-start", "-d", "--name", "ubuntu_default_1456156125505_47833"]
For more information on the failure, enable detailed logging by
setting the environment variable VAGRANT_LOG to DEBUG
Here's the log output I'm getting (from /var/log/lxc/ ubuntu_default_1456156125505_47833.log):
lxc-start 1456158555.539 ERROR lxc_start - start.c:lxc_spawn:884 - failed initializing cgroup support
lxc-start 1456158555.568 ERROR lxc_start - start.c:__lxc_start:1121 - failed to spawn 'ubuntu_default_1456156125505_47833'
lxc-start 1456158555.568 ERROR lxc_start_ui - lxc_start.c:main:341 - The container failed to start.
lxc-start 1456158555.568 ERROR lxc_start_ui - lxc_start.c:main:343 - To get more details, run the container in foreground mode.
lxc-start 1456158555.568 ERROR lxc_start_ui - lxc_start.c:main:345 - Additional information can be obtained by setting the --logfile and --logpriority options.
Any ideas what I'm doing wrong?
Thanks,
Go into /home/<USERNAME>/.vagrant.d/boxes/fgrehm/precise64-lxc/.../lxc/lxc-config
file and
comment out:
lxc.pivotdir = lxc_putold
the do vigrant up again it should work!

How can I get a Vagrant provision shell script to successfully clone a mercurial repository?

I am trying to configure a virtual machine using Vagrant as a local development environment.
I would like the provision script to clone a Mercurial repository from Bitbucket within the guest machine.
In order to accomplish this I have added hg clone ssh://hg#bitbucket.org/myuser/myrepo in my provision shell script
I also added the flag config.ssh.forward_agent = true in my Vagrantfile.
However I keep getting the following error:
==> default: remote: Host key verification failed.
==> default: abort: no suitable response from remote hg!
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.
I've successfully set up SSH keys for my Bitbucket account on my host machine but for some reason they don't seem to be forwarded in the guest machine even though I've set the flag true.
My host machine is running on Windows 7 and the guest is running on Linux Trusty Tarh
Sincerely appreciate any tips on how I can accomplish this.
You need to add the host key of bitbucket to your known_hosts file. You could either do that manually, or try something like https://serverfault.com/questions/132970/can-i-automatically-add-a-new-host-to-known-hosts.
Hope that helps.

Vagrant provision fail with puppet

Hello i have generated a vm on http://vmg.slynett.com/.
The vm works fine but nothing is installed on it.
I don't know why vagrant provision fail.
vagrant provision
[default] Running provisioner: Vagrant::Provisioners::Shell...
stdin: is not a tty
Europe/Paris
Current default time zone: 'Europe/Paris'
Local time is now: Fri Jun 28 13:15:42 CEST 2013.
Universal Time is now: Fri Jun 28 11:15:42 UTC 2013.
[default] Running provisioner: Vagrant::Provisioners::Puppet...
[default] Running Puppet with /tmp/vagrant-puppet/manifests/base.pp...
stdin: is not a tty
Warning: Could not retrieve fact fqdn
Warning: Config file /etc/puppet/hiera.yaml not found, using Hiera defaults
Error: Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid resource type concat at /tmp/vagrant-puppet/modules-0/apache/manifests/init.pp:130 on node dev
Error: Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid resource type concat at /tmp/vagrant-puppet/modules-0/apache/manifests/init.pp:130 on node dev
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
cd /tmp/vagrant-puppet/manifests && puppet apply --modulepath '/tmp/vagrant-puppet/modules-0' /tmp/vagrant-puppet/manifests/base.pp --detailed-exitcodes || [ $? -eq 2 ]
I am on mac OS X 10.8.3, virtualbox 4.2.6, Vagrant 1.2.2
It looks like you're referring to the concat module from ripenaar/concat and an error like that is usually thrown when a resource isn't present (i.e. not installed or in your module path).
I solved this problem by adding the concat and file_concat puppet modules to the puppet module path. I usually have all needed puppet modules as git submodules in puppet/modules of the vagrant project, so to add the concat and file_concat module, I do:
git submodule add https://github.com/puppetlabs/puppetlabs-concat.git puppet/modules/concat
git submodule add https://github.com/electrical/puppet-lib-file_concat.git puppet/modules/file_concat
Note that the concat module is the official one from puppetlabs and the file_concat module is the one used in concat (it should be installed automatically, but this didn't seem to work for me and may be your problem as well).

Resources