Michael Lohmann
2007-Nov-13 10:54 UTC
Fileserver configuration Files are created but not replaced
Hi all, I have a slightly confusing Problem with fileserving. # /etc/puppet/manifests/classes/ntp.pp class ntp { file { "ntp.conf": path => "/etc/ntp.conf", source => "puppet://$puppet_server/files/ntp.conf", ensure => present, mode => 644, owner => root, group => root, } } Creating missing Files works like a charm: notice: //workstation/ntp/File[ntp.conf]/ensure: created But if the file was locally modified, puppet is complaining about checksum notice: Starting configuration run notice: //workstation/ntp/File[ntp.conf]/checksum: checksum changed ''{md5}4d557e8b7791cd8e37dbc448a59ad24f'' to ''{md5}a77901e2119be8ee9783ff0925a3dcaf'' err: Could not find server puppet: getaddrinfo: Name or service not known err: //workstation/ntp/File[ntp.conf]/source: change from {md5}4d557e8b7791cd8e37dbc448a59ad24f to puppet:///files/ntp.conf failed: Could not find server puppet The file gets only replaced if I add puppet in /etc/hosts to the server entry where the puppetmasterd runs The server is configured in /etc/puppet/puppetd.conf on the client Am I missing some config entry ? Or should the puppet entry added to every client /etc/hosts ? btw. I''m on gentoo w puppet 0.23.2 and ruby 1.8.6_p110-r2 Thanks a lot -- Michael Lohmann
David Schmitt
2007-Nov-13 11:52 UTC
Re: Fileserver configuration Files are created but not replaced
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tuesday 13 November 2007, Michael Lohmann wrote:> Hi all, > > I have a slightly confusing Problem with fileserving. > > # /etc/puppet/manifests/classes/ntp.pp > > class ntp { > file { "ntp.conf": > path => "/etc/ntp.conf", > source => "puppet://$puppet_server/files/ntp.conf", > ensure => present, > mode => 644, > owner => root, > group => root, > } > } > > Creating missing Files works like a charm: > > notice: //workstation/ntp/File[ntp.conf]/ensure: created > > But if the file was locally modified, puppet is complaining about > checksum > > notice: Starting configuration run > notice: //workstation/ntp/File[ntp.conf]/checksum: checksum changed > ''{md5}4d557e8b7791cd8e37dbc448a59ad24f'' to > ''{md5}a77901e2119be8ee9783ff0925a3dcaf''###################################################################### # # > err: Could not find server puppet: getaddrinfo: Name or service not # > known # ######################################################################> err: //workstation/ntp/File[ntp.conf]/source: change from > {md5}4d557e8b7791cd8e37dbc448a59ad24f to puppet:///files/ntp.conf > failed: Could not find server puppet > > The file gets only replaced if I add puppet in /etc/hosts to the server > entry where the puppetmasterd runs > > The server is configured in /etc/puppet/puppetd.conf on the client > > Am I missing some config entry ? Or should the puppet entry added to > every client /etc/hosts ?You cannot resolve "puppet" into a IP therefore puppet:/// cannot be used to reference the fileserver. Regards, David - -- The primary freedom of open source is not the freedom from cost, but the free- dom to shape software to do what you want. This freedom is /never/ exercised without cost, but is available /at all/ only by accepting the very different costs associated with open source, costs not in money, but in time and effort. - -- http://www.schierer.org/~luke/log/20070710-1129/on-forks-and-forking -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFHOY/3/Pp1N6Uzh0URAnCsAJwKHBJq3rCgAYutX4J5fX7NRVGs/QCdFthq iCUnV45J1T9I95mVvO1ejd8=qPin -----END PGP SIGNATURE-----
Michael Lohmann
2007-Nov-13 13:20 UTC
Re: Fileserver configuration Files are created but not replaced
On Di, 2007-11-13 at 12:52 +0100, David Schmitt wrote:> -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On Tuesday 13 November 2007, Michael Lohmann wrote: > > Hi all, > > > > I have a slightly confusing Problem with fileserving. > > > > # /etc/puppet/manifests/classes/ntp.pp > > > > class ntp { > > file { "ntp.conf": > > path => "/etc/ntp.conf", > > source => "puppet://$puppet_server/files/ntp.conf", > > ensure => present, > > mode => 644, > > owner => root, > > group => root, > > } > > } > > > > Creating missing Files works like a charm: > > > > notice: //workstation/ntp/File[ntp.conf]/ensure: created > > > > But if the file was locally modified, puppet is complaining about > > checksum > > > > notice: Starting configuration run > > notice: //workstation/ntp/File[ntp.conf]/checksum: checksum changed > > ''{md5}4d557e8b7791cd8e37dbc448a59ad24f'' to > > ''{md5}a77901e2119be8ee9783ff0925a3dcaf'' > > ###################################################################### > # > # > err: Could not find server puppet: getaddrinfo: Name or service not > # > known > # > ###################################################################### > > > > err: //workstation/ntp/File[ntp.conf]/source: change from > > {md5}4d557e8b7791cd8e37dbc448a59ad24f to puppet:///files/ntp.conf > > failed: Could not find server puppet > > > > The file gets only replaced if I add puppet in /etc/hosts to the server > > entry where the puppetmasterd runs > > > > The server is configured in /etc/puppet/puppetd.conf on the client > > > > Am I missing some config entry ? Or should the puppet entry added to > > every client /etc/hosts ? > > > You cannot resolve "puppet" into a IP therefore puppet:/// cannot be used to > reference the fileserver.Yes, but why gets the file created but not replaced if it is modified ? It only get replaced if puppet gets resolved to the ip where puppetmasterd runs. The default server = puppet but in puppet.conf server variable is set I thought puppet:// is a service like http:// !? Thanks Michael> > Regards, David > > - -- > The primary freedom of open source is not the freedom from cost, but the free- > dom to shape software to do what you want. This freedom is /never/ exercised > without cost, but is available /at all/ only by accepting the very different > costs associated with open source, costs not in money, but in time and effort. > - -- http://www.schierer.org/~luke/log/20070710-1129/on-forks-and-forking > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.6 (GNU/Linux) > > iD8DBQFHOY/3/Pp1N6Uzh0URAnCsAJwKHBJq3rCgAYutX4J5fX7NRVGs/QCdFthq > iCUnV45J1T9I95mVvO1ejd8> =qPin > -----END PGP SIGNATURE----- > _______________________________________________ > Puppet-users mailing list > Puppet-users@madstop.com > https://mail.madstop.com/mailman/listinfo/puppet-users-- Michael Lohmann <M.Lohmann@jacopo.de>
Mike Renfro
2007-Nov-13 14:16 UTC
Re: Fileserver configuration Files are created but not replaced
>You cannot resolve "puppet" into a IP therefore puppet:/// cannot be used to >reference the fileserver.I don''t think that''s entirely correct: I start all my puppetd processes with "puppetd --factsync --server foo", puppet:/// rules work fine, and my puppetmaster''s definitely not resolvable as "puppet". The puppet:/// URI with no explicit server only became available in the last few releases, so if (for example) we''re talking about the version that released with Debian Etch, then puppet:/// URIs won''t work at all. -- Mike Renfro / R&D Engineer, Center for Manufacturing Research 931 372-3601 / Tennessee Technological University
Matt Palmer
2007-Nov-13 19:41 UTC
Re: Fileserver configuration Files are created but not replaced
On Tue, Nov 13, 2007 at 11:54:28AM +0100, Michael Lohmann wrote:> Hi all, > > I have a slightly confusing Problem with fileserving. > > # /etc/puppet/manifests/classes/ntp.pp > > class ntp { > file { "ntp.conf": > path => "/etc/ntp.conf", > source => "puppet://$puppet_server/files/ntp.conf",^^^^^^^^^^^^^^ I suspect you want $server here. Also, when there''s underscores involved, always brace your variables to remove the human-level ambiguity about what is variable name and what is literal string. - Matt