Skip to content
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

fqdn not listed in /etc/hosts #54

Closed
terrimonster opened this issue Apr 7, 2017 · 7 comments
Closed

fqdn not listed in /etc/hosts #54

terrimonster opened this issue Apr 7, 2017 · 7 comments

Comments

@terrimonster
Copy link

The fqdn is not being associated with the IP in /etc/hosts during provisioning. This is resulting in errors in installing the master:

2017-04-07 17:39:08,563 - [Error]: Failed to apply catalog: Could not connect to the Node Manager service at https://master.example.com:4433/classifier-api: #<SocketError: getaddrinfo: Name or service not known>

Using auto_network: true in roles.yaml

Using oscar 0.5.3. Tried downgrading to 0.5.2, same result.

@Sharpie
Copy link
Member

Sharpie commented Apr 8, 2017

Hmm. What was the YAML config for master.example.com?

@Sharpie
Copy link
Member

Sharpie commented Apr 8, 2017

Also, which Vagrant version? I've heard rumors of AutoNetwork issues on 1.9.x, but I've been stuck on 1.8.7 for a while.

@terrimonster
Copy link
Author

YAML config:

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: shell, inline: 'sh /vagrant/provision/proxy.sh'}
- {type: shell, path: 'provision/set_env.sh'}
- {type: pe_bootstrap, role: !ruby/sym master}


Vagrant 1.9.3

With the above config, everything is fine if I install PE 2015.3.3. If I install 2016.4.3, I get the socket error.

@terrimonster
Copy link
Author

I had been using vagrant 1.8.7, same issue. I upgraded to 1.9.3 to see if that helped.

@Sharpie
Copy link
Member

Sharpie commented Apr 14, 2017

Hmm. I would expect the {type: hosts, sync_hosts: true} provisioner to be adding an entry for the fqdn. Is the hostname: on the VM definition being set to master.example.com?

Is there any difference if the following provisioner configuration is used?

- type: hosts
  sync_hosts: true
  hosts:
    - ['@vagrant_private_networks', ['@vagrant_hostnames']]
    

@terrimonster
Copy link
Author

Hrm. Ok, using that provisioner configuration, now the hostname is in /etc/hosts associated with the IP address. BUT, I'm still getting the error:

[Error]: Failed to apply catalog: Could not connect to the Node Manager service at https://master.example.com:4433/classifier-api: #<SocketError: getaddrinfo: Name or service not known>

@terrimonster
Copy link
Author

Ah ha, so I fixed this by throwing in the fqdn of the master in the hostnames array.

I'm closing this, as the fix was to RTFM when the gem was updated.

Thank you for your time, Sharpie :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants