Comments (18)
Were you using a vagrant build in vbox_create.sh
or was it a bare bones VirtualBox setup? We should be deleting the DHCP server in both cases in that script, but it'd help to know which code path to focus on.
from chef-bcpc.
That was with vbox_create.sh. I just installed CentOS 6.4 on my laptop, then installed VirtualBox 4.2 from Oracle's site, and then ran vbox_create.sh to generate the actual images.
from chef-bcpc.
Okay - then it sounds like you didn't have vagrant installed. I'll take a quick look, but @mihalis68 was taking care of the non-vagrant code path in that script.
from chef-bcpc.
Sorry, I'll try to clarify the issue: the vbox_create.sh script created the profiles for the boostrap node and for vm[1-3], and it did successfully start and build (with vagrant) the bootstrap node; the issue is, both the bootstrap node and VirtualBox itself had DHCP servers running, and the other VMs were picking up their DHCP settings from VirtualBox instead of the bootstrap node. Once I turned off the DHCP server built into VirtualBox, everything worked fine.
from chef-bcpc.
Yup yup. If you look at vbox_create.sh
around line 99, you'll see a few places where we try to kill the built-in DHCP server in VirtualBox. It's possible that CentOS had a different network name that our script didn't catch.
from chef-bcpc.
Ah! Thanks
from chef-bcpc.
Let me know where this ends up. I do want to extend the setup scripts to as many platforms as possible, but VirtualBox isn't fully uniform across platforms (even ignoring the madness on Windows!).
from chef-bcpc.
Found the issue. I do have vagrant installed, and line 99, where the dhcpserver is removed, is in the non-vagrant code path. I don't know if the best fix is to have vagrant take care of removing the dhcp server, or put that into vbox_create.sh itself.
from chef-bcpc.
What version of vagrant do you have installed? (vagrant -v
)
It should be removing the DHCP server (per the Vagrantfile specification which only sets private_network
). Specifically, we've tested versions 1.2.2 and up - I'm currently using 1.2.7 on my Mac OS X machines.
from chef-bcpc.
I'm using 1.3.1
from chef-bcpc.
Can you please halt your vagrant box, delete all of the VirtualBox network interfaces, and then run:
VAGRANT_LOG=debug vagrant up
Looking at the Vagrant code base, there should be a line in plugins/providers/virtualbox/action/network.rb
that will emit a debug message when it think it needs to create a DHCP server on the hostonly interface. In looking at the Vagrant code path, I don't see why it would think to create a DHCP server as config[:type] should be :static...but, maybe I'm missing something.
Time permitting, I'll see if I can re-create this on a Mac with Vagrant 1.3.1. (You could also try 1.2.7 as well if you have cycles.)
from chef-bcpc.
For the record, I just confirmed this on CentOS 6.4/VirtualBox 4.2.18r88780/Vagrant 1.3.3. vboxnet0
is getting configured with VirtualBox's internal DHCP server. However, the other interfaces do not appear to have the internal DHCP server set. Investigating.
from chef-bcpc.
Data point: if I manually delete vboxnet0
and relaunch the VM via vagrant up
, vboxnet0
gets recreated without the DHCP server enabled. Sigh.
from chef-bcpc.
Another data point: if you run vagrant destroy
, clear out the network interfaces from VirtualBox, and then run vagrant up
, vboxnet0
gets correctly recreated without the DHCP server. So, it seems that the first host-only network that is ever configured via VirtualBox is getting the DHCP server. I'll try to dig through the VirtualBox issues, but this leads me to guess that Vagrant is most likely doing the right thing here...
from chef-bcpc.
I have tested with a fresh machine running Ubuntu 12.04.3, VirtualBox 4.3.0 r 89960 and Vagrant 1.3.5.
After running vbox_create.sh, I had a seemingly working bootstrap node and three bcpc-vms. However, I saw vboxnet0 through vboxnet2; while the DHCP server was not present on vboxnet1 or vboxnet2 -- vboxnet0 was configured as follows.
Originally, the DHCP server was enabled. Even after disabling it I still was getting a lease from it and not my bootstrap node.
The server at that point was configured as:
cbaenzig@clay-desktop:~/chef-bcpc$ VBoxManage list dhcpservers
NetworkName: HostInterfaceNetworking-vboxnet0
IP: 192.168.56.100
NetworkMask: 255.255.255.0
lowerIPAddress: 192.168.56.101
upperIPAddress: 192.168.56.254
Enabled: No
I then tried removing the dhcpserver entirely via:
VBoxManage dhcpserver remove --netname HostInterfaceNetworking-vboxnet0
Still, VBoxManage list dhcpservers didn't show a DHCP server but it was still answering for that VM.
Lastly, I rebooted my desktop and the Cobbler server properly answered. After deleting all four VMs and re-running vbox_create.sh, the DHCP server did not return.
from chef-bcpc.
Disabling the DHCP server in VirtualBox is not enough to kill the running DHCP server process. (My Mac had same issue.)
from chef-bcpc.
For what it's worth the errant process on a Ubuntu host looks like:
ubuntu 1771 1535 0 Mar03 ? 00:00:00 /usr/lib/virtualbox/VBoxNetDHCP --network HostInterfaceNetworking-vboxnet0 --trunk-type netflt --trunk-name vboxnet0 --mac-address 08:00:27:7D:9F:D8 --ip-address 192.168.56.100 --lower-ip 192.168.56.101 --upper-ip 192.168.56.254 --netmask 255.255.255.0 --begin-config
Interestingly this was on a rather old VBox:
$ vboxmanage --version
4.2.12r84980
from chef-bcpc.
The root issue is that a fresh install of VirtualBox automatically adds a host-only interface (i.e., vboxnet0) with DHCP automatically enabled. Thus, when using Vagrant, DHCP is already enabled for vboxnet0. I will be submitting a pull-request with using an alternative iface prefix so it does not collide with VirtualBox's default naming scheme.
from chef-bcpc.
Related Issues (20)
- MySQL connection errors on first Chef run HOT 1
- dns-update-zone.sh is created after powerdns-update-all-zones calls it
- 6.4.0 fails to build on host_aggregate failure
- Excise concat
- Replica count value should be a ratchet (never go down)
- VRRP router_id generation is not robust HOT 3
- BCPC-Compute missing recipes
- Broken symlinks in bcpc-binary-files breaking build HOT 1
- Remove Liberty-specific sections HOT 2
- rom-o-matic busted URL HOT 1
- Domain configuration causes issue in migration to 7.0.0
- example ansible inventory has deprecated variables if used with ansible >= 2.0 HOT 1
- rally failure breaks build HOT 4
- Proxy test failing HOT 1
- Host aggregate resources need to be updated to use new credentials HOT 1
- reconfigure-eth0-on-vms.sh provisioner can fail on re-provisions
- Rally recipe broken on 6.4.3 Linux build when building behind proxy HOT 1
- Race between worknodes when calling nova-manage cell_v2 discover_hosts
- non-fatal lint error HOT 1
- make create-packer-box fails for libvirt HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chef-bcpc.