Discussion:
Name or service not known
Alex Wood
2011-07-08 18:26:45 UTC
Permalink
I successfully got my overlord to sign my minion's cert, but then I ran
into a problem when I was actually running func on the overlord.

[***@puppet01 log]# func '*' list_minions
Traceback (most recent call last):
File "/usr/bin/func", line 28, in ?
ret = cli.parse(argv)
File "/usr/lib/python2.4/site-packages/func/overlord/command.py",
line 252, in parse
return self.subCommands[command].parse(args[1:])
File "/usr/lib/python2.4/site-packages/func/overlord/command.py",
line 233, in parse
ret = self.do(args)
File
"/usr/lib/python2.4/site-packages/func/overlord/cmd_modules/listminions.py",
line 40, in do
self.getOverlord()
File
"/usr/lib/python2.4/site-packages/func/overlord/base_command.py", line
55, in getOverlord
config=ol_config)
File "/usr/lib/python2.4/site-packages/func/overlord/client.py", line
526, in __init__
self.setup_ssl()
File "/usr/lib/python2.4/site-packages/func/overlord/client.py", line
546, in setup_ssl
myname = func_utils.get_hostname_by_route()
File "/usr/lib/python2.4/site-packages/func/utils.py", line 106, in
get_hostname_by_route
s.connect_ex((server, port))
File "<string>", line 1, in connect_ex
socket.gaierror: (-2, 'Name or service not known')

I had firewalls off on both minion and overlord for the moment.

Again on the advice of a friend, I set the overlord to be a minion of
itself. Now I'm able to run func commands without a problem.

I thought I'd post this to the list in case anyone else runs into a
similar problem.
-------------
Regards,
Alex
--
Senior Software Engineer
Red Hat
919.754.4445
seth vidal
2011-07-08 19:29:16 UTC
Permalink
Post by Alex Wood
I successfully got my overlord to sign my minion's cert, but then I ran
into a problem when I was actually running func on the overlord.
File "/usr/bin/func", line 28, in ?
ret = cli.parse(argv)
File "/usr/lib/python2.4/site-packages/func/overlord/command.py",
line 252, in parse
return self.subCommands[command].parse(args[1:])
File "/usr/lib/python2.4/site-packages/func/overlord/command.py",
line 233, in parse
ret = self.do(args)
File
"/usr/lib/python2.4/site-packages/func/overlord/cmd_modules/listminions.py",
line 40, in do
self.getOverlord()
File
"/usr/lib/python2.4/site-packages/func/overlord/base_command.py", line
55, in getOverlord
config=ol_config)
File "/usr/lib/python2.4/site-packages/func/overlord/client.py", line
526, in __init__
self.setup_ssl()
File "/usr/lib/python2.4/site-packages/func/overlord/client.py", line
546, in setup_ssl
myname = func_utils.get_hostname_by_route()
File "/usr/lib/python2.4/site-packages/func/utils.py", line 106, in
get_hostname_by_route
s.connect_ex((server, port))
File "<string>", line 1, in connect_ex
socket.gaierror: (-2, 'Name or service not known')
I had firewalls off on both minion and overlord for the moment.
Again on the advice of a friend, I set the overlord to be a minion of
itself. Now I'm able to run func commands without a problem.
I thought I'd post this to the list in case anyone else runs into a
similar problem.
so in the above case the error is your minion cannot resolve the name of
the certmaster.

if you could go look in /etc/func/minion.conf

AND (ironically) in /etc/certmaster/minion.conf
look for the certmaster option

is it set to the same thing in both?

-sv
Alex Wood
2011-07-08 20:06:55 UTC
Permalink
Post by seth vidal
so in the above case the error is your minion cannot resolve the name of
the certmaster.
if you could go look in /etc/func/minion.conf
AND (ironically) in /etc/certmaster/minion.conf
look for the certmaster option
is it set to the same thing in both?
-sv
Here's the configuration on my minion:

[***@jboss01 etc]# cat /etc/func/minion.conf
# configuration for minions

[main]
log_level = DEBUG
acl_dir = /etc/func/minion-acl.d

listen_addr =
listen_port = 51234
minion_name =
method_log_dir = /var/log/func/methods/

[***@jboss01 etc]# cat /etc/certmaster/minion.conf
# configuration for minions

[main]
certmaster = puppet01.blah.blah.com
certmaster_port = 51235
log_level = DEBUG
cert_dir = /etc/pki/certmaster

I didn't see a setting in func/minion.conf for the certmaster. Should I
just add that in?
-------------
Regards,
Alex
--
Senior Software Engineer
Red Hat
919.754.4445
seth vidal
2011-07-09 16:42:52 UTC
Permalink
Post by Alex Wood
Post by seth vidal
so in the above case the error is your minion cannot resolve the name of
the certmaster.
if you could go look in /etc/func/minion.conf
AND (ironically) in /etc/certmaster/minion.conf
look for the certmaster option
is it set to the same thing in both?
-sv
# configuration for minions
[main]
log_level = DEBUG
acl_dir = /etc/func/minion-acl.d
listen_addr =
listen_port = 51234
minion_name =
method_log_dir = /var/log/func/methods/
# configuration for minions
[main]
certmaster = puppet01.blah.blah.com
certmaster_port = 51235
log_level = DEBUG
cert_dir = /etc/pki/certmaster
I didn't see a setting in func/minion.conf for the certmaster. Should I
just add that in?
no - it's the one in certmaster/minion.conf I was concerned with.

does that one resolve/ping/etc?

-sv
Alex Wood
2011-07-11 14:36:25 UTC
Permalink
Post by seth vidal
Post by Alex Wood
Post by seth vidal
so in the above case the error is your minion cannot resolve the name of
the certmaster.
if you could go look in /etc/func/minion.conf
AND (ironically) in /etc/certmaster/minion.conf
look for the certmaster option
is it set to the same thing in both?
-sv
# configuration for minions
[main]
log_level = DEBUG
acl_dir = /etc/func/minion-acl.d
listen_addr =
listen_port = 51234
minion_name =
method_log_dir = /var/log/func/methods/
# configuration for minions
[main]
certmaster = puppet01.blah.blah.com
certmaster_port = 51235
log_level = DEBUG
cert_dir = /etc/pki/certmaster
I didn't see a setting in func/minion.conf for the certmaster. Should I
just add that in?
no - it's the one in certmaster/minion.conf I was concerned with.
does that one resolve/ping/etc?
Yes it does ping. Any idea why setting the overlord to be a minion of
itself would solve this problem?

If not, don't sweat it because I do currently have a working func setup,
but with one extra minion which isn't too bad.
---------------------
Regards,
Alex
--
Senior Software Engineer
Red Hat
919.754.4445
Loading...