-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DHCP domain? #72
Comments
You can use the Vagrant plugin "vagrant-hosts" and utilize a stanza like such in your Vagrantfile: master.vm.provision :hosts do |entries| |
@cvquesty I'm using oscar init-vms which creates the necessary configuration files. Wouldn't these modifications need to be put in there somehow since it's using auto_network? I'm using vagrant-hosts and vagrant-auto_network along with pe_build and config_builder with oscar... so this should be a default oscar setup. |
@Sharpie looks like same issue here that you helped solve so hoping to pick your brain... oscar-stack/oscar#54 ---
roles:
pe-puppet-master:
private_networks:
- {ip: '0.0.0.0', auto_network: true}
providers:
- type: virtualbox
linked_clone: true
customize:
- [modifyvm, !ruby/sym id, '--memory', 2048]
provisioners:
#- {type: hosts, sync_hosts: true}
- type: hosts
sync_hosts: true
hosts:·
- ['@vagrant_private_networks', ['@vagrant_hostnames', 'master.example.com']]
- {type: pe_bootstrap, role: !ruby/sym master}
pe-puppet-agent:
private_networks:
- {ip: '0.0.0.0', auto_network: true}
providers:
- type: virtualbox
linked_clone: true
provisioners:
- {type: hosts, sync_hosts: true}
- {type: pe_agent, master: pe-puppet-master} but I'm guessing this isn't the best way to handle this. |
OK so updating the config with inserting the FQDN didn't work and actually isn't putting ---
roles:
pe-puppet-master:
private_networks:
- {ip: '0.0.0.0', auto_network: true}
providers:
- type: virtualbox
linked_clone: true
customize:
- [modifyvm, !ruby/sym id, '--memory', 2048]
provisioners:
#- {type: hosts, sync_hosts: true}
- type: hosts
sync_hosts: true
hosts:
- ['@vagrant_private_networks', ['@vagrant_hostnames', 'master.example.com']]
- {type: pe_bootstrap, role: !ruby/sym master}
pe-puppet-agent:
private_networks:
- {ip: '0.0.0.0', auto_network: true}
providers:
- type: virtualbox
linked_clone: true
provisioners:
#- {type: hosts, sync_hosts: true}
- type: hosts
sync_hosts: true
hosts:
- ['@vagrant_private_networks', ['@vagrant_hostnames', 'master.example.com']]
- {type: pe_agent, master: pe-puppet-master}
So probably need to configure this differently.
|
@cdenneen Reversing the order of the array might work:
One other thing that could be happening is that the VM name is Most of the definitions I use have ---
vms:
- name: master
hostname: master.puppetdebug.vlan Which might cause the hostname update applied by Vagrant post-boot to override DHCP since there is a domain component present in |
@Sharpie why would reversing the array work? Would want master's ip in the agents hosts file. I'll give the hostname definition a whirl to fix the FQDN, DHCP issue but it would be useful to maybe set a |
Okay so going back to the following ---
roles:
pe-puppet-master:
private_networks:
- {ip: '0.0.0.0', auto_network: true}
providers:
- type: virtualbox
linked_clone: true
customize:
- [modifyvm, !ruby/sym id, '--memory', 2048]
provisioners:
- {type: hosts, sync_hosts: true}
# - type: hosts
# sync_hosts: true
# hosts:
# - ['@vagrant_private_networks', ['@vagrant_hostnames', 'master.example.com']] # this adds master.example.com to current hostname as alias... so on master and on first
- {type: pe_bootstrap, role: !ruby/sym master}
pe-puppet-agent:
private_networks:
- {ip: '0.0.0.0', auto_network: true}
providers:
- type: virtualbox
linked_clone: true
provisioners:
- {type: hosts, sync_hosts: true}
# - type: hosts
# sync_hosts: true
# hosts:
# - ['@vagrant_private_networks', ['@vagrant_hostnames', 'master.example.com']]
- {type: pe_agent, master: pe-puppet-master} And updating the ---
vms:
- name: master
hostname: master.puppetdebug.vlan
box: puppetlabs/centos-7.2-64-nocm
roles:
- pe-puppet-master
- name: first
hostname: first.puppetdebug.vlan
box: puppetlabs/centos-7.2-64-nocm
roles:
- pe-puppet-agent
Fixes the master trying to resolve itself error but doesn't fix the client:
So the question now is
|
So I went and updated the name of the master in the
---
vms:
- name: pe-puppet-master
hostname: master.puppetdebug.vlan
box: puppetlabs/centos-7.2-64-nocm
roles:
- pe-puppet-master
- name: first
hostname: first.puppetdebug.vlan
box: puppetlabs/centos-7.2-64-nocm
roles:
- pe-puppet-agent So I went ahead and stopped
So how do I update the |
Yeah, the default firewall behavior in RedHat variants will block connections from agents to port 8140 on the master. The puppet-debugging-kit uses the following role to knock that out: As for References across YAML files are weird, so there isn't a great way around making an assumption there about the VM name of the master there :/ |
Having a problem with oscar coming up and getting the domain from my DHCP server.
Then later during the puppet run it actually fails trying to resolve master.example.com
How can I avoid oscar from getting the domain from DHCP since it's using auto network?
Is there a way to configure oscar to use a dummy domain instead which will be added to the /etc/hosts entries as alias?
The text was updated successfully, but these errors were encountered: