GithubHelp home page GithubHelp logo

vagrant-openshift's Introduction

OpenShift Origin Build Tools

vagrant openshift

This is a Vagrant 1.7.2+ plugin that adds vagrant commands and provisioners to build and test OpenShift Origin.

Note
This plugin requires Vagrant 1.7.2+
Note
Instructions below generally assume a Linux-like command line and may require modifications for other environments.

Features

Using with OpenShift v2

v2 (aka M4) is no longer supported on the master branch or in the published rubygems.org version of this plugin. You must checkout the v2 branch of this repository in order to use the plugin with v2 and follow the documentation there.

Installing

Like other plugins, this gem will be installed in your ~/.vagrant.d/gems/ directory.

From source

To work on the vagrant-openshift plugin, clone this repository and use Bundler to get the dependencies:

You MUST use bundler < = 1.10.5 or bundler = 1.12.5 when building this gem, as it is required by the vagrant gem.

$ gem install bundler -v '1.12.5'
$ bundle _1.12.5_

Compile using Rake:

$ bundle _1.12.5_ exec rake
From rubygems.org

Install the published version of this plugin:

$ vagrant plugin install vagrant-openshift

Getting started with OpenShift v3

This plugin works in concert with the OpenShift Origin Vagrantfile to build and update OpenShift development environments.

Clone the OpenShift Origin repositories

The upstream OpenShift Origin projects will be git-cloned locally under your GOPATH (you don’t need to have golang or other build requirements installed locally). These will be set as the git "upstream" remote. Projects you have forked into your github account will also have that account as the git "origin" remote.

Add your GOPATH if you don’t already have one for golang:

$ echo "export GOPATH=~/code" >> ~/.bash_profile   # ~/code can be any dir
$ source ~/.bash_profile
$ mkdir -p $GOPATH

Then clone the repositories into your GOPATH.

$ cd $GOPATH
$ vagrant origin-local-checkout -u <github username>
$ cd src/github.com/openshift/origin

Initialize local vagrant conf

Generate a .vagrant-openshift.json in your OpenShift Origin repo that you may modify later to match your vagrant requirements:

$ vagrant origin-init --stage inst --os (fedora|centos7|rhel7|rhelatomic7) <instance name>

Start the machine

VirtualBox

Running with the default VirtualBox provider:

Note
If you are trying to refresh an existing image, you’ll want to remove the current image with vagrant box list and vagrant box remove <box_name>
$ vagrant up --provider=virtualbox
Note
See Other Providers below for launching VMs from other providers.

Making Subsequent Changes

  • Building updated code from edits in your local repository clones:

$ vagrant sync-origin

For some providers, your local repositories are automatically synchronized to the remote VM. If not, the --source option can be used to do so before building.

In addition to the OpenShift binary itself, by default a number of component Docker images are built as well, which can take a long time. To rebuild only the OpenShift binary, use the --no-images option.

Running Tests

$ vagrant test-origin --all

Developer environment

To enable easy customization of the build environment, any files placed under \~/.openshiftdev/home.d will be copied to the vagrant user home directory. For example: ~/.openshiftdev/home.d/.bash_profile will be copied to .bash_profile on the vagrant VM.

Configuring Docker and Golang versions for tests

If the version of OpenShift that is being tested requires a version of Golang or Docker that is not default in the RPM streams for the operating system used for the image, vagrant-openshift allows for customization of the image.

To build a new image with the versions of Golang and Docker necessary, begin with an 'os' stage:

$ vagrant origin-init --stage os --os rhel7 --instance-type c4.xlarge "${instance_name}"

Then, you may provide the following information to customize your image:

  • URLs to repositories containing the desired Docker and/or Golang RPMs to use during the install

  • names of repositores already installed on the OS that you want to use during the install

  • versions of Golang and/or Docker to install

Any RPM repositories you add by providing URLs will only be enabled for the duration of the installation. Only the repositories you provide using URLs or those that you name explcitly will be enabled during the install.

For instance, some installation of OpenShift Origin could want custom Go and Docker versions, both of which must be installed from custom URLs. Furthermore, some of the Docker dependencies may have up-to-date versions in the RHEL streams, so the following commands would be used to configure the image base:

$ vagrant install-golang --golang.repourl=http://some.golang.rpm.repository.com/ \
                         --golang.version=1.6.2

$ vagrant install-docker --docker.repourl=http://some.docker.rpm.repository.com/ \
                         --docker.repo=oso-rhui-rhel-server-releases \
                         --docker.version=1.10.3

Other Providers

Your origin repo Vagrantfile can use other providers than the default VirtualBox provider for creating VMs. Provider configuration consults outside configuration files so that the repository Vagrantfile does not have to be modified in most cases. See the relevant provider section in the Vagrantfile to learn what parameters are available.

If you are starting with a plain operating system host image (which is likely to be the case) then you have a bit of setup to do to prepare your host for building and running after creation. Consult the Initial Setup section for details.

AWS/EC2

  • Install the latest vagrant-aws plugin.

Install plugin from rubygems:

$ vagrant plugin install vagrant-aws

Or follow the build steps to build from source.

You now need some AWS-specific configuration to specify which AMI to use.

  • Ensure your AWS credentials file is present at ~/.awscred; it should have the following entries filled in:

AWSAccessKeyId=<AWS API Key>
AWSSecretKey=<AWS API Secret>
AWSKeyPairName=<Keypair name>
AWSPrivateKeyPath=<SSH Private key>
  • Re-create your .vagrant-openshift.json file with updated AWS settings:

$ vagrant origin-init --stage inst --os (fedora|centos7|rhel7|rhelatomic7) <instance name>

The instance name will be applied as a tag and should generally be specific to you and OpenShift so that you can identify the VM among any others in your account. It will be stored in the config file.

The Red Hat OpenShift team shares an account that provides pre-built AMIs for the quickest startup possible, so this command will search for the latest version of that AMI. If your account doesn’t have this AMI, you’ll need to supply a base AMI in your repository’s .vagrant-openshift.json file under the aws.ami key.

  • Start the AWS machine

vagrant up --provider=aws
Tip
Be sure to rerun origin-init for each subsequent run of vagrant up --provider=aws to pick up the last built ami.
Note
Requires latest AWS provider.
Note
You can use the Vagrant-AMI plugin to create an AMI from a running AWS machine.

OpenStack

Install plugin from rubygems:

$ vagrant plugin install vagrant-openstack-plugin
Note
On some systems (e.g. mac) doing export NOKOGIRI_USE_SYSTEM_LIBRARIES=1 can help make the above command work.
  • Edit ~/.openstackcred and update your OpenStack credentials, endpoint and tenant name.

OSEndpoint=<OpenStack Endpoint URL, e.g. http://openshift.example.com:5000/v2.0/tokens>
OSUsername=<OpenStack Username>
OSAPIKey=<OpenStack Password>
OSKeyPairName=<Keypair name as registered in OpenStack>
OSPrivateKeyPath=<path to that SSH Private key>
OSTenant=<OpenStack Tenant/Project Name, see it at the top in OpenStack web UI>
OSFloatingIP=<specific floating ip or ':auto' if floating ip is desired>
OSFloatingIPPool=<specific pool or 'false' (to use first found) if floating ip is desired>
  • Edit .vagrant-openshift.json and update the openstack provider section. You’ll need to indicate at least the base image you’d like to start, as well as the user to access with.

  "openstack": {
    "image": "Fedora-Cloud-Base-20141203-21.x86_64",
    "ssh_user": "fedora"
  }
  • Start the OpenStack machine

vagrant up --provider=openstack
Note
Requires latest OpenStack provider.

Libvirt

  • If using a recent version of Fedora, you can install vagrant-libvirt directly using yum/dnf. Otherwise you will need to follow the vagrant plugin install instructions below.

sudo yum install vagrant-libvirt
  • Install the vagrant-libvirt plugin dependencies (only if sudo yum install vagrant-libvirt didn’t work)

sudo yum install libxslt-devel libxml2-devel libvirt-devel ruby-devel rubygems
  • Install the vagrant-libvirt plugin (only if sudo yum install vagrant-libvirt didn’t work)

vagrant plugin install vagrant-libvirt
Note
This may require modifying the system linker as described in this issue:
sudo alternatives --set ld /usr/bin/ld.gold
  • Add your user to the libvirt group - this gives authorization to connect to libvirtd

sudo usermod -a -G libvirt $USER
  • Log out and log in for the group change to take effect

  • Start the libvirt machine

vagrant up --provider=libvirt
Note
Requires latest libvirt provider
Managed

Running on other environments which are not managed by Vagrant directly.

  • Install the vagrant-managed-servers plugin

vagrant plugin install vagrant-managed-servers
  • Edit the Vagrantfile and update the managed section to update the IP address, User name and SSH key.

managed.server = "HOST or IP of machine"
override.ssh.username = "root"
override.ssh.private_key_path = "~/.ssh/id_rsa"
  • Connect to the manually managed machine

vagrant up --provider=managed
Note
Requires latest Managed provider

Initial Setup

Ideally you would be able to use an image with the operating system, dependencies, and OpenShift already installed so you can just start hacking. But at this time that is not available for all providers.

Images may be thought of as being at one of four stages:

  1. "os" - The base OS image (use a "minimal" one).

  2. "deps" - OpenShift runtime dependencies and build requirements are installed.

  3. "inst" - OpenShift code, images, and binaries are built and installed

You may want to create images that snapshot the output at each of these stages, as the rate of change and amount of time to create each is different.

After using vagrant up --provider=<provider> to start a host with only a basic operating system on it (Fedora 21+ or CentOS 7 should suffice), you will need to install the build tools and other dependencies for building and running OpenShift. The following vagrant commands should help with this:

$ vagrant build-origin-base
$ vagrant build-origin-base-images
$ vagrant install-origin-assets-base

Given this base foundation, you may want to vagrant package the result before proceeding to install OpenShift code.

$ vagrant install-origin
$ vagrant build-origin-base-images  # pick up updates if older "deps" base reused
$ vagrant build-origin --images
$ vagrant build-sti --binary-only

Testing openshift/origin-aggregated-logging or openshift/origin-metrics

Note
You will still need to clone the OpenShift Origin repo as above, in order to use the Vagrantfile and the contrib/vagrant directory. origin-aggregated-logging and origin-metrics currently have no vagrant support.

Clone the OpenShift Origin aggregated logging or metrics repositories

Use vagrant origin-local-checkout as above Clone the OpenShift Origin repositories, except use --repo origin-aggregated-logging:

$ cd $GOPATH
$ vagrant origin-local-checkout --repo origin-aggregated-logging -u <github username>
# run the remaining vagrant commands from $GOPATH/src/github.com/openshift/origin
$ pushd $GOPATH/src/github.com/openshift/origin

Initialize local vagrant conf

Same as above for origin - see Initialize local vagrant conf You must be in $GOPATH/src/github.com/openshift/origin to run this.

Start the machine

Same as above for origin - see Start the machine You must be in $GOPATH/src/github.com/openshift/origin to run this.

Making Subsequent Changes

  • Building updated code from edits in your local repository clones:

$ vagrant sync-origin-aggregated-logging

For some providers, your local repositories are automatically synchronized to the remote VM. If not, the --source option can be used to do so before building. You must be in $GOPATH/src/github.com/openshift/origin to run this.

Running Tests

$ vagrant test-origin-aggregated-logging [--env NAME=VAR] ...

You must be in $GOPATH/src/github.com/openshift/origin to run this.

Notice of Export Control Law

This software distribution includes cryptographic software that is subject to the U.S. Export Administration Regulations (the "EAR") and other U.S. and foreign laws and may not be exported, re-exported or transferred (a) to any country listed in Country Group E:1 in Supplement No. 1 to part 740 of the EAR (currently, Cuba, Iran, North Korea, Sudan & Syria); (b) to any prohibited destination or to any end user who has been prohibited from participating in U.S. export transactions by any federal agency of the U.S. government; or (c) for use in connection with the design, development or production of nuclear, chemical or biological weapons, or rocket systems, space launch vehicles, or sounding rockets, or unmanned air vehicle systems.You may not download this software or technical information if you are located in one of these countries or otherwise subject to these restrictions. You may not provide this software or technical information to individuals or entities located in one of these countries or otherwise subject to these restrictions. You are also responsible for compliance with foreign law requirements applicable to the import, export and use of this software and technical information.

vagrant-openshift's People

Contributors

0xmichalis avatar bparees avatar brenton avatar coreydaley avatar csrwng avatar danmcp avatar deads2k avatar derekwaynecarr avatar detiber avatar dgoodwin avatar dobbymoodge avatar ejemba avatar gabemontero avatar jcantrill avatar jhadvig avatar jwforres avatar kraman avatar liggitt avatar marun avatar mfojtik avatar mihaibuzgau avatar nhr avatar pmorie avatar pweil- avatar rhcarvalho avatar sdodson avatar smarterclayton avatar soltysh avatar sosiouxme avatar stevekuznetsov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vagrant-openshift's Issues

Add F22 libvirt box

I would be nice if we can have F22 (in beta now) box for libvirt for testing and development. This box already has Docker 1.6 and some other tweaks in. Also F22 should be available when we do GA. Another reason is that dnf speeds up the installation and provisioning a lot.

Should this repo really be archived?

  • "However, the OpenShift Origin community is now shifting, pun intended, to Minishift, which we'll talk about next." https://www.redhat.com/en/blog/five-openshift-development-environments-five-minutes
  • 0 commits in the last 12 months
  • seems to assume a AWS vagrant provider
  • The vagrant boxes referenced no longer exist
  • Even if they did, current versions of vagrant-libvirt are incompatible with vagrant-openshift (one indirectly wants fog-core 1.43.0, the other wants fog-core 1.45.0)

Please correct me if I'm wrong :)

network unreachable

I don't know if this is an issue or not

i pulled the Vagrant image and started it. Was able to login and start a project. But when trying to pull an image from docker hub i get network unrachable.

I have tried setting http_proxy in the vagrant and if i ssh into the machine i can pull and push images with docker inside the openshift-vagrant. But when using the openshift gui i cannot pull images.

image

i have tried setting the http_proxy in the docker-opts /etc/sysconfig/docker without any luck.

is this a known issue?

README should suggest `dnf install` for `vagrant-libvirt`

Installing vagrant-libvirt using the vagrant plugin installer is a PITA due to the linker troubles linked in the README. Following all of the steps written there (and in the vagrant-libvirt repo) did not help my issue, but F23 ships a vagrant-libvirt repo, so dnf install is the best way by far of getting the plugin. We should suggest that route for anyone with a distro that allows it.

libvirt provider hostname resolution not working

Host: Fedora 23
using vagrant with --provider=libvirt with

  "libvirt": {
    "box_name": "centos7_inst",
    "box_url": "http://mirror.openshift.com/pub/vagrant/boxes/openshift3/centos7_libvirt_inst.box"
  },

NOTE: Everything works fine with the aws provider, this is only an issue with libvirt/virtualbox.

After successfully running vagrant sync-origin, trying to run test-origin-aggregated-logging:

$ vagrant test-origin-aggregated-logging -d  --env OS_ROOT=/data/src/github.com/openshift/origin --env DEBUG_FAILURES=true

This will run the logging.sh script: https://github.com/openshift/origin-aggregated-logging/blob/master/hack/testing/logging.sh#L69 and

os::util::environment::setup_all_server_vars "origin-aggregated-logging/"
os::util::environment::use_sudo
reset_tmp_dir

os::log::start_system_logger

export KUBELET_HOST=$(hostname)

configure_os_server
start_os_server

start_os_server fails here:

wait_for_url "${API_SCHEME}://${API_HOST}:${API_PORT}/healthz" "apiserver: " 0.25 80

API_HOST is openshiftdev.local API_PORT is 10250

$ getent ahostsv4 openshiftdev.local
127.0.0.1       STREAM openshiftdev.local
127.0.0.1       DGRAM  
127.0.0.1       RAW    

$ grep 127.0.0.1 /etc/hosts
127.0.0.1   openshiftdev.local openshiftdev localhost localhost.localdomain localhost4 localhost4.localdomain4

$ netstat -nlt
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State      
tcp        0      0 192.168.121.216:4001    0.0.0.0:*               LISTEN     
tcp        0      0 192.168.121.216:10250   0.0.0.0:*               LISTEN     
tcp        0      0 127.0.0.1:6060          0.0.0.0:*               LISTEN     
tcp        0      0 127.0.0.1:53            0.0.0.0:*               LISTEN     
tcp        0      0 192.168.121.216:8053    0.0.0.0:*               LISTEN     
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN     
tcp        0      0 192.168.121.216:7001    0.0.0.0:*               LISTEN     
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN     
tcp        0      0 192.168.121.216:8443    0.0.0.0:*               LISTEN     
tcp6       0      0 :::22                   :::*                    LISTEN     
tcp6       0      0 ::1:25                  :::*                    LISTEN     

$ getent hosts 192.168.121.216
192.168.121.216 openshiftdev.local
172.17.0.1      openshiftdev.local

The wait_for_url curl is going to fail because it is trying to talk to the server running on localhost, but the server is only listening to the 192.168.121.216 address. I think the server should listen to all interfaces - but when I set --env ALL_IP_ADDRESSES=0.0.0.0 the script fails with

/data/src/github.com/openshift/origin/hack/util.sh: line 51: SERVER_HOSTNAME_LIST: unbound variable

Perhaps this isn't a bug - perhaps there is some documentation about how to set ALL_IP_ADDRESSES and SERVER_HOSTNAME_LIST to make this work properly?

equivalent of "up" "down" ?

assuming that sync-origin is meant to bring up a fully working openshift cluster based on @danmcp feedback in IRC....

the bug i am seeing is as follows...

  vagrant build-origin
  vagrant sync-origin
  vagrant try-restart-origin

the ensuing cluster has an empty config file.

[root@localhost vagrant]# cat /openshift.local.config/master/admin.kubeconfig
[root@localhost vagrant]#

maybe this is not a bug,

  • if not - how do i bring up a working cluster w/ nonempty kubeconfigs and a node+master running, using the plugin ?
  • In any case, I can't oc login b/c it thinks the config is empty, (another issue, is openshift reports this as no file found which ive created a pr to fix openshift/origin#7837)

I'd say we can close this issue ønce "vagrant" shows a plugin option which decribes something similar to kube up. I'm pretty sure we support such an option, just not sure what it is...

docker LVM storage update broke libvirt images

Summary of my understanding from dmcphers on IRC... when the switch to LVM storage happened a couple weeks ago, it meant that the Virtualbox images have multiple disks in the same image file. When they Virtualbox images are converted to libvirt/qemu ones the second disk (which is required for docker data/metadata) gets lost. So libvirt images end up with only one disk and no docker storage.

This gets us back to a working state, but should this be worked around in Origin or should the image generation actually get fixed?

diff --git a/Vagrantfile b/Vagrantfile
index b7fd2b8..32cf391 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -257,6 +257,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
       libvirt.cpus        = vagrant_openshift_config['cpus'].to_i
       # run on libvirt somewhere other than default:
       libvirt.uri         = ENV["VAGRANT_LIBVIRT_URI"] if ENV["VAGRANT_LIBVIRT_URI"]
+      libvirt.storage :file, :type => 'qcow2', :size => '5G'
     end if vagrant_openshift_config['libvirt']

     # ###################################
diff --git a/contrib/vagrant/provision-util.sh b/contrib/vagrant/provision-util.sh
index f3ace68..2be0414 100755
--- a/contrib/vagrant/provision-util.sh
+++ b/contrib/vagrant/provision-util.sh
@@ -69,6 +69,14 @@ os::provision::setup-hosts-file() {
   done
 }

+os::provision::setup-vgs() {
+  pvcreate /dev/vda
+  vgcreate docker-vg /dev/vda
+  lvcreate docker-vg -L 4.2G -T -n docker-data
+  lvcreate docker-vg -L 780M -T -n docker-metadata
+  rm -rf /var/lib/docker
+}
+
 os::provision::init-certs() {
   local config_root=$1
   local network_plugin=$2
@@ -194,6 +202,8 @@ os::provision::base-provision() {
   os::provision::setup-hosts-file "${MASTER_NAME}" "${MASTER_IP}" NODE_NAMES \
     NODE_IPS

+  os::provision::setup-vgs
+
   os::provision::install-pkgs

   # Avoid enabling iptables on the master since it will

dependencies issue

Hi,

I tried with vagrant 1.3.5 and 1.2.7, but it failed with the same error:

C:\Users\a512753\vagrant-openshift\pkg>vagrant plugin install vagrant-openshift-0.0.6.gem
Installing the 'vagrant-openshift-0.0.6.gem' plugin. This can take a few minutes...
C:/HashiCorp/Vagrant/embedded/lib/ruby/site_ruby/1.9.1/rubygems/dependency_installer.rb:153:in `gather_dependencies': Un
able to resolve dependencies: fog requires excon (~> 0.25.0) (Gem::DependencyError)
        from C:/HashiCorp/Vagrant/embedded/lib/ruby/site_ruby/1.9.1/rubygems/dependency_installer.rb:267:in `install'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.7/plugins/commands/plugin/action/install_gem.rb:49:in `
block in call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.7/plugins/commands/plugin/gem_helper.rb:42:in `block in
 with_environment'
        from C:/HashiCorp/Vagrant/embedded/lib/ruby/site_ruby/1.9.1/rubygems/user_interaction.rb:40:in `use_ui'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.7/plugins/commands/plugin/gem_helper.rb:41:in `with_env
ironment'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.7/plugins/commands/plugin/action/install_gem.rb:39:in `
call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/warden.rb:34:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.7/plugins/commands/plugin/action/bundler_check.rb:20:in
 `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/warden.rb:34:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/builder.rb:116:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/runner.rb:61:in `block in run'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/util/busy.rb:19:in `busy'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/runner.rb:61:in `run'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.7/plugins/commands/plugin/command/base.rb:17:in `action
'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.7/plugins/commands/plugin/command/install.rb:44:in `exe
cute'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.7/plugins/commands/plugin/command/root.rb:47:in `execut
e'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/cli.rb:46:in `execute'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/environment.rb:478:in `cli'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.7/bin/vagrant:84:in `<top (required)>'
        from C:/HashiCorp/Vagrant/bin//../embedded/../embedded/gems/bin/vagrant:23:in `load'
        from C:/HashiCorp/Vagrant/bin//../embedded/../embedded/gems/bin/vagrant:23:in `<main>'

Do you have any idea how to bypass this ?

"Cannot hard link" tar errors during sync-openshift

Are the following steps still the recommended flow?

https://github.com/openshift/vagrant-openshift#initialize-local-vagrant-conf

Basically, vagrant origin-init -> vagrant up -> vagrant sync-openshift (I notice it was just updated to sync-origin today, but I'm using the gem version so it's still sync-openshift atm). It used to work fine, but I've been getting the following errors lately during the sync-openshift step:

...
hack/build-images.sh took 628 seconds
hack/extract-release.sh
Makefile:169: recipe for target 'release' failed


Stderr from the command:

tar: ./openshift: Cannot hard link to ‘./kube-scheduler’: Operation not permitted
tar: ./oc: Cannot hard link to ‘./kubectl’: Operation not permitted
tar: ./kube-proxy: Cannot hard link to ‘./kube-scheduler’: Operation not permitted
tar: ./oadm: Cannot hard link to ‘./kube-scheduler’: Operation not permitted
tar: ./kube-controller-manager: Cannot hard link to ‘./kube-scheduler’: Operation not permitted
tar: ./kubelet: Cannot hard link to ‘./kube-scheduler’: Operation not permitted
tar: ./kube-apiserver: Cannot hard link to ‘./kube-scheduler’: Operation not permitted
tar: Exiting with failure status due to previous errors
make: *** [release] Error 2

This is after vagrant halt/destroying all VMs, updating origin repo and vagrant plugin (gem) to latest, etc. Host OS is Fedora 22, using Virtual Box as provider. Running the sync-openshift as non-root, no sudo. Here's the vagrant-openshift version and .vagrant-openshift.json file:

$ vagrant plugin list
vagrant-openshift (2.0.10)
vagrant-share (1.1.4, system)

$ cat .vagrant-openshift.json {
  "instance_name": "test3",
  "os": "fedora",
  "dev_cluster": false,
  "insert_key": true,
  "num_minions": 2,
  "cpus": 2,
  "memory": 2048,
  "rebuild_yum_cache": false,
  "instance_type": "t2.medium",
  "volume_size": 25,
  "no_synced_folders": false,
  "sync_to": "/data/src",
  "sync_from": "/home/durant/go/src",
  "virtualbox": {
    "box_name": "fedora_inst",
    "box_url": "https://mirror.openshift.com/pub/vagrant/boxes/openshift3/fedora_virtualbox_inst.box"
  },
  "libvirt": {
    "box_name": "fedora_inst",
    "box_url": "https://mirror.openshift.com/pub/vagrant/boxes/openshift3/fedora_libvirt_inst.box"
  },
  "aws": {
    "ami": "<AMI_ID>",
    "ami_region": "us-east-1",
    "ssh_user": "fedora"
  },
  "openstack": {
    "image": "<Fedora>",
    "ssh_user": "fedora"
  }

Issues with the .box and osc login

So when I get jhonce's box running as a box image I can login in thought the web console with the default admin username and password. But when I osc login I get:

spousty@localhost openshift-client$ ./osc login
F0422 22:44:47.070455 5263 login.go:40] Unexpected status received from server: request [&{Method:GET URL:https://localhost:8443/oauth/authorize?client_id=openshift-challenging-client&response_type=token Proto:HTTP/1.1 ProtoMajor:1 ProtoMinor:1 Header:map[] Body: ContentLength:0 TransferEncoding:[] Close:false Host:localhost:8443 Form:map[] PostForm:map[] MultipartForm: Trailer:map[] RemoteAddr: RequestURI: TLS:}] failed (401) 401 Unauthorized: A non-empty X-CSRF-Token header is required to receive basic-auth challenges

Please help me debug

spousty@localhost openshift-client$ ./osc version
osc v0.4.3
kubernetes v0.13.1-dev-641-gf057a25

Stuck at Configuring and enabling network interfaces

On windows, using latest installed vb, vagrant and vagrant-openshift, I got following output and stuck at last line. Cannot run vagrant ssh from another console to login.

x@laptop MINGW64 ~/vagrants/os
$ vagrant up --provider=virtualbox
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'openshift/origin-all-in-one'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'openshift/origin-all-in-one' is up to date...
==> default: Setting the name of the VM: openshift-origin
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
    default: Adapter 2: hostonly
==> default: Forwarding ports...
    default: 8443 (guest) => 8443 (host) (adapter 1)
    default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2222
    default: SSH username: vagrant
    default: SSH auth method: private key
    default: Warning: Remote connection disconnect. Retrying...
    default:
    default: Vagrant insecure key detected. Vagrant will automatically replace
    default: this with a newly generated keypair for better security.
    default:
    default: Inserting generated public key within guest...
    default: Removing insecure key from the guest if it's present...
    default: Key inserted! Disconnecting and reconnecting using new SSH key...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
    default: No guest additions were detected on the base box for this VM! Guest
    default: additions are required for forwarded ports, shared folders, host only
    default: networking, and more. If SSH fails on this machine, please install
    default: the guest additions and repackage the box to continue.
    default:
    default: This is not an error message; everything may continue to work properly,
    default: in which case you may ignore this message.
==> default: Configuring and enabling network interfaces...

libvirt provider requires 50 GB of disk space

The libvirt box for vagrant-openshift require a lot of disk space:

  • almost 6 GiB for the initial download of the compressed box file
  • 22 GiB for uncompressed qcow2 image in ~/.vagrant.d/boxes
  • 22 GiB for copy of uncompressed qcow2 image in /var/lib/libvirt/images

Why is the libvirt image so large? Is there any way to make the image smaller? My laptop has a 250 GB SSD with 40 GB disk space for the root partition.

I prefer to use libvirt because I'm usually running multiple VMs at the same time. The other VMs are all managed by libvirt. Due to hardware and software restrictions it is not possible to run Virtualbox and libvirt at the same time. tl;dr only one Kernel driver can utilize a CPU's hardware virtualization feature.

Unable to resolve dependencies

When installing the vagrant-openshfit gem (vagrant plugin install pkg/vagrant-openshift-0.0.9.gem) I receive the following error:
vagrant plugin install pkg/vagrant-openshift-0.0.9.gem

Installing the 'pkg/vagrant-openshift-0.0.9.gem --version '0.0.9'' plugin. This can take a few minutes...
/opt/vagrant/embedded/lib/ruby/2.0.0/rubygems/dependency_installer.rb:211:in gather_dependencies': Unable to resolve dependencies: fog requires excon (~> 0.28.0) (Gem::DependencyError) from /opt/vagrant/embedded/lib/ruby/2.0.0/rubygems/dependency_installer.rb:333:ininstall'
from /opt/vagrant/embedded/gems/gems/vagrant-1.4.1/plugins/commands/plugin/action/install_gem.rb:62:in block in call' from /opt/vagrant/embedded/gems/gems/vagrant-1.4.1/plugins/commands/plugin/gem_helper.rb:42:inblock in with_environment'
from /opt/vagrant/embedded/lib/ruby/2.0.0/rubygems/user_interaction.rb:40:in use_ui' from /opt/vagrant/embedded/gems/gems/vagrant-1.4.1/plugins/commands/plugin/gem_helper.rb:41:inwith_environment'
from /opt/vagrant/embedded/gems/gems/vagrant-1.4.1/plugins/commands/plugin/action/install_gem.rb:52:in call' from /opt/vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/warden.rb:34:incall'
from /opt/vagrant/embedded/gems/gems/vagrant-1.4.1/plugins/commands/plugin/action/bundler_check.rb:20:in call' from /opt/vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/warden.rb:34:incall'
from /opt/vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/builder.rb:116:in call' from /opt/vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/runner.rb:69:inblock in run'
from /opt/vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/util/busy.rb:19:in busy' from /opt/vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/runner.rb:69:inrun'
from /opt/vagrant/embedded/gems/gems/vagrant-1.4.1/plugins/commands/plugin/command/base.rb:17:in action' from /opt/vagrant/embedded/gems/gems/vagrant-1.4.1/plugins/commands/plugin/command/install.rb:27:inexecute'
from /opt/vagrant/embedded/gems/gems/vagrant-1.4.1/plugins/commands/plugin/command/root.rb:56:in execute' from /opt/vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/cli.rb:38:inexecute'
from /opt/vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/environment.rb:484:in cli' from /opt/vagrant/embedded/gems/gems/vagrant-1.4.1/bin/vagrant:127:in<top (required)>'
from /opt/vagrant/bin/../embedded/gems/bin/vagrant:23:in load' from /opt/vagrant/bin/../embedded/gems/bin/vagrant:23:in

'

Versions:
Vagrant 1.4.1
RubyGems 2.1.11
fog (1.19.0, 1.18.0)
excon (0.31.0, 0.28.0)

I don't fully understand why it isn't finding the system gems, as fog and excon are obviously installed.

Permissions not correctly set-up for `--provider libvirt`

When using the libvirt provider on a local Vagrant box, I got permission errors like:

$ vagrant test-origin --extended "conformance" -d --skip-check --skip-image-cleanup --image-registry ci.dev.openshift.redhat.com:5000
***************************************************
Running SKIP_IMAGE_CLEANUP=1 make...
hack/build-go.sh 
rm: cannot remove ‘/data/src/github.com/openshift/origin/_output/local/go/src/github.com/openshift/origin’: Permission denied

vagrant sync-origin fails with "cannot allocate memory"

Not sure if this is an issue on my side only. I was able to follow general README tutorial about how to setup and start vagrant-openshift and I got to the point of running vagrant sync-origin which failed. To me it seem it was because of low memory but I did not change any default configuration or settings. Everything was fresh from the git repo.

The following is the end of the full output, HTH:

[...]
Stdout from the command:

/data/src/github.com/openshift/origin ~
Performing origin release build with images...
rm -rf _output
OS_ONLY_BUILD_PLATFORMS="linux/amd64" hack/build-release.sh
++ Building release v1.3.0-alpha.2+4db1957
rm -rf _output
hack/build-cross.sh
++ Building go targets for linux/amd64: cmd/openshift cmd/oc


Stderr from the command:

Unable to find image 'openshift/origin-release:golang-1.6' locally
Trying to pull repository docker.io/openshift/origin-release ... 
golang-1.6: Pulling from docker.io/openshift/origin-release
0653bff3c5cf: Already exists
4ea1b779487e: Pulling fs layer
a19b386bace3: Pulling fs layer
e6fa9494024e: Pulling fs layer
737551bdfae9: Pulling fs layer
737551bdfae9: Waiting
4ea1b779487e: Verifying Checksum
4ea1b779487e: Download complete
4ea1b779487e: Pull complete
4ea1b779487e: Pull complete
737551bdfae9: Verifying Checksum
737551bdfae9: Download complete
a19b386bace3: Verifying Checksum
a19b386bace3: Download complete
a19b386bace3: Pull complete
a19b386bace3: Pull complete
e6fa9494024e: Verifying Checksum
e6fa9494024e: Download complete
e6fa9494024e: Pull complete
e6fa9494024e: Pull complete
737551bdfae9: Pull complete
737551bdfae9: Pull complete
Digest: sha256:c224d2bcf9513127e5b5507866d881c9c790becea3dfc80c05ffe635ae0392b0
Status: Downloaded newer image for docker.io/openshift/origin-release:golang-1.6
# github.com/openshift/origin/cmd/openshift
/usr/local/go/pkg/tool/linux_amd64/link: running gcc failed: fork/exec /usr/bin/gcc: cannot allocate memory
[ERROR] PID 18: hack/common.sh:325: `GOOS=${platform%/*} GOARCH=${platform##*/} go install "${goflags[@]:+${goflags[@]}}" "${platform_goflags[@]:+${platform_goflags[@]}}" -ldflags "${version_ldflags}" "${nonstatics[@]}"` exited with status 2.
[INFO]      Stack Trace: 
[INFO]        1: hack/common.sh:325: `GOOS=${platform%/*} GOARCH=${platform##*/} go install "${goflags[@]:+${goflags[@]}}" "${platform_goflags[@]:+${platform_goflags[@]}}" -ldflags "${version_ldflags}" "${nonstatics[@]}"`
[INFO]        2: hack/common.sh:264: os::build::internal::build_binaries
[INFO]        3: hack/build-cross.sh:27: os::build::build_binaries
[INFO]   Exiting with code 2.
[ERROR] PID 7: hack/common.sh:261: `local -a binaries=("$@")` exited with status 2.
[INFO]      Stack Trace: 
[INFO]        1: hack/common.sh:261: `local -a binaries=("$@")`
[INFO]        2: hack/build-cross.sh:27: os::build::build_binaries
[INFO]   Exiting with code 2.
make: *** [build-cross] Error 2
Error response from daemon: lstat /var/lib/docker/devicemapper/mnt/c442de6ed3ec00e07fac3b1414d8ba4669a303075fb2fa45962683a5da1b4f7e/rootfs/go/src/github.com/openshift/origin/_output/local/releases: no such file or directory
[ERROR] PID 8421: hack/build-release.sh:39: `docker cp "${container}:/go/src/github.com/openshift/origin/_output/local/releases" "${OS_OUTPUT}"` exited with status 1.
[INFO]      Stack Trace: 
[INFO]        1: hack/build-release.sh:39: `docker cp "${container}:/go/src/github.com/openshift/origin/_output/local/releases" "${OS_OUTPUT}"`
[INFO]   Exiting with code 1.
make: *** [release] Error 1

Check for this error, can it be the root cause of the failure?

/usr/local/go/pkg/tool/linux_amd64/link: running gcc failed: fork/exec /usr/bin/gcc: cannot allocate memory

Any idea about what should I try to change?

Parallelize `docker build`

The sync-geard takes a lot of time for 2 cartridges (ruby+centos), I think we should parallelize this operation or at least explore this possiblity.

Also the build should leave the build layers in place (iow. remove --rm from docker build) so the next sync will be faster and can re-use the previous layers.

vagrant origin-local-checkout does not support --branch

The --replace path doesn't support --branch, and also it assumes that each of the local repos has the same branch (which for the use case of doing a Jenkins test should not be the case). Specifically for test_pr_origin we don't need the other three repos, just the one.

vagrant sync-origin error

Seen in https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_origin_integration/8848/console:

+ vagrant sync-origin -s
/var/lib/jenkins/.vagrant.d/gems/gems/vagrant-openshift-3.0.8/lib/vagrant-openshift/action/prepare_ssh_config.rb:39:in `initialize': Text file busy - /var/lib/jenkins/.ssh/vagrant_openshift_ssh_override (Errno::ETXTBSY)
	from /var/lib/jenkins/.vagrant.d/gems/gems/vagrant-openshift-3.0.8/lib/vagrant-openshift/action/prepare_ssh_config.rb:39:in `open'
	from /var/lib/jenkins/.vagrant.d/gems/gems/vagrant-openshift-3.0.8/lib/vagrant-openshift/action/prepare_ssh_config.rb:39:in `call'
	from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in `call'
	from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builder.rb:116:in `call'
	from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/runner.rb:66:in `block in run'
	from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/util/busy.rb:19:in `busy'
	from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/runner.rb:66:in `run'
	from /var/lib/jenkins/.vagrant.d/gems/gems/vagrant-openshift-3.0.8/lib/vagrant-openshift/command/repo_sync_origin.rb:63:in `block in execute'
	from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/plugin/v2/command.rb:226:in `block in with_target_vms'
	from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/plugin/v2/command.rb:220:in `each'
	from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/plugin/v2/command.rb:220:in `with_target_vms'
	from /var/lib/jenkins/.vagrant.d/gems/gems/vagrant-openshift-3.0.8/lib/vagrant-openshift/command/repo_sync_origin.rb:61:in `execute'
	from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/cli.rb:42:in `execute'
	from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/environment.rb:301:in `cli'
	from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/bin/vagrant:174:in `<main>'

Per @stevekuznetsov request moved here from origin repo.

test-origin-image: merge PR with master?

I noticed that in lib/vagrant-openshift/command/test_origin_image.rb we just checkout a PR and run tests without attempting to merge it with master:

# Fetch refs from Github pull requests
git fetch --quiet --tags --progress #{source} +refs/pull/*:refs/remotes/origin/pr/*

# switch to the desired ref
git checkout #{ref}

# ...

make test TARGET=rhel7
# ...

I think we should be running tests against the result of merging the PR with master, so that we don't rely solely on the state of the tree in the proposed branch.

@bparees @mfojtik @danmcp thoughts?

We need 'centos' image imported in the Vagrant base image

The first time you do sync-geard and the cartridges are built, Docker will try to pull the 'centos' image from Docker index. This takes some time. I think we should have this image in the base Vagrant image already imported to speed up the initial build.

bundler version problems

imiell@rothko:/space/git/vagrant-openshift$ bundler install
/space/git/vagrant-openshift/vagrant-openshift.gemspec:31: warning: Insecure world writable dir /space in PATH, mode 040777
Updating git://github.com/mitchellh/vagrant.git
Fetching gem metadata from https://rubygems.org/.........
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Resolving dependencies...
Bundler could not find compatible versions for gem "bundler":
  In Gemfile:
    vagrant (>= 0) ruby depends on
      bundler (<= 1.9.4, >= 1.5.2) ruby

  Current Bundler version:
    bundler (1.10.5)
This Gemfile requires a different version of Bundler.
Perhaps you need to update Bundler by running `gem install bundler`?
Could not find gem 'bundler (<= 1.9.4, >= 1.5.2) ruby', which is required by gem 'vagrant (>= 0) ruby', in any of the sources.
imiell@rothko:/space/git/vagrant-openshift$ ruby --version
ruby 2.1.2p95 (2014-05-08) [x86_64-linux-gnu]

Any idea which version of bundler I require, and how to get it?

gem install bundler was run before this.

Missing artifacts after failed merge

The merge job failed, but providing no artifacts, from the log I see:

==> openshiftdev: Downloading logs
==> openshiftdev: Downloading artifacts from '/var/log/yum.log' to '/var/lib/jenkins/jobs/merge_pull_requests_origin/workspace/origin/artifacts/yum.log'
==> openshiftdev: Downloading artifacts from '/var/log/secure' to '/var/lib/jenkins/jobs/merge_pull_requests_origin/workspace/origin/artifacts/secure'
==> openshiftdev: Downloading artifacts from '/var/log/audit/audit.log' to '/var/lib/jenkins/jobs/merge_pull_requests_origin/workspace/origin/artifacts/audit.log'
==> openshiftdev: Downloading artifacts from '/tmp/origin/e2e/' to '/var/lib/jenkins/jobs/merge_pull_requests_origin/workspace/origin/artifacts/e2e/'
==> openshiftdev: Downloading artifacts from '/tmp/openshift-extended-tests/' to '/var/lib/jenkins/jobs/merge_pull_requests_origin/workspace/origin/artifacts/extended-tests/'
rsync: change_dir "/tmp/openshift-extended-tests" failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1518) [Receiver=3.0.9]
==> openshiftdev: Unable to download artifacts
==> openshiftdev: Downloading artifacts from '/tmp/openshift-cmd/' to '/var/lib/jenkins/jobs/merge_pull_requests_origin/workspace/origin/artifacts/cmd/'
==> openshiftdev: Downloading artifacts from '/data/src/github.com/openshift/origin/_output/local/releases/' to '/var/lib/jenkins/jobs/merge_pull_requests_origin/workspace/origin/artifacts/release/'
==> openshiftdev: Downloading artifacts from '/data/src/github.com/openshift/origin/assets/test/tmp/screenshots/' to '/var/lib/jenkins/jobs/merge_pull_requests_origin/workspace/origin/artifacts/screenshots/'
rsync: change_dir "/data/src/github.com/openshift/origin/assets/test/tmp/screenshots" failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1518) [Receiver=3.0.9]
==> openshiftdev: Unable to download artifacts

I haven't looked into the plugin code yet, but I'm assuming we're expecting all the logs to exists and if a failure happens down the road we fail the entire download logs step, which should not happen. We should try to get as many logs as we can. We should check that rsync command especially.

@danmcp fyi

if user does not have repos vagrant setup will fail.

[root@unused-16-138 <DEV> vagrant-stuff]# vagrant origin-local-checkout pruan-rht
Cloning into 'origin-server'...
Warning: Permanently added the RSA host key for IP address '192.30.252.131' to the list of known hosts.
ERROR: Repository not found.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
/root/.vagrant.d/gems/gems/vagrant-openshift-0.0.1/lib/vagrant-openshift/action/local_repo_checkout.rb:36:in `block in call': undefined method `ui' for #<Hash:0x00000001e19168> (NoMethodError)
    from /root/.vagrant.d/gems/gems/vagrant-openshift-0.0.1/lib/vagrant-openshift/action/local_repo_checkout.rb:29:in `each'
    from /root/.vagrant.d/gems/gems/vagrant-openshift-0.0.1/lib/vagrant-openshift/action/local_repo_checkout.rb:29:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/action/builder.rb:116:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/action/runner.rb:61:in `block in run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/util/busy.rb:19:in `busy'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/action/runner.rb:61:in `run'
    from /root/.vagrant.d/gems/gems/vagrant-openshift-0.0.1/lib/vagrant-openshift/command/local_repo_setup.rb:43:in `execute'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/cli.rb:38:in `execute'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/environment.rb:484:in `cli'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.3.1/bin/vagrant:96:in `<top (required)>'
    from /opt/vagrant/bin/../embedded/gems/bin/vagrant:23:in `load'
    from /opt/vagrant/bin/../embedded/gems/bin/vagrant:23:in `<main>'

vagrant test-origin timing out in 4 hours

While running origin extended tests on aws (vagrant test-origin --extended "core" --skip-check --skip-image-cleanup on f22), it is timing out every 4 hours:

Timeout occurred while running ssh/sudo command:
set -e
pushd /data/src/github.com/openshift//origin >/dev/null
export PATH=$GOPATH/bin:$PATH

echo '***************************************************'
echo 'Running TEST_REPORT_DIR=/tmp/openshift-extended-tests/junit/extended test/extended/core.sh...'
time TEST_REPORT_DIR=/tmp/openshift-extended-tests/junit/extended test/extended/core.sh
echo 'Finished TEST_REPORT_DIR=/tmp/openshift-extended-tests/junit/extended test/extended/core.sh'
echo '***************************************************'

popd >/dev/nul

I think its because timeout is hardcoded to 4 hours (60_60_4) in ./lib/vagrant-openshift/action/run_origin_tests.rb. Could we make it configurable or increase the timeout further?

Installation problems

Hi guys,
there are some problem when i try to setup the things i receive this errors

@user in ~/test_files/vagrant/origin/vagrant-openshift (master)
→ bundle install --path vendor/bundle
Resolving dependencies...
Using rake (10.3.2)
Using builder (3.2.2)
Using gyoku (1.1.1)
Using mini_portile (0.6.0)
Using nokogiri (1.6.2.1)
Using akami (1.2.2)
Using bundler (1.5.3)
Using timers (1.1.0)
Using celluloid (0.15.2)
Using ffi (1.9.3)
Using childprocess (0.5.3)
Using coderay (1.1.0)
Using erubis (2.7.0)
Using excon (0.28.0)
Using formatador (0.2.5)
Using mime-types (2.3)
Using multi_json (1.10.1)
Using net-ssh (2.9.1)
Using net-scp (1.1.2)
Using ruby-hmac (0.4.0)
Using fog (1.18.0)
Using gssapi (1.0.3)
Using httpclient (2.3.4.1)
Using rack (1.5.2)
Using httpi (0.9.7)
Using i18n (0.6.9)
Using rb-fsevent (0.9.4)
Using rb-inotify (0.9.4)
Using listen (2.7.5)
Using little-plugger (1.1.3)
Using log4r (1.1.10)
Using logging (1.8.2)
Using method_source (0.8.2)
Using nori (1.1.5)
Using slop (3.5.0)
Using pry (0.9.12.6)
Using rb-kqueue (0.2.2)
Using rubyntlm (0.1.1)
Using wasabi (1.0.0)
Using savon (0.9.5)
Using thor (0.19.1)
Using unf_ext (0.0.6)
Using unf (0.1.4)
Using uuidtools (2.1.4)
Using wdm (0.1.0)
Using winrm (1.1.3)
Using vagrant (1.6.3.dev) from git://github.com/mitchellh/vagrant.git (at master)
Using vagrant-aws (0.4.1)
Using xml-simple (1.1.3)
Using vagrant-openshift (1.0.5) from source at .
Your bundle is complete!
It was installed into ./vendor/bundle

@user in ~/test_files/vagrant/origin/vagrant-openshift (master)
→ bundle exec rake install
vagrant-openshift 1.0.5 built to pkg/vagrant-openshift-1.0.5.gem.
vagrant-openshift (1.0.5) installed.

@mignev in ~/test_files/vagrant/origin/vagrant-openshift (master)
→ bundle exec vagrant plugin list
Vagrant appears to be running in a Bundler environment. Your
existing Gemfile will be used. Vagrant will not auto-load any plugins
installed with vagrant plugin. Vagrant will autoload any plugins in
the 'plugins' group in your Gemfile. You can force Vagrant to take over
with VAGRANT_FORCE_BUNDLER.

Could not find gem 'vagrant (= 1.6.3.dev) ruby' in the gems available on this machine.
Run bundle install to install missing gems.

@user in ~/test_files/vagrant/origin/vagrant-openshift (master)

I'm trying to install it on MacOS.

`vagrant sync-origin` fails when SSH override is busy

+ vagrant sync-origin -s
/var/lib/jenkins/.vagrant.d/gems/gems/vagrant-openshift-3.0.8/lib/vagrant-openshift/action/prepare_ssh_config.rb:39:in `initialize': Text file busy - /var/lib/jenkins/.ssh/vagrant_openshift_ssh_override (Errno::ETXTBSY)
    from /var/lib/jenkins/.vagrant.d/gems/gems/vagrant-openshift-3.0.8/lib/vagrant-openshift/action/prepare_ssh_config.rb:39:in `open'
    from /var/lib/jenkins/.vagrant.d/gems/gems/vagrant-openshift-3.0.8/lib/vagrant-openshift/action/prepare_ssh_config.rb:39:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builder.rb:116:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/runner.rb:66:in `block in run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/util/busy.rb:19:in `busy'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/runner.rb:66:in `run'
    from /var/lib/jenkins/.vagrant.d/gems/gems/vagrant-openshift-3.0.8/lib/vagrant-openshift/command/repo_sync_origin.rb:63:in `block in execute'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/plugin/v2/command.rb:226:in `block in with_target_vms'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/plugin/v2/command.rb:220:in `each'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/plugin/v2/command.rb:220:in `with_target_vms'
    from /var/lib/jenkins/.vagrant.d/gems/gems/vagrant-openshift-3.0.8/lib/vagrant-openshift/command/repo_sync_origin.rb:61:in `execute'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/cli.rb:42:in `execute'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/environment.rb:301:in `cli'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/bin/vagrant:174:in `<main>'

@danmcp

Authentication failure

I attempted to create a local VM using the instructions found on https://www.openshift.org/vm/ as follows:

$ mkdir openshift
$ cd openshift/
$ vagrant init openshift/origin-all-in-one

I have the following versions of vagrant and virtualbox installed (from the standard Ubuntu 16.10 packages):

$ vagrant --version
Vagrant 1.8.5
$ vboxmanage --version
5.1.6_Ubuntur110634

I believe I have sufficient available memory:

$ free -h
              total        used        free      shared  buff/cache   available
Mem:            15G        5,1G        290M        352M         10G        9,8G

However, I am unable to establish a SSH session:

$ vagrant up --provider=virtualbox
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'openshift/origin-all-in-one'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'openshift/origin-all-in-one' is up to date...
==> default: Setting the name of the VM: openshift-origin
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
    default: Adapter 2: hostonly
==> default: Forwarding ports...
    default: 8443 (guest) => 8443 (host) (adapter 1)
    default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2222
    default: SSH username: vagrant
    default: SSH auth method: private key
    default: Warning: Connection reset. Retrying...
    default: Warning: Remote connection disconnect. Retrying...
    default: Warning: Connection reset. Retrying...
    default: Warning: Remote connection disconnect. Retrying...
    default: Warning: Connection reset. Retrying...
    default: Warning: Remote connection disconnect. Retrying...
    default: Warning: Connection reset. Retrying...
    default: Warning: Remote connection disconnect. Retrying...
    default: Warning: Connection reset. Retrying...
    default: 
    default: Vagrant insecure key detected. Vagrant will automatically replace
    default: this with a newly generated keypair for better security.
    default: 
    default: Inserting generated public key within guest...
    default: Removing insecure key from the guest if it's present...
    default: Key inserted! Disconnecting and reconnecting using new SSH key...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
Timed out while waiting for the machine to boot. This means that
Vagrant was unable to communicate with the guest machine within
the configured ("config.vm.boot_timeout" value) time period.

If you look above, you should be able to see the error(s) that
Vagrant had when attempting to connect to the machine. These errors
are usually good hints as to what may be wrong.

If you're using a custom box, make sure that networking is properly
working and you're able to connect to the machine. It is a common
problem that networking isn't setup properly in these boxes.
Verify that authentication configurations are also setup properly,
as well.

If the box appears to be booting properly, you may want to increase
the timeout ("config.vm.boot_timeout") value.
$ vagrant ssh
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).

origin-local-checkout doesn't work with branches

Neither of these commands result in the pre-flight-checks branch being checked out:

vagrant origin-local-checkout --repo openshift-ansible --user rhcarvalho --branch pre-flight-checks
vagrant origin-local-checkout --replace --repo openshift-ansible --user rhcarvalho --branch pre-flight-checks

Docker issue

I'm hitting this warning every time I use Docker in the VirtualBox VM (image from Monday IIRC):

$ docker run --rm -it centos:7
Usage of loopback devices is strongly discouraged for production use. Either use `--storage-opt dm.thinpooldev` or use `--storage-opt dm.no_warn_on_loop_devices=true` to suppress this warning.
[root@afbcbda53ec5 /]# 

It seems to be not just a warning but it is also preventing docker run and getting a bash shell.

@danmcp perhaps there's some configuration missing?

Startup error

Seeing this spinning up an environment:

/bin/chmod: cannot access ‘/openshift.local.config/master/admin*’: No such file or directory

`vagrant sync-origin` fails with stacktrace when no instance is up

Some commands detect this:

+ vagrant ssh -c 'sudo docker version'
==> openshiftdev: Instance is not created. Please run `vagrant up` first.

Our sync-origin, however, doesn't:

+ vagrant sync-origin -s --dont-install
/var/lib/jenkins/.vagrant.d/gems/gems/vagrant-openshift-3.0.7/lib/vagrant-openshift/action/prepare_ssh_config.rb:29:in `call': undefined method `[]' for nil:NilClass (NoMethodError)
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builder.rb:116:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/runner.rb:66:in `block in run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/util/busy.rb:19:in `busy'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/runner.rb:66:in `run'
    from /var/lib/jenkins/.vagrant.d/gems/gems/vagrant-openshift-3.0.7/lib/vagrant-openshift/command/repo_sync_origin.rb:63:in `block in execute'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/plugin/v2/command.rb:226:in `block in with_target_vms'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/plugin/v2/command.rb:220:in `each'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/plugin/v2/command.rb:220:in `with_target_vms'
    from /var/lib/jenkins/.vagrant.d/gems/gems/vagrant-openshift-3.0.7/lib/vagrant-openshift/command/repo_sync_origin.rb:61:in `execute'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/cli.rb:42:in `execute'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/environment.rb:301:in `cli'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/bin/vagrant:174:in `<main>'

/fyi @danmcp @dobbymoodge

vagrant modify-instance ArgumentError

seen here:

+ /usr/bin/vagrant modify-instance -r origin_test_pull_requests_origin_8994_terminate -s
/var/lib/jenkins/.vagrant.d/gems/gems/fog-1.26.0/lib/fog/aws/region_methods.rb:6:in `validate_aws_region': Unknown region: "<AMI_REGION>" (ArgumentError)
    from /var/lib/jenkins/.vagrant.d/gems/gems/fog-1.26.0/lib/fog/aws/compute.rb:476:in `initialize'
    from /var/lib/jenkins/.vagrant.d/gems/gems/fog-core-1.32.0/lib/fog/core/service.rb:115:in `new'
    from /var/lib/jenkins/.vagrant.d/gems/gems/fog-core-1.32.0/lib/fog/core/service.rb:115:in `new'
    from /var/lib/jenkins/.vagrant.d/gems/gems/fog-core-1.32.0/lib/fog/core/services_mixin.rb:16:in `new'
    from /var/lib/jenkins/.vagrant.d/gems/gems/fog-core-1.32.0/lib/fog/compute.rb:62:in `new'
    from /var/lib/jenkins/.vagrant.d/gems/gems/vagrant-aws-0.6.0/lib/vagrant-aws/action/connect_aws.rb:40:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builder.rb:116:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/runner.rb:66:in `block in run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/util/busy.rb:19:in `busy'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/runner.rb:66:in `run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/machine.rb:214:in `action_raw'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/machine.rb:191:in `block in action'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/environment.rb:516:in `lock'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/machine.rb:178:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/machine.rb:178:in `action'
    from /var/lib/jenkins/.vagrant.d/gems/gems/vagrant-aws-0.6.0/lib/vagrant-aws/provider.rb:32:in `state'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/machine.rb:490:in `state'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/machine.rb:141:in `initialize'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/vagrantfile.rb:79:in `new'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/vagrantfile.rb:79:in `machine'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/environment.rb:612:in `machine'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/plugin/v2/command.rb:168:in `block in with_target_vms'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/plugin/v2/command.rb:201:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/plugin/v2/command.rb:201:in `block in with_target_vms'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/plugin/v2/command.rb:200:in `map'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/plugin/v2/command.rb:200:in `with_target_vms'
    from /var/lib/jenkins/.vagrant.d/gems/gems/vagrant-openshift-3.0.3/lib/vagrant-openshift/command/modify_instance.rb:54:in `execute'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/cli.rb:42:in `execute'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/environment.rb:301:in `cli'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/bin/vagrant:174:in `<main>'
Build step 'Execute a set of scripts' marked build as failure
[BFA] Scanning build for known causes...
[BFA] No failure causes found
[BFA] Done. 0s
Finished: FAILURE

/cc @bparees @danmcp

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.