Hi, We are totally sold on Pupet (what a nice concept) and are trying to setup a proof-of-concept. We are trying to learn a bit from other people''s work by integrating external modules. One of the modules we wanted to start with was the ''ntp'' module from David Schmitt. It clearly uses some functionalities from the ''common'' module, which we also installed. But our puppet''s keep complaining that it cannot parse some functions used in the defs/classes. This is the error we get on the client: "err: Could not retrieve catalog: Could not parse for environment development: Unknown function slash_escape at /etc/puppet/modules/common/manifests/defines/replace.pp:23" After some tinkering we already came to the following puppet.conf on the puppetmaster: ----- [main] logdir=/var/log/puppet vardir=/var/lib/puppet ssldir=/var/lib/puppet/ssl [puppetmasterd] templatedir=/etc/puppet/templates:/var/lib/puppet/templates modulepath=/etc/puppet/modules:/var/lib/puppet/modules storeconfigs=true ------ and directory structure on the puppetmaster: ------ |-- files | |-- etc | `-- keys |-- manifests | |-- classes | `-- definitions `-- modules |-- common | |-- files | | `-- modules | |-- manifests | | |-- classes | | `-- defines | `-- plugins | |-- facter | `-- puppet | `-- parser | `-- functions `-- ntp |-- files |-- manifests |-- plugins | `-- facter `-- templates ------ and puppet.conf on the client: ------ [main] logdir=/var/log/puppet vardir=/var/lib/puppet ssldir=/var/lib/puppet/ssl [puppetmasterd] templatedir=/var/lib/puppet/templates [puppetd] server = puppet.ilibris.be pluginsync=true ------ The pluginsync=true worked by syncing the plugins of the common module to /var/lib/puppet/lib on the client, but still it cannot interpret the manifest. Any ideas would be greatly appreciated! Many thanks, Frederik Denkens Belgium
Frederik Denkens schrieb:> Hi, > > We are totally sold on Pupet (what a nice concept) and are trying to > setup a proof-of-concept. We are trying to learn a bit from other > people''s work by integrating external modules. One of the modules we > wanted to start with was the ''ntp'' module from David Schmitt. It clearly > uses some functionalities from the ''common'' module, which we also > installed. > > But our puppet''s keep complaining that it cannot parse some functions > used in the defs/classes. This is the error we get on the client: > > "err: Could not retrieve catalog: Could not parse for environment > development: Unknown function slash_escape at > /etc/puppet/modules/common/manifests/defines/replace.pp:23" >> The pluginsync=true worked by syncing the plugins of the common module > to /var/lib/puppet/lib on the client, but still it cannot interpret the > manifest. > > Any ideas would be greatly appreciated!The functions are needed on the puppetmaster, therefore to bootstrap, you need to puppetd --pluginsync on the master (or just manually copy the functions over). Regards, DavidS
That indeed helped. Now I''m running into another issue that is not entirely clear to me. through the common definition ''modules_dir'' a module data directory should be created, but it seems this def is not being called so the directory does not get created (issue 1). Maybe related, it also seems that the declarations in the init.pp of ntp are not being initialised (issue 2): ----- modules_dir { "ntp": } $ntp_base_dir = "/var/lib/puppet/modules/ntp" $ntp_package = $lsbdistcodename ? { ''sarge'' => ''ntp-server'', default => ''ntp'' } class ntp { ----- because I get the following error: ----- err: //Node[default]/ntp/Package[]/ensure: change from purged to present failed: Execution of ''/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install '' returned 25600: Reading package lists... Building dependency tree... E: Couldn''t find package ----- when I explicitly define $ntp_package within the scope of the class ntp {} the package resource does pass without error. Thanks for helping me getting on track here! Regards, Frederik. David Schmitt wrote:> Frederik Denkens schrieb: > >> Hi, >> >> We are totally sold on Pupet (what a nice concept) and are trying to >> setup a proof-of-concept. We are trying to learn a bit from other >> people''s work by integrating external modules. One of the modules we >> wanted to start with was the ''ntp'' module from David Schmitt. It clearly >> uses some functionalities from the ''common'' module, which we also >> installed. >> >> But our puppet''s keep complaining that it cannot parse some functions >> used in the defs/classes. This is the error we get on the client: >> >> "err: Could not retrieve catalog: Could not parse for environment >> development: Unknown function slash_escape at >> /etc/puppet/modules/common/manifests/defines/replace.pp:23" >> >> > > >> The pluginsync=true worked by syncing the plugins of the common module >> to /var/lib/puppet/lib on the client, but still it cannot interpret the >> manifest. >> >> Any ideas would be greatly appreciated! >> > > > The functions are needed on the puppetmaster, therefore to bootstrap, > you need to puppetd --pluginsync on the master (or just manually copy > the functions over). > > > Regards, DavidS > _______________________________________________ > Puppet-users mailing list > Puppet-users@madstop.com > https://mail.madstop.com/mailman/listinfo/puppet-users >-- Frederik Denkens Zaakvoerder / Commercial Manager iLibris bvba fdenkens@ilibris.be http://www.ilibris.be m: +32 475 96 04 93 t: +32 3 226 21 51 f: +32 3 201 27 19 Internet - Colocation - Managed Servers - Hosting Solutions WebApplicaties - Mail Outsourcing - Consulting Services -- Disclaimer -- This email and any attached files are confidential and may be legally privileged. If you are not the intended recipient, any disclosure, reproduction, copying, distribution, or other dissemination or use of this communication is strictly prohibited. If you have received this transmission in error please notify the sender immediately and then delete this email. Email transmission cannot be guaranteed to be secure or error free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore is in no way liable for any errors or omissions in the content of this message, which may arise as a result of email transmission. If verification is required, please request a hard copy.
On Jan 3, 2008 9:38 AM, Frederik Denkens <fdenkens@ilibris.be> wrote:> > That indeed helped. Now I''m running into another issue that is not > entirely clear to me. > > through the common definition ''modules_dir'' a module data directory > should be created, but it seems this def is not being called so the > directory does not get created (issue 1).I ran into this issue as well. You can correct it by hand by just creating the modules directory /var/lib/puppet/modules/$MODULE_NAME (in this case /var/lib/puppet/modules/ntp). Alternately, I have attached a patch to the common module which makes modules_dir automatically create the required directory. --Paul _______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users
Frederik Denkens schrieb:> That indeed helped. Now I''m running into another issue that is not > entirely clear to me. > > through the common definition ''modules_dir'' a module data directory > should be created, but it seems this def is not being called so the > directory does not get created (issue 1). > > Maybe related, it also seems that the declarations in the init.pp of ntp > are not being initialised (issue 2): > ----- > modules_dir { "ntp": } > $ntp_base_dir = "/var/lib/puppet/modules/ntp" > $ntp_package = $lsbdistcodename ? { ''sarge'' => ''ntp-server'', default => > ''ntp'' } > class ntp { > ----- > > because I get the following error: > ----- > err: //Node[default]/ntp/Package[]/ensure: change from purged to present > failed: Execution of ''/usr/bin/apt-get -q -y -o > DPkg::Options::=--force-confold install '' returned 25600: Reading > package lists... > Building dependency tree... > E: Couldn''t find package > ----- > > when I explicitly define $ntp_package within the scope of the class ntp > {} the package resource does pass without error. > > Thanks for helping me getting on track here!You probably have to explicitly import "common" import "ntp" I''m using puppet features that are not supported by autoloading. It''d be great if you could add your experiences to the CompleteConfiguration page. Regards, David> > Regards, > > Frederik. > > > > David Schmitt wrote: >> Frederik Denkens schrieb: >> >>> Hi, >>> >>> We are totally sold on Pupet (what a nice concept) and are trying to >>> setup a proof-of-concept. We are trying to learn a bit from other >>> people''s work by integrating external modules. One of the modules we >>> wanted to start with was the ''ntp'' module from David Schmitt. It clearly >>> uses some functionalities from the ''common'' module, which we also >>> installed. >>> >>> But our puppet''s keep complaining that it cannot parse some functions >>> used in the defs/classes. This is the error we get on the client: >>> >>> "err: Could not retrieve catalog: Could not parse for environment >>> development: Unknown function slash_escape at >>> /etc/puppet/modules/common/manifests/defines/replace.pp:23" >>> >>> >> >>> The pluginsync=true worked by syncing the plugins of the common module >>> to /var/lib/puppet/lib on the client, but still it cannot interpret the >>> manifest. >>> >>> Any ideas would be greatly appreciated! >>> >> >> The functions are needed on the puppetmaster, therefore to bootstrap, >> you need to puppetd --pluginsync on the master (or just manually copy >> the functions over). >> >> >> Regards, DavidS >> _______________________________________________ >> Puppet-users mailing list >> Puppet-users@madstop.com >> https://mail.madstop.com/mailman/listinfo/puppet-users >> >
David, Actually what worked to fix this was to create a a directory "/etc/puppet/modules/common/files/empty". Maybe Git didn''t take a long empty directories. I actually figured this out by checking out the "modules_dir.pp" file, where the "/var/lib/puppet/modules/${name}" File resource is being created. Here it sources this directory from [ "puppet://$servername/${name}/modules_dir", "puppet://$servername/common/empty"], but neither existed. I never got an error. Only in debug it states that neither sources could be found, but that is it. Interestingly enough, when I fixed the module dir creation problem by manual creation of "empty", it also fixed the other problem I described before: that the following line were seemingly not interpreted: $ntp_base_dir = "/var/lib/puppet/modules/ntp" $ntp_package = $lsbdistcodename ? { ''sarge'' => ''ntp-server'', default => ''ntp'' } class ntp { Now they are ... maybe a bug? I''ll try to put a collection of my ''beginners-notes'' online. Regards, Frederik. David Schmitt wrote:> Frederik Denkens schrieb: > >> That indeed helped. Now I''m running into another issue that is not >> entirely clear to me. >> >> through the common definition ''modules_dir'' a module data directory >> should be created, but it seems this def is not being called so the >> directory does not get created (issue 1). >> >> Maybe related, it also seems that the declarations in the init.pp of ntp >> are not being initialised (issue 2): >> ----- >> modules_dir { "ntp": } >> $ntp_base_dir = "/var/lib/puppet/modules/ntp" >> $ntp_package = $lsbdistcodename ? { ''sarge'' => ''ntp-server'', default => >> ''ntp'' } >> class ntp { >> ----- >> >> because I get the following error: >> ----- >> err: //Node[default]/ntp/Package[]/ensure: change from purged to present >> failed: Execution of ''/usr/bin/apt-get -q -y -o >> DPkg::Options::=--force-confold install '' returned 25600: Reading >> package lists... >> Building dependency tree... >> E: Couldn''t find package >> ----- >> >> when I explicitly define $ntp_package within the scope of the class ntp >> {} the package resource does pass without error. >> >> Thanks for helping me getting on track here! >> > > You probably have to explicitly > > import "common" > import "ntp" > > I''m using puppet features that are not supported by autoloading. > > It''d be great if you could add your experiences to the > CompleteConfiguration page. > > Regards, David > >> Regards, >> >> Frederik. >> >> >> >> David Schmitt wrote: >> >>> Frederik Denkens schrieb: >>> >>> >>>> Hi, >>>> >>>> We are totally sold on Pupet (what a nice concept) and are trying to >>>> setup a proof-of-concept. We are trying to learn a bit from other >>>> people''s work by integrating external modules. One of the modules we >>>> wanted to start with was the ''ntp'' module from David Schmitt. It clearly >>>> uses some functionalities from the ''common'' module, which we also >>>> installed. >>>> >>>> But our puppet''s keep complaining that it cannot parse some functions >>>> used in the defs/classes. This is the error we get on the client: >>>> >>>> "err: Could not retrieve catalog: Could not parse for environment >>>> development: Unknown function slash_escape at >>>> /etc/puppet/modules/common/manifests/defines/replace.pp:23" >>>> >>>> >>>> >>> >>> >>>> The pluginsync=true worked by syncing the plugins of the common module >>>> to /var/lib/puppet/lib on the client, but still it cannot interpret the >>>> manifest. >>>> >>>> Any ideas would be greatly appreciated! >>>> >>>> >>> The functions are needed on the puppetmaster, therefore to bootstrap, >>> you need to puppetd --pluginsync on the master (or just manually copy >>> the functions over). >>> >>> >>> Regards, DavidS >>> _______________________________________________ >>> Puppet-users mailing list >>> Puppet-users@madstop.com >>> https://mail.madstop.com/mailman/listinfo/puppet-users >>> >>> > > _______________________________________________ > Puppet-users mailing list > Puppet-users@madstop.com > https://mail.madstop.com/mailman/listinfo/puppet-users >-- Frederik Denkens Zaakvoerder / Commercial Manager iLibris bvba fdenkens@ilibris.be http://www.ilibris.be m: +32 475 96 04 93 t: +32 3 226 21 51 f: +32 3 201 27 19 Internet - Colocation - Managed Servers - Hosting Solutions WebApplicaties - Mail Outsourcing - Consulting Services -- Disclaimer -- This email and any attached files are confidential and may be legally privileged. If you are not the intended recipient, any disclosure, reproduction, copying, distribution, or other dissemination or use of this communication is strictly prohibited. If you have received this transmission in error please notify the sender immediately and then delete this email. Email transmission cannot be guaranteed to be secure or error free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore is in no way liable for any errors or omissions in the content of this message, which may arise as a result of email transmission. If verification is required, please request a hard copy.