Git Product home page Git Product logo

beaker-vagrant's People

Contributors

bastelfreak avatar dakta avatar dan33l avatar dependabot[bot] avatar ekohl avatar ericwilliamson avatar genebean avatar highb avatar justinstoller avatar kevpl avatar lmayorga1980 avatar op-ct avatar puppetlabs-jenkins avatar rishijavia avatar smcelmurry avatar traylenator avatar trevor-vaughan avatar treydock avatar tvpartytonight avatar yachub avatar

Stargazers

 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

beaker-vagrant's Issues

rsync_to uses incorrect port when using Beaker with vagrant

Using beaker with beaker-vagrant versions 0.6.7 and above, when I call rsync_to it attempts to connect to the guest on port 2222. This fails as the guest is not listening on that port.

Here is a typical error:

rsync: localhost:/data/ to [email protected]:/data {:ignore => ["spec", "tests", ".git", ".vagrant", "vagrant"]}
rsync returned #<Rsync::Result:0x000055fcd247dd60 @raw="ssh: connect to host 10.255.137.136 port 2222: Connection refused\r\nrsync: connection unexpectedly closed (0 bytes received so far) [sender]\nrsync error: unexplained error (code 255) at io.c(228) [sender=3.2.3]\n", @exitcode=255>

Note, vagrant is forwarding port 22 on the guest to 2222 on the host so rsync_to could successfully connect to localhost port 2222, but not 10.255.137.136 port 2222.

This problem only occurs when using beaker-vagrant versions higher than 0.6.7. I believe the port to use is determined from the ssh config (https://github.com/voxpupuli/beaker/blob/master/lib/beaker/host.rb#L579) so is it possible that this commit in beaker-vagrant has introduced a bug? 5cd6320

(BKR-1697) Fix libvirt support

The information below is being transferred from Jira:

Envrionment
Followed this blog post for environment setup

And then ran export BEAKER_HYPERVISOR=vagrant_libvirt

After implementing the following code changes I was able to get the beaker nodes to work as intended with libvirt.

Suggested code changes:
lib/beaker/hypervisor/vagrant_libvirt.rb

def private_network_generator(host)
  unless host['dhcp_ip'].nil? || host['dhcp_ip'].empty?
    dhcp_ip = host['dhcp_ip']
  else
    dhcp_ip = "172.28.128.0"
  end
  private_network_string = "    v.vm.network :private_network, :type => \"dhcp\", :libvirt__network_address => \"#{dhcp_ip}\"\n"
end

and

def shell_provisioner_generator(provisioner_config)
  unless provisioner_config.nil?
    shell_provisioner_string = "    v.vm.provision 'shell', :inline => 'ip route del default', :run => 'always'\n"
  else
    shell_provisioner_string = "    v.vm.provision 'shell', :inline => 'ip route del default', :run => 'always'\n"
  end
end

Description

beaker-vagrant's libvirt support was missing handling networking information. It should defer out to the defaults specified in the vagrant-libvirt plugin if no options are supplied in the nodeset.

Vagrant-libvirt functions differently than the VirtualBox defaults in that it can build a private network via Libvirt's internal private DHCP settings, and then it will establish an IP Masquerade to forward out the VM's traffic to the internet.

Also, the vagrant-libvirt plugin will handle the networking at the time of provisioning and updates to the Libvirt VM's, therefore the Vagrantfile should delete the default routes and let the plugin fix everything up.

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.