Re: [Puppet Users] Very large resource_statuses. reports:prune:orphaned fails with Mysql error
On Tuesday, August 12, 2014 5:58:34 PM UTC+2, Ramin K wrote: On 8/12/2014 8:54 AM, Ramin K wrote: [...] You could try dropping the table and recreating it, but it might orphan all the resources. If you want the longer safer way, this is how I've done it in the past. Note that you'll need to dump and import the data for that table in order to reclaim the space from the table. https://ask.puppetlabs.com/question/884/how-do-i-reduce-the-space-mysql-is-using-for-puppet-dashboard/?answer=885#post-id-885 I made an error. Because you're already using file per table the optimize step will reclaim the space as long as you've already purged the data. Ramin Thanks for the reply. I have reduced the number of daily puppet runs on all nodes from 8 to 2 in also in order to reduce the load. It looks like this is also affecting the locking error message that I got previously and the reports:prune:orphaned job seems to execute as it should (but very slowly). As growth of the resource_statuses table also has slowed down I think I will let the reports:prune:orphaned job just run and see If that solves the problem. If not I may try to drop the table. Erling -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/d4dbc1b3-ae58-443d-82cd-04e85d6b12f4%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] Augeas hates me!!!
Hi, I think you can use file_line from stdlib https://forge.puppetlabs.com/puppetlabs/stdlib#file_line It's really more simple than Augeas and it works better. For multi-line I also use editfile a custom module, but you need to be good with regex =) https://github.com/mstrauss/puppet-editfile Best regards, Le 12/08/2014 22:22, randal cobb a écrit : Hello, all! I am trying to add some new modules to an openSuse 13.1 host with Puppet and Augeas with no luck. The modules themselves are already installed by the example42/apache module, but I can't get the apache::module syntax to properly add the modules to the proper openSuse config files. So, I'm opting for Augeas to do the dirty-work. I have the following definition in the server's manifest (dev-apache.pp) file (the apache::module command are still there, but don't work, so the augeas section is the brute-force attempt; I just included them both so you can see the current state of this class manifest): | ... apache::module{'status':} apache::module{'asis':} apache::module{'auth_digest':} apache::module{'headers':} apache::module{'proxy':} apache::module{'proxy_http':} apache::module{'rewrite':} apache::module{'vhost_alias':} apache::module{'authz_default':} apache::module{'proxy_balancer':} augeas {'apache2': context =/files/etc/sysconfig/apache2, lens =sysconfig.lns, incl ='/usr/share/augeas/lenses/dist/', changes = 'set APACHE_MODULES actions alias auth_basic authn_file authz_host authz_groupfile authz_user autoindex cgi dir env expires include log_config mime negotiation setenvif ssl userdir reqtimeout authn_core authz_core status asis auth_digest headers proxy proxy_http rewrite vhost_alias authz_default proxy_balancer', } ... | When running the agent in --debug --verbose --test, I get this debug output from augeas: | Debug:Augeas[apache2](provider=augeas):Openingaugeas withroot /,lens path ,flags 64 Debug:Augeas[apache2](provider=augeas):Augeasversion 1.0.0isinstalled Debug:Augeas[apache2](provider=augeas):Willattempt to save andonly run iffiles changed Debug:Augeas[apache2](provider=augeas):sending command 'set'withparams[/files/etc/sysconfig/apache2/APACHE_MODULES,actions alias auth_basic authn_file authz_host authz_groupfile authz_user autoindex cgi dir env expires include log_config mime negotiation setenvif ssl userdir reqtimeout authn_core authz_core status asis auth_digest headers proxy proxy_http rewrite vhost_alias authz_default proxy_balancer] Debug:Augeas[apache2](provider=augeas):Skippingbecause nofiles were changed Debug:Augeas[apache2](provider=augeas):Closedthe augeas connection | No errors, but the file is marked as unchanged. Before the puppet run, /etc/sysconfig/apache2 contains this line: APACHE_MODULES=foo and obviously, it's the same afterwards. Any insight into what I may be doing wrong? -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com mailto:puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/3d666f47-8b6e-436a-8791-a15e50ab9771%40googlegroups.com https://groups.google.com/d/msgid/puppet-users/3d666f47-8b6e-436a-8791-a15e50ab9771%40googlegroups.com?utm_medium=emailutm_source=footer. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/53EC545D.1000709%40quake.fr. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] Re: Puppet uses catalog of node B for node A
Hello John, from a puppet-beginners point of view it seems astonishing that running puppet agent -t on node A can have influence on the catalog prepared for node B. I agree that your inital response perfectly fitted to the solution of the problem. Thanks for that explanation! Kind regards Helmut Am Mittwoch, 13. August 2014 17:53:20 UTC+2 schrieb jcbollinger: Hello Helmut, I am glad you have resolved your issue. I have recently been travelling, and hence not responsive to this list, but I feel compelled to observe that the problem turned out to be exactly what I said in my initial response it might be: In particular, I am inclined to guess that one or more of your manifests [...] has some top-scope declarations that are neither class nor type definitions. That response goes on to explain why having such declarations is a problem. I can also be more specific now, since it seems you may be tripping over the semantics of the 'include' statement. It is essential to understand that 'include' directs Puppet that the designated class must be included in the catalog being constructed -- NOT to interpolate any additional DSL code into the manifest file in which it appears. John -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/e0f1952b-f01f-47f3-87a7-4d8c8bef3202%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] Re: Wild Card in Augeas
Hi David, Many thanks for the information, but still I am having some issues with puppet class when I am trying to use double quotes. This is working good setm *[label() =~ glob('ifcfg-eth*')] NM_CONTROLLED no, But, this isn't. I tried few combinations of single and double quotes, but none of them are working :( setm *[label() =~ glob('ifcfg-eth*')] NM_CONTROLLED \'no\', Regards, Vikas On Thursday, 14 August 2014 03:05:11 UTC+10, David Lutterkort wrote: Hi Vikas, to set multiple nodes, you need to use the 'setm' command; 'set' will only change a single node. Also, the path expressions in Augeas are more like XPath, and therefore don't have globbing built in. In augtool, you'd do what you want with this command: setm /files/etc/sysconfig/network-scripts/*[label() =~ glob('ifcfg-*')] NM_CONTROLLED no The corresponding Augeas resource would be something like augeas { network-tweaks-RedHat: context = /files/etc/sysconfig/network-scripts, changes = [setm *[label() =~ glob('ifcfg-*')] NM_CONTROLLED no ], } David On Monday, August 11, 2014 10:28:26 PM UTC-7, Vikas Kumar wrote: Dear All, I am trying to use augeas to change the value of NM_CONTROLLED to no on all my RHEL 6.X machines. However, the number of ethernet cards differ on each server, thus I want to use expression or wild cards. if $::operatingsystemmajrelease == '6' { augeas { network-tweaks-RedHat: context = /files/etc/sysconfig/network-scripts/ifcfg-eth[0-9], changes = [ 'set /files/etc/sysconfig/network-scripts/ifcfg-eth[0-9]/NM_CONTROLLED \'no\'' , ], } } I wrote the above code but it does't do the job. Please suggest. Regards, Vikas -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/98964bf3-b072-4930-b436-ef8453e948e4%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] puppet can't get the right service status from centos5.3
when i disable puppet service ,centos5.3 system always have change: Notice: /Stage[main]/Puppet/Service[puppet]/ensure: ensure changed 'running' to 'stopped' Notice: Finished catalog run in 1.15 seconds just say the code : [root@xen-21206-vm02 ~]# puppet resource service puppet -d Debug: Puppet::Type::Service::ProviderDaemontools: file /usr/bin/svc does not exist Debug: Puppet::Type::Service::ProviderOpenrc: file /sbin/rc-service does not exist Debug: Puppet::Type::Service::ProviderLaunchd: file /bin/launchctl does not exist Debug: Puppet::Type::Service::ProviderGentoo: file /sbin/rc-update does not exist Debug: Puppet::Type::Service::ProviderDebian: file /usr/sbin/update-rc.d does not exist Debug: Puppet::Type::Service::ProviderRunit: file /usr/bin/sv does not exist Debug: Puppet::Type::Service::ProviderSystemd: file systemctl does not exist Debug: Puppet::Type::Service::ProviderDaemontools: file /usr/bin/svc does not exist Debug: Puppet::Type::Service::ProviderOpenrc: file /sbin/rc-service does not exist Debug: Puppet::Type::Service::ProviderLaunchd: file /bin/launchctl does not exist Debug: Puppet::Type::Service::ProviderGentoo: file /sbin/rc-update does not exist Debug: Puppet::Type::Service::ProviderDebian: file /usr/sbin/update-rc.d does not exist Debug: Puppet::Type::Service::ProviderRunit: file /usr/bin/sv does not exist Debug: Puppet::Type::Service::ProviderSystemd: file systemctl does not exist Debug: Executing '/sbin/service puppet status' Debug: Executing '/sbin/chkconfig puppet' service { 'puppet': ensure = 'running', enable = 'false', } [root@xen-21206-vm02 ~]# /sbin/service puppet status puppet is stopped [root@xen-21206-vm02 ~]# echo $? 3 this agent get the wrong service status.should service { 'puppet': ensure = 'stopped', enable = 'false', } who can help me? thks my puppet version : 3.2.3 -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/df4ac6b9-c8b2-47ed-8f12-e45b00030b6e%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] puppet can't get the right service status from centos5.3
The init script on 5 only checks for running puppet processes. puppet resource is a puppet process. Therefore the init script thinks the service is running. Solution: use Service#pattern to match bettern on the process name. Regards, David On 2014-08-14 12:06, li jackie wrote: when i disable puppet service ,centos5.3 system always have change: Notice: /Stage[main]/Puppet/Service[puppet]/ensure: ensure changed 'running' to 'stopped' Notice: Finished catalog run in 1.15 seconds just say the code : |[root@xen-21206-vm02 ~]# puppet resource service puppet -d Debug: Puppet::Type::Service::ProviderDaemontools: file /usr/bin/svc does not exist Debug: Puppet::Type::Service::ProviderOpenrc: file /sbin/rc-service does not exist Debug: Puppet::Type::Service::ProviderLaunchd: file /bin/launchctl does not exist Debug: Puppet::Type::Service::ProviderGentoo: file /sbin/rc-update does not exist Debug: Puppet::Type::Service::ProviderDebian: file /usr/sbin/update-rc.d does not exist Debug: Puppet::Type::Service::ProviderRunit: file /usr/bin/sv does not exist Debug: Puppet::Type::Service::ProviderSystemd: file systemctl does not exist Debug: Puppet::Type::Service::ProviderDaemontools: file /usr/bin/svc does not exist Debug: Puppet::Type::Service::ProviderOpenrc: file /sbin/rc-service does not exist Debug: Puppet::Type::Service::ProviderLaunchd: file /bin/launchctl does not exist Debug: Puppet::Type::Service::ProviderGentoo: file /sbin/rc-update does not exist Debug: Puppet::Type::Service::ProviderDebian: file /usr/sbin/update-rc.d does not exist Debug: Puppet::Type::Service::ProviderRunit: file /usr/bin/sv does not exist Debug: Puppet::Type::Service::ProviderSystemd: file systemctl does not exist Debug: Executing '/sbin/service puppet status' Debug: Executing '/sbin/chkconfig puppet' service { 'puppet': ensure = 'running', enable = 'false', } [root@xen-21206-vm02 ~]# /sbin/service puppet status puppet is stopped [root@xen-21206-vm02 ~]# echo $? 3 | this agent get the wrong service status.should |service { 'puppet': ensure = 'stopped', enable = 'false', } | who can help me? thks my puppet version : 3.2.3 -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com mailto:puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/df4ac6b9-c8b2-47ed-8f12-e45b00030b6e%40googlegroups.com https://groups.google.com/d/msgid/puppet-users/df4ac6b9-c8b2-47ed-8f12-e45b00030b6e%40googlegroups.com?utm_medium=emailutm_source=footer. For more options, visit https://groups.google.com/d/optout. -- * Always looking for people I can help with awesome projects * G+: https://plus.google.com/+DavidSchmitt Blog: http://club.black.co.at/log/ LinkedIn: http://at.linkedin.com/in/davidschmitt -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/53EC8FE9.90809%40dasz.at. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] is it possible to run agent with negated tag?
is it possible to run agent with negated tag? for example puppet agent --verbose --no-daemonize --runinterval=30 --tags !negated_tag of course above is not working i want to simply compile and run puppet catalog without specific negated_tag tagged resources regards -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/3760960d-95b9-4725-b6bc-8e3dd9d6d968%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] puppet not respect basemodulepath
$ cat /etc/puppet/puppet.conf [main] environmentpath = $confdir/environments basemodulepath = $confdir/environments/$environment/dist $ sudo puppet config print modulepath --environment datanode /etc/puppet/environments/datanode/modules:/etc/puppet/environments/datanode/dist $ ls ~/puppet Puppetfile README.md dist manifests $ ls /etc/puppet auth.confautosign.conf environments manifests puppetdb.conf routes.yaml auth.conf.dpkg-dist config.ru hiera.yamlpuppet.conf r10k unicorn.conf $ ls /etc/puppet/environments/production dist manifests modules Puppetfile README.md dist contain modules in ~/puppet, modules contain modules specified by Puppetfile Now the problem is that puppet always applies modules in /etc/puppet/environments/production/dist, even the environment is not. In data01 $ sudo puppet agent --environment datanode -t Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Evaluation Error: Error while evaluating a Function Call, Could not find class package::data for data01 at /etc/puppet/environments/datanode/manifests/data.pp:9:3 on node data01 But it is there. $cat /etc/puppet/environments/datanode/dist/package/manifests/data.pp class package::data { ... } when I run puppet master in debug mode , I find it applies all modules in /etc/puppet/environments/production/dist, like following: Debug: importing '/etc/puppet/environments/production/dist/supervisor/manifests/params.pp' in environment datanode Debug: Automatically imported supervisor::params from supervisor/params into datanode Debug: importing '/etc/puppet/environments/production/dist/nrpe/manifests/checker/supervisor.pp' in environment datanode Debug: Automatically imported nrpe::checker::supervisor from nrpe/checker/supervisor into datanode Debug: importing '/etc/puppet/environments/production/dist/nrpe/manifests/checker/cfb.pp' in environment datanode So I am completely confused. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/418dfb5e-66e5-4673-9ac6-caecec0ed7e4%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] Re: Error: Puppet::Parser::AST::Resource failed with error Hiera::InterpolationLoop: Detected in [::environment]
Hello Roman Shiryaev, Did you find the solution for this issue. I am facing the same issue and not finding any solution anywhere. Do share if your workaround if any. Thanks Veda On Friday, December 13, 2013 1:00:37 PM UTC+5:30, Roman Shiryaev wrote: Hello, just upgraded Hiera from ver. 1.2.1 to 1.3.0 and broke our puppet environment. :) It seems that there are sizeable changes related to variable interpolation Here is an error during Puppet run: Error: Puppet::Parser::AST::Resource failed with error Hiera::InterpolationLoop: Detected in [::environment] at /home/ubuntu/environments/project_dev/manifests/site.pp:35 on node project-dev.novalocal Wrapped exception: Detected in [::environment] Error: Puppet::Parser::AST::Resource failed with error Hiera::InterpolationLoop: Detected in [::environment] at /home/ubuntu/environments/project_dev/manifests/site.pp:35 on node project-dev.novalocal Error: Puppet::Parser::AST::Resource failed with error Hiera::InterpolationLoop: Detected in [::environment] at /home/ubuntu/environments/project_dev/manifests/site.pp:35 on node project-dev.novalocal Line 35 in the above manifest contains the line class { apache: } as we're using a standard module apache from Puppetlabs to manage an installation of Apache. And here is our hiera.yaml --- :backends: - yaml :hierarchy: - private/%{::environment}/%{::clientcert} - public/%{::environment}/%{::clientcert} - private/%{::environment}/%{::environment} - public/%{::environment}/%{::environment} - public/%{::environment}/%{::operatingsystem} - public/%{::environment}/common :yaml: :datadir: '/etc/puppet/hieradata/' Any ideas how to fix the issue? Thanks. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/514d2f98-76a7-4208-b3c8-342a1483a0a4%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] Remove java from path - Windows
We are having an issue with some modules. They are adding the correct path, but they do not remove the old path: C:\Windows\system32path PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\IBM\RationalSDLC\common;;C:\Program Files (x86)\NTP\bin;C:\Program Files (x86)\Puppet Labs\Puppet\bin;C:\Program Files\Java\jdk1.7.0_50\bin;C:\PROGRA~1\apache-maven\bin;C:\Program Files\Java\jdk1.7.0_55\bin You can see that it added the correct path at the end, but the original version jdk1.7_50\bin still exists. How can we make sure that it removes the old version every time it installs a newer version? Edit: More importantly what we need to do is have it search for the JAVA_HOME path variable, compare that against Path variable, delete any java directory that doesnt belong, and copy the JAVA_HOME to Path. Hope that makes sense. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/18665d05-c584-46ed-9250-1bb42a180c8c%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] puppet CLA
I'm trying to sign this new github linked CLA and it's saying the my email address is already taken, which I'm guessing is because my puppetlabs and github accounts share a common email address. How can I get around this annoyance? -- Later, Darin -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CADaviKu05tHvBuV2aq5jYN%3Dr2YVLs33xgywiHa6%2BBgk-B9rFcQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] Re: puppet slow when ensuring user with groups in combination with winbind auth
On Wednesday, August 13, 2014 10:34:30 PM UTC-5, Garrett Honeycutt wrote: I'm not familiar with winbind itself though your performance might improve by using nscd to cache the lookups. Although in principle a name service cache might help with the performance issue, the winbind docs say Do not under any circumstances run nscd on any system on which winbindd is running. I don't know the reason for this prohibition, but it seems both clear and forceful. John -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/1d69e2ae-2e0e-404f-87a8-9d7d8a03ee87%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] puppet CLA
I'm trying to sign this new github linked CLA and it's saying the my email address is already taken, which I'm guessing is because my puppetlabs and github accounts share a common email address. How can I get around this annoyance? Can you try logging a ticket here? https://tickets.puppetlabs.com/browse/CLA ken. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAE4bNTnpy-J33CjSuvJDoNJYky6noROBF0GOc%3DFaJpUuah6cjA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] puppet CLA
https://tickets.puppetlabs.com/browse/CLA-4 -- Later, Darin On Thu, Aug 14, 2014 at 8:59 AM, Ken Barber k...@puppetlabs.com wrote: I'm trying to sign this new github linked CLA and it's saying the my email address is already taken, which I'm guessing is because my puppetlabs and github accounts share a common email address. How can I get around this annoyance? Can you try logging a ticket here? https://tickets.puppetlabs.com/browse/CLA ken. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAE4bNTnpy-J33CjSuvJDoNJYky6noROBF0GOc%3DFaJpUuah6cjA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CADaviKuPc_8-Za1NPQJ9Y1Z%3D5Y226mQT%2BJ6Ly%2Bw1auTdgnt%2BLg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] puppet CLA
On Thu, Aug 14, 2014 at 6:16 AM, Darin Perusich da...@darins.net wrote: https://tickets.puppetlabs.com/browse/CLA-4 -- Later, Darin On Thu, Aug 14, 2014 at 8:59 AM, Ken Barber k...@puppetlabs.com wrote: I'm trying to sign this new github linked CLA and it's saying the my email address is already taken, which I'm guessing is because my puppetlabs and github accounts share a common email address. How can I get around this annoyance? You should be all set now. I updated the ticket with more details about why it happened. Your pull request against puppetlabs-corosync should be updated with a new auto-generated message that the CLA has been signed. If the auto-generated comment from the CLA bot doesn't appear today, I'll look into it again. In the meantime, I'll drop a note on the pull request that I've verified for CLA so that the pull request isn't stalled. Thanks, Dawn -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAPUeXZpOhEj5KX6_Jsbx7XrjgiAHZRrbfLCreJqZTe3gJdGa%3DQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] Host inventory and management application?
I have a mix of hosts with several OSs and many versions of each on three different puppet masters that I am working to bring together onto one puppet master and upgrade as much as possible. I need a tool to keep track of what I have so I know what I need to change. I want to: View and query an inventory of which hosts I have and information about those hosts: OS, version, etc. Run reports such as All CentOS and All hosts using $server as the puppet master Bonus Points: Add external facts for hosts, such as role that I can pull via an ENC. Scan networks and inventory IP address assignments. I've heard of an application called Foreman that might be able to do what I want. Are there any other tools that I should be looking at? P.S. I have puppetdb on my Puppet 3.x puppet master I don't have puppetdb on my two Puppet 2.7x puppet masters. -- Perfection is just a word I use occasionally with mustard. --Atom Powers-- -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAF-H%3DOkguU%3DdUjgnVCBK14RZ66sFwYQ%3DgAACg6R2j5MuN3nyEg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] More admins using the same master
Hi to everybody, I'm really sorry for this late answer. I solved the problem using Gitolite for the users code and the puppet variable config_version to run a script for automatically updating the environments. I needed to do this because this is a temporary multiusers enviroment for a tutorial on a storage system. Thank you very much for your suggestions and help. Cheers. Luca Il giorno mercoledì 13 agosto 2014 14:52:36 UTC+2, Jason Antman ha scritto: Yeah. You don't need to give them access to the master, you need something (I use a git hook on the git server) that deploys new pushes to the master. On Tue, Aug 5, 2014 at 12:15 PM, Christopher Wood christop...@pobox.com javascript: wrote: Off the top of my head, have them commit/push to the same git repository where that repository is checked out by the puppetmaster. You can give them each a VM to test their own stuff, where they'll also find out how their manifests interact with the whole picture. Keeping them in their own little silos will hurt you in the long run, and also potentially much sooner than that if two of them find they need to combine incompatible pieces. On Tue, Aug 05, 2014 at 09:00:50AM -0700, Luca Mazzaferro wrote: Dear User community, I would know if anyone has experience of using puppet with multiple developers. I try to explain better. I have ONE master and some nodes attached. We have more than 3 users which want to develop their module and deploy them on different machines. I know that we can define different environments and in principle give one for each developer. But in this case I need to give the access to the master to each one and I wouldn't. In principle I would that the users develop their code on their pc, then commit it via git ( for example ) and when they run puppet agent on their machines the master catch the new code and apply it. I found the config_version variable inside the environment.conf should work running a git clone inside the environments before the execution on the clients. Is there another way, simpler? Anyone has any experience of it? Thank you. Regards. Luca -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to [1]puppet-users...@googlegroups.com javascript:. To view this discussion on the web visit [2] https://groups.google.com/d/msgid/puppet-users/e87c69cd-f182-463c-9c53-7225c9adfce5%40googlegroups.com . For more options, visit [3]https://groups.google.com/d/optout. References Visible links 1. mailto:puppet-users+unsubscr...@googlegroups.com javascript: 2. https://groups.google.com/d/msgid/puppet-users/e87c69cd-f182-463c-9c53-7225c9adfce5%40googlegroups.com?utm_medium=emailutm_source=footer 3. https://groups.google.com/d/optout -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com javascript:. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/20140805161502.GA9324%40iniquitous.heresiarch.ca . For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/eff6846c-d576-4ed3-9272-bd0fcef11e13%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] Host inventory and management application?
This might give you some: http://puppetlabs.com/mcollective In your situation I would get puppetdb on all puppetmasters and wait until after the next set of agent runs to query it/them. On Thu, Aug 14, 2014 at 09:09:12AM -0700, Atom Powers wrote: I have a mix of hosts with several OSs and many versions of each on three different puppet masters that I am working to bring together onto one puppet master and upgrade as much as possible. I need a tool to keep track of what I have so I know what I need to change. I want to: View and query an inventory of which hosts I have and information about those hosts: OS, version, etc. Run reports such as All CentOS and All hosts using $server as the puppet master Bonus Points: Add external facts for hosts, such as role that I can pull via an ENC. Scan networks and inventory IP address assignments. I've heard of an application called Foreman that might be able to do what I want. Are there any other tools that I should be looking at? P.S. I have puppetdb on my Puppet 3.x puppet master I don't have puppetdb on my two Puppet 2.7x puppet masters. -- Perfection is just a word I use occasionally with mustard. --Atom Powers-- -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to [1]puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit [2]https://groups.google.com/d/msgid/puppet-users/CAF-H%3DOkguU%3DdUjgnVCBK14RZ66sFwYQ%3DgAACg6R2j5MuN3nyEg%40mail.gmail.com. For more options, visit [3]https://groups.google.com/d/optout. References Visible links 1. mailto:puppet-users+unsubscr...@googlegroups.com 2. https://groups.google.com/d/msgid/puppet-users/CAF-H%3DOkguU%3DdUjgnVCBK14RZ66sFwYQ%3DgAACg6R2j5MuN3nyEg%40mail.gmail.com?utm_medium=emailutm_source=footer 3. https://groups.google.com/d/optout -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/20140814162413.GA26367%40iniquitous.heresiarch.ca. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] How can managed directory be updated after an rpm is upgraded?
I want to 'manage' the files in a certain directory ONLY if the rpm is updated. Any help is appreciated. For example (this doesn't work): package { 'package-name' : ensure = 'Version-2', provider = 'rpm', } file { '/home/thisuser/.java' : ensure = directory, subscribe = Package['package-name'], recurse = true, purge = true, force = true, backup = false, source = 'puppet:///modules/test/home/thisuser/.java', } -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/dfdda8af-df09-4fbd-b395-1a419d532564%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] Confused Puppet Manifest ... Possible caching issue?
I've got a pretty strange issue here. Imagine we have two servers... *ServerA* and *ServerB*. Last night *ServerB* pulled down some configuration bits from our puppet servers and tried to re-name itself to *ServerA*. How? Well theres two things that may have triggered this behavior. 1. We use a custom Puppet Node Name fact to set our node names, rather than the hostnames: [main] ... # Use the fact 'puppet_node' as our node classifier rather than the hostname. node_name = facter node_name_fact = puppet_node 2. We have Nginx proxy_cache all of our GET/HEAD requests to avoid hammering the Puppet Master processes with calls to the mostly static content like templates: # Never, ever, ever cache our certificate or API requests... always pass them to the puppet master. location ~ /(.*)/certificate(.*)/(.*)$ { proxy_pass http://unicorn; } # If a request comes in for the 'master' environment, do not cache it at all location ~ /master/(.*)$ { proxy_pass http://unicorn; } location / { # Cache all requests to the Puppet Unicorn process for at least 10 minutes. proxy_cache nginx; proxy_cache_methods GET HEAD; proxy_cache_key $scheme$proxy_host$request_uri; proxy_cache_valid 10m; proxy_cache_valid 404 1m; proxy_ignore_headers X-Accel-Expires Expires Cache-Control Set-Cookie; proxy_pass http://unicorn; } Digging into the logs, it looks like we're caching a bit too much and are actually caching the /env/node/puppet node name queries. Here you can see that we generate the results once, then return cached results on the next several queries: GET /production/node/nsp_node_prod? HTTP/1.1 200 13834 - - 0.021 GET /production/node/nsp_node_prod? HTTP/1.1 200 13834 - - 0.000 GET /production/node/nsp_node_prod? HTTP/1.1 200 13834 - - 0.000 GET /production/node/nsp_node_prod? HTTP/1.1 200 13834 - - 0.000 GET /production/node/nsp_node_prod? HTTP/1.1 200 13834 - - 0.000 GET /production/node/nsp_node_prod? HTTP/1.1 200 13834 - - 0.000 So, I have two questions .. 1. What is the purpose of calling the Node API? Is the agent doing this? Why? 2. Is it possible that if an agent called the node api and got its own node information that was wrong, it could then request an invalid catalog? (Note, we're running Puppet 3.4.3 behind Nginx with Unicorn... and yes, even though we use a single node name for these machines, they use different 'facts' to define which packages and roles they are serving up...) Matt Wise Sr. Systems Architect Nextdoor.com -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAOHkZxP02XbPEb29ZnkYztgGtgBZ-BVShkqcyPbduZ1saCSbyQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] How can managed directory be updated after an rpm is upgraded?
If somebody came to me with this question at work, I'd ask why they aren't already managing the files in the directory to eliminate this dependency. There's no refreshonly for files like there is for execs per the type list, so you're out of luck there (not all types can refresh). https://docs.puppetlabs.com/references/latest/type.html#file https://docs.puppetlabs.com/references/latest/metaparameter.html#subscribe In this case, where configs depend very much on the version of the underlying rpm, I might on one hand: 1) create a custom fact with the version of this package https://docs.puppetlabs.com/facter/2.1/custom_facts.html 2) manage files based on the version exposed by this fact (have the files depend on the package so that they're managed after) However, facts are only read once, iirc, so an rpm version change during an agent run will mean that configs are fixed up on the next agent run, leaving the daemon with stale configs for a time. Not desirable. To get around this I might have two sets of manifests, each for the separate rpm version, and use hiera + class parameter to decide which set of rpm+configs gets managed and which gets removed. Toggle the value and I get newer versus older daemons. If I were doing this in a high availability environment I might use the dual manifests to build a new set of servers with the new rpm+configs, while managing the hosts with the old rpm+configs. Then swap those into the load balancer in the same action where I swap the older servers out and carry on. That way if we find a problem we can just swap in the old servers to restore service and go ponder. On Thu, Aug 14, 2014 at 09:44:01AM -0700, Tim Arnold wrote: I want to 'manage' the files in a certain directory ONLY if the rpm is updated. Any help is appreciated. For example (this doesn't work): package { 'package-name' : ensure = 'Version-2', provider = 'rpm', } file { '/home/thisuser/.java' : ensure = directory, subscribe = Package['package-name'], recurse = true, purge = true, force = true, backup = false, source = 'puppet:///modules/test/home/thisuser/.java', } -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to [1]puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit [2]https://groups.google.com/d/msgid/puppet-users/dfdda8af-df09-4fbd-b395-1a419d532564%40googlegroups.com. For more options, visit [3]https://groups.google.com/d/optout. References Visible links 1. mailto:puppet-users+unsubscr...@googlegroups.com 2. https://groups.google.com/d/msgid/puppet-users/dfdda8af-df09-4fbd-b395-1a419d532564%40googlegroups.com?utm_medium=emailutm_source=footer 3. https://groups.google.com/d/optout -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/20140814172850.GA26640%40iniquitous.heresiarch.ca. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] Puppet 'node data' when using common node_names?
We noticed that our puppet reports and our puppet node data stored on our puppet servers is always written out in the form of the 'node name'. So when we use a node name like 'prod_webserver' across many webserver machines, we get a tree of reports and node data like this: /var/lib/puppet/yaml/node/prod_web.yaml /var/lib/puppet/yaml/facts/prod_web.yaml /var/lib/puppet/reports/prod_web /var/lib/puppet/reports/prod_web/201408130200.yaml /var/lib/puppet/reports/prod_web/201408140811.yaml /var/lib/puppet/reports/prod_web/201408121328.yaml /var/lib/puppet/reports/prod_web/201408130743.yaml /var/lib/puppet/reports/prod_web/201408140454.yaml Where each of those reports likely reflects a compilation run for a different host... and the facts/node files at the top are getting constantly re-written as new clients come in. Is there a way to change the behavior of the data there to be written out based on the ${::fqdn} of the host (or certname) rather than its node name? (our client puppet configs ...) [main] ... node_name = facter node_name_fact = puppet_node (a client puppet fact file...) puppet_node=prod_web puppet_environment=production package=frontend=some-version-here app_group=us1 -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/6d296d23-d317-4f3e-ad6c-338af5be68bc%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] How to make puppetlabs_spec_helper ignore modules inside fixtures
I created a small POC module using puppet from master and `puppet module generate` I still have rspec-puppet go inside the apt module in fixtures and execute the tests: Failures: 1) poc with defaults for all parameters should contain Class[poc] Failure/Error: it { should contain_class('poc') } Puppet::Error: This module only works on Debian or derivatives like Ubuntu at /Users/otaeguis/projects/src/test-poc/spec/fixtures/modules/apt/manifests/init.pp:43 on node feniixhq.10.208.50.91 # ./spec/classes/init_spec.rb:5:in `block (3 levels) in top (required)' Here is a link to the puppet module with the POC https://github.com/feniix/puppet-module-rspec-issue Appreciate some guidance on how to solve this. On Wed, Aug 13, 2014 at 10:30 PM, Garrett Honeycutt g...@garretthoneycutt.com wrote: On 8/13/14 9:08 PM, Wil Cooley wrote: On Aug 12, 2014 11:57 AM, Sebastian Otaegui fen...@gmail.com mailto:fen...@gmail.com wrote: Hello all, I have created this module: https://github.com/Spantree/puppet-thrift and everything worked fine all specs ran fine. Now I using the puppetlabs/apt module and when I run the 'rake spec' it is trying to run the 'apt' tests, and it is failing (I think) because I am not providing the appropriate facts. Is there a way to ignore the rspecs inside the fixtures/modules/ directory? I tried to do this: require 'rake' require 'rspec/core/rake_task' RSpec::Core::RakeTask.new(:spec) do |t| t.pattern = 'spec/*/*_spec.rb' end But it didn't work. How about just: require 'puppetlabs_spec_helper/rake_tasks' Hi, +1 to Will Cooley. When you generate a module with `puppet module generate` it will use that single line. https://github.com/puppetlabs/puppet/blob/master/lib/puppet/module_tool/skeleton/templates/generator/spec/spec_helper.rb Best regards, -g -- Garrett Honeycutt @learnpuppet Puppet Training with LearnPuppet.com Mobile: +1.206.414.8658 -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/53EC2D3B.1020009%40garretthoneycutt.com . For more options, visit https://groups.google.com/d/optout. -- Those who do not understand Unix are condemned to reinvent it, poorly. Any sufficiently recent Microsoft OS contains an ad hoc, informally-specified, bug-ridden, slow implementation of half of Unix. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAApMPgw0aw%3Dvkrr_qd_zkoiQCmHCfbupAzBQzHWh3GeTCBfCvA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] How to make puppetlabs_spec_helper ignore modules inside fixtures
On 8/14/14 3:56 PM, Sebastian Otaegui wrote: I created a small POC module using puppet from master and `puppet module generate` I still have rspec-puppet go inside the apt module in fixtures and execute the tests: Failures: 1) poc with defaults for all parameters should contain Class[poc] Failure/Error: it { should contain_class('poc') } Puppet::Error: This module only works on Debian or derivatives like Ubuntu at /Users/otaeguis/projects/src/test-poc/spec/fixtures/modules/apt/manifests/init.pp:43 on node feniixhq.10.208.50.91 # ./spec/classes/init_spec.rb:5:in `block (3 levels) in top (required)' Here is a link to the puppet module with the POC https://github.com/feniix/puppet-module-rspec-issue Appreciate some guidance on how to solve this. On Wed, Aug 13, 2014 at 10:30 PM, Garrett Honeycutt g...@garretthoneycutt.com mailto:g...@garretthoneycutt.com wrote: On 8/13/14 9:08 PM, Wil Cooley wrote: On Aug 12, 2014 11:57 AM, Sebastian Otaegui fen...@gmail.com mailto:fen...@gmail.com mailto:fen...@gmail.com mailto:fen...@gmail.com wrote: Hello all, I have created this module: https://github.com/Spantree/puppet-thrift and everything worked fine all specs ran fine. Now I using the puppetlabs/apt module and when I run the 'rake spec' it is trying to run the 'apt' tests, and it is failing (I think) because I am not providing the appropriate facts. Is there a way to ignore the rspecs inside the fixtures/modules/ directory? I tried to do this: require 'rake' require 'rspec/core/rake_task' RSpec::Core::RakeTask.new(:spec) do |t| t.pattern = 'spec/*/*_spec.rb' end But it didn't work. How about just: require 'puppetlabs_spec_helper/rake_tasks' Hi, +1 to Will Cooley. When you generate a module with `puppet module generate` it will use that single line. https://github.com/puppetlabs/puppet/blob/master/lib/puppet/module_tool/skeleton/templates/generator/spec/spec_helper.rb Best regards, -g -- Garrett Honeycutt @learnpuppet Puppet Training with LearnPuppet.com Mobile: +1.206.414.8658 tel:%2B1.206.414.8658 Hi Sebastian, Your issue is because the module in question is failing if certain facts are not set. In puppetlabs/apt the module fails[1] if $osfamily is not 'Debian'. For your spec tests to succeed you need to set the osfamily fact to Debian. [1] - https://github.com/puppetlabs/puppetlabs-apt/blob/master/manifests/init.pp#L43-45 Best regards, -g -- Garrett Honeycutt @learnpuppet Puppet Training with LearnPuppet.com Mobile: +1.206.414.8658 -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/53ED1BA9.6090107%40garretthoneycutt.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] Re: Wild Card in Augeas
Hi Vikas, On Thu, Aug 14, 2014 at 12:09 AM, Vikas Kumar vikas...@gmail.com wrote: But, this isn't. I tried few combinations of single and double quotes, but none of them are working :( setm *[label() =~ glob('ifcfg-eth*')] NM_CONTROLLED \'no\', The problem is that the Puppet string is enclosed in double quotes, and so the double quote before 'no' ends that string. If you want to quote the 'no' in the file you'll have to escape the double quotes (and there's no need to escape the single quotes): setm *[label() =~ glob('ifcfg-eth*')] NM_CONTROLLED '\no\' Though in this case, there's no need to quote the 'no'. David -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAHN%2BA%2BUTvzZUHGGU3V283MXXu8GfLSpeKvmQLOAMmnSKxseXVA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] How to make puppetlabs_spec_helper ignore modules inside fixtures
Hi Garrett, thanks, just to clarify and make sure I understood, so it is not running the spec.rb files in apt/spec/* but it is just evaluating the facts within the puppet runtime in the apt/manifest/*.pp, right? Thanks On Thu, Aug 14, 2014 at 3:27 PM, Garrett Honeycutt g...@garretthoneycutt.com wrote: On 8/14/14 3:56 PM, Sebastian Otaegui wrote: I created a small POC module using puppet from master and `puppet module generate` I still have rspec-puppet go inside the apt module in fixtures and execute the tests: Failures: 1) poc with defaults for all parameters should contain Class[poc] Failure/Error: it { should contain_class('poc') } Puppet::Error: This module only works on Debian or derivatives like Ubuntu at /Users/otaeguis/projects/src/test-poc/spec/fixtures/modules/apt/manifests/init.pp:43 on node feniixhq.10.208.50.91 # ./spec/classes/init_spec.rb:5:in `block (3 levels) in top (required)' Here is a link to the puppet module with the POC https://github.com/feniix/puppet-module-rspec-issue Appreciate some guidance on how to solve this. On Wed, Aug 13, 2014 at 10:30 PM, Garrett Honeycutt g...@garretthoneycutt.com mailto:g...@garretthoneycutt.com wrote: On 8/13/14 9:08 PM, Wil Cooley wrote: On Aug 12, 2014 11:57 AM, Sebastian Otaegui fen...@gmail.com mailto:fen...@gmail.com mailto:fen...@gmail.com mailto:fen...@gmail.com wrote: Hello all, I have created this module: https://github.com/Spantree/puppet-thrift and everything worked fine all specs ran fine. Now I using the puppetlabs/apt module and when I run the 'rake spec' it is trying to run the 'apt' tests, and it is failing (I think) because I am not providing the appropriate facts. Is there a way to ignore the rspecs inside the fixtures/modules/ directory? I tried to do this: require 'rake' require 'rspec/core/rake_task' RSpec::Core::RakeTask.new(:spec) do |t| t.pattern = 'spec/*/*_spec.rb' end But it didn't work. How about just: require 'puppetlabs_spec_helper/rake_tasks' Hi, +1 to Will Cooley. When you generate a module with `puppet module generate` it will use that single line. https://github.com/puppetlabs/puppet/blob/master/lib/puppet/module_tool/skeleton/templates/generator/spec/spec_helper.rb Best regards, -g -- Garrett Honeycutt @learnpuppet Puppet Training with LearnPuppet.com Mobile: +1.206.414.8658 tel:%2B1.206.414.8658 Hi Sebastian, Your issue is because the module in question is failing if certain facts are not set. In puppetlabs/apt the module fails[1] if $osfamily is not 'Debian'. For your spec tests to succeed you need to set the osfamily fact to Debian. [1] - https://github.com/puppetlabs/puppetlabs-apt/blob/master/manifests/init.pp#L43-45 Best regards, -g -- Garrett Honeycutt @learnpuppet Puppet Training with LearnPuppet.com Mobile: +1.206.414.8658 -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/53ED1BA9.6090107%40garretthoneycutt.com . For more options, visit https://groups.google.com/d/optout. -- Those who do not understand Unix are condemned to reinvent it, poorly. Any sufficiently recent Microsoft OS contains an ad hoc, informally-specified, bug-ridden, slow implementation of half of Unix. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAApMPgzjavk1tyA4BVqN%3DQ2nS705VRswd7wvizeKRhNHgYHozQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] How to make puppetlabs_spec_helper ignore modules inside fixtures
On 8/14/14 4:58 PM, Sebastian Otaegui wrote: Hi Garrett, thanks, just to clarify and make sure I understood, so it is not running the spec.rb files in apt/spec/* but it is just evaluating the facts within the puppet runtime in the apt/manifest/*.pp, right? Thanks On Thu, Aug 14, 2014 at 3:27 PM, Garrett Honeycutt g...@garretthoneycutt.com mailto:g...@garretthoneycutt.com wrote: On 8/14/14 3:56 PM, Sebastian Otaegui wrote: I created a small POC module using puppet from master and `puppet module generate` I still have rspec-puppet go inside the apt module in fixtures and execute the tests: Failures: 1) poc with defaults for all parameters should contain Class[poc] Failure/Error: it { should contain_class('poc') } Puppet::Error: This module only works on Debian or derivatives like Ubuntu at /Users/otaeguis/projects/src/test-poc/spec/fixtures/modules/apt/manifests/init.pp:43 on node feniixhq.10.208.50.91 # ./spec/classes/init_spec.rb:5:in `block (3 levels) in top (required)' Here is a link to the puppet module with the POC https://github.com/feniix/puppet-module-rspec-issue Appreciate some guidance on how to solve this. On Wed, Aug 13, 2014 at 10:30 PM, Garrett Honeycutt g...@garretthoneycutt.com mailto:g...@garretthoneycutt.com mailto:g...@garretthoneycutt.com mailto:g...@garretthoneycutt.com wrote: On 8/13/14 9:08 PM, Wil Cooley wrote: On Aug 12, 2014 11:57 AM, Sebastian Otaegui fen...@gmail.com mailto:fen...@gmail.com mailto:fen...@gmail.com mailto:fen...@gmail.com mailto:fen...@gmail.com mailto:fen...@gmail.com mailto:fen...@gmail.com mailto:fen...@gmail.com wrote: Hello all, I have created this module: https://github.com/Spantree/puppet-thrift and everything worked fine all specs ran fine. Now I using the puppetlabs/apt module and when I run the 'rake spec' it is trying to run the 'apt' tests, and it is failing (I think) because I am not providing the appropriate facts. Is there a way to ignore the rspecs inside the fixtures/modules/ directory? I tried to do this: require 'rake' require 'rspec/core/rake_task' RSpec::Core::RakeTask.new(:spec) do |t| t.pattern = 'spec/*/*_spec.rb' end But it didn't work. How about just: require 'puppetlabs_spec_helper/rake_tasks' Hi, +1 to Will Cooley. When you generate a module with `puppet module generate` it will use that single line. https://github.com/puppetlabs/puppet/blob/master/lib/puppet/module_tool/skeleton/templates/generator/spec/spec_helper.rb Best regards, -g -- Garrett Honeycutt @learnpuppet Puppet Training with LearnPuppet.com Mobile: +1.206.414.8658 tel:%2B1.206.414.8658 tel:%2B1.206.414.8658 Hi Sebastian, Your issue is because the module in question is failing if certain facts are not set. In puppetlabs/apt the module fails[1] if $osfamily is not 'Debian'. For your spec tests to succeed you need to set the osfamily fact to Debian. [1] - https://github.com/puppetlabs/puppetlabs-apt/blob/master/manifests/init.pp#L43-45 Best regards, -g -- Garrett Honeycutt @learnpuppet Puppet Training with LearnPuppet.com Mobile: +1.206.414.8658 tel:%2B1.206.414.8658 Sebastian, Yes. Your manifests include 'apt'. That code needs the osfamily fact and since it is not set to to Debian, the code fails and returns the error to your spec tests. You are not evaluating spec tests under apt. You can see this by changing the output of rspec. Try this before running your spec tests. export SPEC_OPTS=--format documentation Best regards, -g -- Garrett Honeycutt @learnpuppet Puppet Training with LearnPuppet.com Mobile: +1.206.414.8658 -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/53ED2B8E.5090207%40garretthoneycutt.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] Managing multiple hosts in a single service
Using puppetdbquery (https://github.com/dalen/puppet-puppetdbquery), you could do something like this in your manifests - $hosts = query_nodes('Class[memcached]', hostname) And then loop through this in your template - % @hosts.sort.each do |host| -%%= host %:%= @memcached_port % % end -% Matt On Aug 13, 2014, at 9:26 AM, Andrew Melo andrew.m...@gmail.com wrote: Hello, all- I've been (unsuccessfully) looking for/thinking of a solution to the following problem and am unsuccessful, so I figured I'd ask here. If you have a service that's across multiple hosts (say, memcached or a mysql/galera HA cluster) where each node needs to know the hostnames of the other nodes in that service, is there another way to implement this in puppet other than first applying the role to each node in the service and then having a list of hostnames stored as a variable in hiera? I'm new to puppet, so I'm unsure if there's a better practice than having to hardcode the hiera part. Cheers, Andrew -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/085ebdb1-3780-42c7-bc53-ebe682ca8984%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/5878F4E6-60A3-4FAC-80B9-B1F82C465685%40gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] Managing multiple hosts in a single service
The Puppet Practitioner course talks about this. Look at exported resources and exported resource collectors Each node exports the resource then can collect the set ( probably , by doubt the puppetdb query under the hood) On Aug 14, 2014, at 6:44 PM, Matthew Schmitt killas...@gmail.com wrote: Using puppetdbquery (https://github.com/dalen/puppet-puppetdbquery), you could do something like this in your manifests - $hosts = query_nodes(‘Class[memcached]', hostname) And then loop through this in your template - % @hosts.sort.each do |host| -%%= host %:%= @memcached_port % % end -% Matt On Aug 13, 2014, at 9:26 AM, Andrew Melo andrew.m...@gmail.com wrote: Hello, all- I've been (unsuccessfully) looking for/thinking of a solution to the following problem and am unsuccessful, so I figured I'd ask here. If you have a service that's across multiple hosts (say, memcached or a mysql/galera HA cluster) where each node needs to know the hostnames of the other nodes in that service, is there another way to implement this in puppet other than first applying the role to each node in the service and then having a list of hostnames stored as a variable in hiera? I'm new to puppet, so I'm unsure if there's a better practice than having to hardcode the hiera part. Cheers, Andrew -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/085ebdb1-3780-42c7-bc53-ebe682ca8984%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/5878F4E6-60A3-4FAC-80B9-B1F82C465685%40gmail.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/22A5D19A-294A-4161-B9C7-AB25988AE058%40gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] Re: Exported resources applied on exporting host - EL7 only
snip lots of debug output that is just noise And AH HA! I did grep -HnR Firewall /etc/puppet/environments/production/modules/*/manifests/ and see the problem, I'm using older version of puppetlabs-firewall that does Package['iptables-services'] - Firewall || for EL7. I had not pushed my fork to my master, and what's worse is I'm the one who did the PR to fix the autorequire :-X *face palm*. Excuse my noise. - Trey Alternatively, are you certain that there is no other Firewall| | collector somewhere in your manifests that might be picking up the rules at issue? John -- You received this message because you are subscribed to a topic in the Google Groups Puppet Users group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/puppet-users/3AaOJpPvGSI/unsubscribe. To unsubscribe from this group and all its topics, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/2880f45a-ae80-4ee2-99a2-a24a551961cc%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAN0oX1a4NT1LavNZAv7jv%3DaMBoctM5D06PN6fh5%3DkP3T9%3DxSXQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] Re: Wild Card in Augeas
Awesome David, many thanks for the explanation and the code as well, works like a charm. Regards, Vikas On Friday, 15 August 2014 06:47:58 UTC+10, David Lutterkort wrote: Hi Vikas, On Thu, Aug 14, 2014 at 12:09 AM, Vikas Kumar vika...@gmail.com javascript: wrote: But, this isn't. I tried few combinations of single and double quotes, but none of them are working :( setm *[label() =~ glob('ifcfg-eth*')] NM_CONTROLLED \'no\', The problem is that the Puppet string is enclosed in double quotes, and so the double quote before 'no' ends that string. If you want to quote the 'no' in the file you'll have to escape the double quotes (and there's no need to escape the single quotes): setm *[label() =~ glob('ifcfg-eth*')] NM_CONTROLLED '\no\' Though in this case, there's no need to quote the 'no'. David -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/aabe1d6c-02b1-44bd-a72d-d6c42bc9f66b%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.