I noticed that the current func_register_if_enabled snippet just appends to the default config files:
# cat /etc/func/minion.conf # configuration for minions
[main] log_level = DEBUG acl_dir = /etc/func/minion-acl.d
listen_addr = listen_port = 51234 [main] log_level = INFO acl_dir = /etc/func/minion-acl.d
[root@maas-portal1 ~]# cat /etc/certmaster/minion.conf # configuration for minions
[main] certmaster = certmaster certmaster_port = 51235 log_level = DEBUG cert_dir = /etc/pki/certmaster
[main] certmaster = install0.bogus.domain.name log_level = DEBUG cert_dir = /etc/pki/certmaster
It seems like only the first section is used and in my environment I do not have a host named certmaster so my minions never connect to the master. I made the following patch:
diff --git a/snippets/func_register_if_enabled b/snippets/func_register_if_enabled index 1478cf7..e6c14c0 100644 --- a/snippets/func_register_if_enabled +++ b/snippets/func_register_if_enabled @@ -1,17 +1,26 @@ + #if $str($getVar('func_auto_setup','')) == "1" # Start func registration section + /sbin/chkconfig --level 345 funcd on -cat << EOFM >> /etc/func/minion.conf + +cat <<EOFM > /etc/func/minion.conf [main] log_level = INFO acl_dir = /etc/func/minion-acl.d + +listen_addr = +listen_port = 51234 EOFM -cat << EOCM >> /etc/certmaster/minion.conf + +cat <<EOCM > /etc/certmaster/minion.conf [main] certmaster = $func_master +certmaster_port = 51235 log_level = DEBUG cert_dir = /etc/pki/certmaster EOCM + # End func registration section #end if
--- Don Khan Cloud Infrastructure Group, EMC Corporation 11 Cambridge Center, Cambridge MA 02142-1405
khan_don@emc.com wrote:
I noticed that the current func_register_if_enabled snippet just appends to the default config files:
# cat /etc/func/minion.conf # configuration for minions
[main] log_level = DEBUG acl_dir = /etc/func/minion-acl.d
listen_addr = listen_port = 51234 [main] log_level = INFO acl_dir = /etc/func/minion-acl.d
[root@maas-portal1 ~]# cat /etc/certmaster/minion.conf # configuration for minions
[main] certmaster = certmaster certmaster_port = 51235 log_level = DEBUG cert_dir = /etc/pki/certmaster
[main] certmaster = install0.bogus.domain.name log_level = DEBUG cert_dir = /etc/pki/certmaster
It seems like only the first section is used and in my environment I do not have a host named certmaster so my minions never connect to the master. I made the following patch:
diff --git a/snippets/func_register_if_enabled b/snippets/func_register_if_enabled index 1478cf7..e6c14c0 100644 --- a/snippets/func_register_if_enabled +++ b/snippets/func_register_if_enabled @@ -1,17 +1,26 @@
#if $str($getVar('func_auto_setup','')) == "1" # Start func registration section
/sbin/chkconfig --level 345 funcd on -cat << EOFM >> /etc/func/minion.conf
+cat <<EOFM > /etc/func/minion.conf [main] log_level = INFO acl_dir = /etc/func/minion-acl.d
+listen_addr = +listen_port = 51234 EOFM -cat << EOCM >> /etc/certmaster/minion.conf
+cat <<EOCM > /etc/certmaster/minion.conf [main] certmaster = $func_master +certmaster_port = 51235 log_level = DEBUG cert_dir = /etc/pki/certmaster EOCM
# End func registration section #end if
Don Khan Cloud Infrastructure Group, EMC Corporation 11 Cambridge Center, Cambridge MA 02142-1405
cobbler mailing list cobbler@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/cobbler
Yikes! Will apply, thanks. I believe I was testing without Func installed (bad, bad, Func developer I am).
khan_don@emc.com wrote:
I noticed that the current func_register_if_enabled snippet just appends to the default config files:
# cat /etc/func/minion.conf # configuration for minions
[main] log_level = DEBUG acl_dir = /etc/func/minion-acl.d
listen_addr = listen_port = 51234 [main] log_level = INFO acl_dir = /etc/func/minion-acl.d
[root@maas-portal1 ~]# cat /etc/certmaster/minion.conf # configuration for minions
[main] certmaster = certmaster certmaster_port = 51235 log_level = DEBUG cert_dir = /etc/pki/certmaster
[main] certmaster = install0.bogus.domain.name log_level = DEBUG cert_dir = /etc/pki/certmaster
It seems like only the first section is used and in my environment I do not have a host named certmaster so my minions never connect to the master. I made the following patch:
diff --git a/snippets/func_register_if_enabled b/snippets/func_register_if_enabled index 1478cf7..e6c14c0 100644 --- a/snippets/func_register_if_enabled +++ b/snippets/func_register_if_enabled @@ -1,17 +1,26 @@
#if $str($getVar('func_auto_setup','')) == "1" # Start func registration section
/sbin/chkconfig --level 345 funcd on -cat << EOFM >> /etc/func/minion.conf
+cat <<EOFM > /etc/func/minion.conf [main] log_level = INFO acl_dir = /etc/func/minion-acl.d
+listen_addr = +listen_port = 51234 EOFM -cat << EOCM >> /etc/certmaster/minion.conf
+cat <<EOCM > /etc/certmaster/minion.conf [main] certmaster = $func_master +certmaster_port = 51235 log_level = DEBUG cert_dir = /etc/pki/certmaster EOCM
# End func registration section #end if
Don Khan Cloud Infrastructure Group, EMC Corporation 11 Cambridge Center, Cambridge MA 02142-1405
cobbler mailing list cobbler@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/cobbler
Applied to devel and master (will be in 1.4.2), thanks!
Glad to see someone is using the Func snippets.
--Michael.
cobbler@lists.fedorahosted.org