Friday, 2008-04-25

[2008/04/25 00:44:09] <gepetto> ::puppet:: Ticket #1203 (defect created): directoryservice provider should use "." instead of "/" @ http://reductivelabs.com/trac/puppet/ticket/1203 (by asa@assembleco.com)
[2008/04/25 00:45:57] <jamesturnbull> lak: re #1200 - really? we should cater for DNS failures? I'd like it fail cleaner but surely it shoudl fail on a "server not found erro"?
[2008/04/25 00:46:00] <gepetto> jamesturnbull: lak: #1200 is http://reductivelabs.com/trac/puppet/ticket/1200 "puppetd exits when dns resolution fails and client doesn't have a certificate yet"
[2008/04/25 00:46:25] <lak> i'm not sure it can
[2008/04/25 00:46:51] <lak> i think it's reasonable to expect the client to continue running unless it is actually broken internally
[2008/04/25 00:46:59] <jamesturnbull> fair enough
[2008/04/25 00:47:01] <lak> dns failure seems likely to be transient
[2008/04/25 00:47:21] <lak> and if you bring up a couple hundred boxes and screwed up your dns, you're not going to want to ssh to all of them just to bounce puppetd
[2008/04/25 00:47:29] <jamesturnbull> lak: true
[2008/04/25 00:47:50] <jamesturnbull> lak: kind of defeats the purpose of oh say a configuration management tool
[2008/04/25 00:47:57] <lak> jamesturnbull: btw, any help on classifying the "unknown" tickets would be great :)
[2008/04/25 00:48:07] <lak> http://reductivelabs.com/trac/puppet/query?status=new&status=assigned&status=reopened&component=unknown&order=type
[2008/04/25 00:48:34] <lak> i need to figure out what extra components need to be created
[2008/04/25 00:48:41] <duritong> the same is with #1199 when your puppetmaster dies
[2008/04/25 00:48:44] <gepetto> duritong: #1199 is http://reductivelabs.com/trac/puppet/ticket/1199 "puppetd dies after connection to puppetmaster fails"
[2008/04/25 00:48:53] <duritong> i try currently to get a trace for this bug
[2008/04/25 00:49:34] <jamesturnbull> duritong: yeah - overall the client needs to be more robust
[2008/04/25 00:50:03] <duritong> yeah
[2008/04/25 00:50:32] <Volcane> hmm, very unusual status message: have a defined type that passes its $ensure on to a file resource
[2008/04/25 00:50:43] <Volcane> when setting ensure on the defined type to absent it correctly removes the file
[2008/04/25 00:50:45] @ Quit: Wakko666: Read error: 104 (Connection reset by peer)
[2008/04/25 00:50:47] <Volcane> but
[2008/04/25 00:51:23] <Volcane> with this message: (//Node[dev1]/apache::www/apache::vhosts/Apache::Vhost[chicago.my.com]/File[/etc/apache2/sites-enabled/chicago.my.com.conf]/ensure) created file with contents {md5}7d9d956ed56c1e03d43880e8847307bc
[2008/04/25 00:51:34] <Volcane> ie. created file with md5 etc, when its removing a file
[2008/04/25 00:51:46] <lak> that's pretty odd
[2008/04/25 00:52:24] <Volcane> and if i take the ensure out again
[2008/04/25 00:52:31] @ Wakko666 joined channel #puppet
[2008/04/25 00:52:35] <Volcane> i get the replacing file with md5 etc type message
[2008/04/25 00:53:07] <jamesturnbull> lak: is there a list of the new components and their purpose?
[2008/04/25 00:53:18] <lak> yeah, there's a list
[2008/04/25 00:53:30] <lak> http://reductivelabs.com/trac/puppet/admin/ticket/components
[2008/04/25 00:53:38] <lak> i added comments where it seemed there might be confusion
[2008/04/25 00:54:06] <lak> i'm not entirely convinced that's the way to do it -- have tons of components -- but it's at least better than it was
[2008/04/25 00:56:17] <jamesturnbull> can i add? LDAP for example?
[2008/04/25 00:56:27] <Volcane> heh even odder, when it puts the file back the replaced message has:
[2008/04/25 00:56:29] <Volcane> changed file contents from {md5}7d9d956ed56c1e03d43880e8847307bc to {md5}7d9d956ed56c1e03d43880e8847307bc
[2008/04/25 00:56:35] <Volcane> which are identical md5's
[2008/04/25 00:58:59] <ashp_> volcane: Ahaha, that's definitely weird.
[2008/04/25 01:00:23] @ zobbo_ joined channel #puppet
[2008/04/25 01:02:00] @ freiheit joined channel #puppet
[2008/04/25 01:19:38] @ Quit: Innocenti: Client Quit
[2008/04/25 01:21:23] <gepetto> ::puppet:: Ticket #792 (enhancement closed): When using external_nodes with certname identification, domain is ... @ http://reductivelabs.com/trac/puppet/ticket/792#comment:5 (by james@lovedthanlost.net)
[2008/04/25 01:26:28] <Volcane> in a module, what is the correct place to put defined types?
[2008/04/25 01:27:28] @ Quit: jY: Remote closed the connection
[2008/04/25 01:30:12] @ Quit: kolla: Remote closed the connection
[2008/04/25 01:34:18] @ kposs joined channel #puppet
[2008/04/25 01:46:41] @ treacle joined channel #puppet
[2008/04/25 01:50:53] <benp-> Volcane, they could go in init.pp or you could mkdir manifests/defines and put import "defines/*.pp" in your init.pp[2008/04/25 01:50:53] <gepetto> ::puppet:: Puppet MacOSX edited by daniel_shown @ http://reductivelabs.com/trac/puppet/wiki/PuppetMacOSX (by shownde@slu.edu)
[2008/04/25 01:51:19] <Volcane> benp-: kewl, thought they had a automatic place like templates etc, been putting them in init yeah
[2008/04/25 01:56:55] @ Quit: zobbo_: Read error: 113 (No route to host)
[2008/04/25 01:58:54] @ Quit: lak:
[2008/04/25 01:59:00] @ Quit: andrewcshafer:
[2008/04/25 02:13:50] <chadh> Any idea why puppet is changing an ensure from 'file' to 'link'? This seems to be a 0.24.4-related change
[2008/04/25 02:15:28] @ brscott joined channel #puppet
[2008/04/25 02:15:54] <chadh> hmm. well, my source is a symlink, but I actually want its target installed. I guess that behavior changed
[2008/04/25 02:15:59] <ashp_> warning: XMLRPC returned wrong size. Retrying.
[2008/04/25 02:16:00] <ashp_> warning: XMLRPC returned wrong size. Retrying.
[2008/04/25 02:16:05] <ashp_> whoops, i only wanted to paste that once.
[2008/04/25 02:16:08] <ashp_> Should I worry about this?
[2008/04/25 02:21:49] <stick> what's the default environment for multiple env setups?
[2008/04/25 02:23:58] <duritong> currently development
[2008/04/25 02:24:03] <duritong> it will change to production
[2008/04/25 02:24:59] <stick> duritong: thanks
[2008/04/25 02:25:00] <Volcane> sheesh, it should warn when you try to use $type as argument to defined types
[2008/04/25 02:25:24] <Volcane> Redirect <%= type %> / <%= destination %>
[2008/04/25 02:25:26] <Volcane> turns into
[2008/04/25 02:25:41] <Volcane> Redirect Puppet::Parser::TemplateWrapper / http://somewhere.com/
[2008/04/25 02:25:52] <Volcane> heh
[2008/04/25 02:26:20] @ jvanzyl joined channel #puppet
[2008/04/25 02:28:05] @ brscott left channel #puppet ()
[2008/04/25 02:31:35] @ yure joined channel #puppet
[2008/04/25 02:31:39] @ patobrien joined channel #puppet
[2008/04/25 02:38:14] <stick> is 1.3.8 the latest facter?
[2008/04/25 02:38:28] * stick has found that it doesn't create facts for aliased interfaces
[2008/04/25 02:39:15] @ Quit: DerekW: "Leaving"
[2008/04/25 02:39:46] @ shake-n-bake joined channel #puppet
[2008/04/25 02:41:43] @ Quit: tim|mb: "This computer has gone to sleep"
[2008/04/25 02:42:07] @ randybias joined channel #puppet
[2008/04/25 02:54:06] @ Quit: treacle: "http://www.mibbit.com ajax IRC Client"
[2008/04/25 02:54:10] @ Quit: shake-n-bake: Read error: 104 (Connection reset by peer)
[2008/04/25 03:03:35] @ shake-n-bake_ joined channel #puppet
[2008/04/25 03:04:23] <chadh> Does anyone have a good example of a subclass of File that has "fall-back" sources?
[2008/04/25 03:05:07] <chadh> I have seen the "install_file" define that lots of people use, but I a new File class might be a cleaner way to do it
[2008/04/25 03:07:20] @ ezralini joined channel #puppet
[2008/04/25 03:11:41] <stick> chadh: you mean something like:
[2008/04/25 03:12:32] <stick> source => [ "puppet:///foo/${fqdn}/foo", "puppet:///foo/foo" ], ?
[2008/04/25 03:12:41] <stick> that what you mean by fallback?
[2008/04/25 03:16:58] <holoway> stick: a patch for the aliased ethernet interfaces would be great
[2008/04/25 03:17:05] <holoway> and probably pretty simple
[2008/04/25 03:17:12] <holoway> (it might already be in trunk, actually..)
[2008/04/25 03:18:28] <jamesturnbull> stick: 1.3.8 is the latest
[2008/04/25 03:18:45] <jamesturnbull> stick: the master branch works mostly but it's not perfect
[2008/04/25 03:19:03] <jamesturnbull> stick: feel free to log a ticket in the Facter trac for specific issues
[2008/04/25 03:23:20] <stick> I'm going to start it as a custom fact and then see if I can merge it into facter and submit a patch
[2008/04/25 03:23:48] <jamesturnbull> stick: what's the actual problem?
[2008/04/25 03:24:14] <stick> facter doesn't set facts for aliased interfaces (at least on rhel)
[2008/04/25 03:24:33] <holoway> ie: eth0:1
[2008/04/25 03:24:41] <jamesturnbull> stick: ah
[2008/04/25 03:24:49] <jamesturnbull> stick: that's fixed in the git repo
[2008/04/25 03:25:07] <jamesturnbull> stick: umm see #1145 I think
[2008/04/25 03:25:10] <gepetto> jamesturnbull: stick: #1145 is http://reductivelabs.com/trac/puppet/ticket/1145 "facts with colons are invalid"
[2008/04/25 03:25:10] <stick> jamesturnbull: ah, cool, so when is 1.8.4 expected out?
[2008/04/25 03:25:52] <jamesturnbull> stick: ah interesting question
[2008/04/25 03:26:00] <stick> ahh hmm so looks like I'm going to have issues on the puppet end as well
[2008/04/25 03:30:34] <jamesturnbull> stick: it was extensively refactored and not finished yet
[2008/04/25 03:30:45] <jamesturnbull> stick: what's broken on the puppet end?
[2008/04/25 03:34:42] <stick> jamesturnbull: nothing yet :), but it appears from that bug that I can't reference a fact with colon in it
[2008/04/25 03:35:04] <stick> though now that I think about it that may not be an issue for me since I'm doing it in a template not in a manifest
[2008/04/25 03:36:06] <jamesturnbull> stick: yeah that's a ruby thing - I originally wrote the alias support for interfaces using a colon
[2008/04/25 03:36:38] <jamesturnbull> stick: luke informed me that using the colon is a nono for ruby variables
[2008/04/25 03:37:18] @ \ask joined channel #puppet
[2008/04/25 03:37:21] <stick> yeah method smethod :)
[2008/04/25 03:37:27] @ Quit: \ask: Read error: 104 (Connection reset by peer)
[2008/04/25 03:38:00] @ \ask joined channel #puppet
[2008/04/25 03:46:01] @ Quit: m1n3s6: "auf wiedersehen"
[2008/04/25 03:51:11] @ Quit: johnf: Read error: 110 (Connection timed out)
[2008/04/25 04:05:35] <ashp_> urgh i really must fix my dependencies, i think it just tried to set up rhn_register before it did the network part
[2008/04/25 04:05:50] <ashp_> if you have a baseclass that jstu does include blah, include blah2, include blah3, does ordering matter
[2008/04/25 04:05:59] <ashp_> because i'd really like to force it to do the network first
[2008/04/25 04:09:21] <benp-> try moving it to the top and see if it's happening in the right order by running puppetd with --debug
[2008/04/25 04:09:51] <stick> in general you can't rely on order in a manifest
[2008/04/25 04:10:03] <stick> though I *think* includes all get processed first
[2008/04/25 04:10:31] @ authentic joined channel #puppet
[2008/04/25 04:11:00] * benp- nods.. thats why i'd say try it and see what happens
[2008/04/25 04:13:54] <ashp_> i'll give it a shot
[2008/04/25 04:13:56] <ashp_> one more weird question
[2008/04/25 04:14:09] <ashp_> in a module, 'dns', I have $puppet = "puppetserverip"
[2008/04/25 04:14:24] <ashp_> is there a way I can override this in a node def
[2008/04/25 04:14:30] <ashp_> just throw in a $puppet there?
[2008/04/25 04:15:12] <benp-> as long as you set it before including your dns module
[2008/04/25 04:15:23] <benp-> (ya)
[2008/04/25 04:15:50] <chillitom> if $puppet {} else { $puppet ="blah" }
[2008/04/25 04:15:56] <chillitom> ormaybe
[2008/04/25 04:16:02] <ashp_> good, that should work then, I just realised my boss has screwed up everything to do with the firewall
[2008/04/25 04:16:15] <ashp_> so now i need to define if a box is inside or outside and then set the puppet address based on that
[2008/04/25 04:17:45] <benp-> i'd use a fact for that, rather than setting $puppet lots of times in various nodes
[2008/04/25 04:18:04] <benp-> unless its just a few
[2008/04/25 04:18:31] <ashp_> I'm guessing it's going to be half and half
[2008/04/25 04:18:34] <ashp_> I just haven't messed with facts
[2008/04/25 04:18:55] <ashp_> is it possible to make a fact that says 'if the server is on 10.241.209.0/24, set $puppet to X'?
[2008/04/25 04:19:04] <ashp_> or you know, however you do it, I haven't dared mess with that.
[2008/04/25 04:19:22] @ andrewcshafer joined channel #puppet
[2008/04/25 04:20:18] @ lak joined channel #puppet
[2008/04/25 04:20:22] <ashp_> eventually when i move to an external node database I was going to tag them in there and use the tag to determine which variable to use
[2008/04/25 04:20:28] <ashp_> as that seems the easiest way
[2008/04/25 04:20:57] <ashp_> i checked and adding $puppet in the node didn't override it (which I expect as modules have their own namespace)
[2008/04/25 04:21:12] @ kyrh joined channel #puppet
[2008/04/25 04:22:49] <kyrh> I trying to use environments. Currently, client can't backup changed file with message "puppetd[6365]: Configuration could not be instantiated: Could not find filebucket server at /var/puppet/environments/development/modules/ntp/manifests/init.pp"
[2008/04/25 04:23:04] <benp-> ah, didn't know you were planning to use external nodes.. it probably makes more sense for you to not use a fact then..
[2008/04/25 04:23:19] <kyrh> I'ts true -- filebucket defined in site.pp
[2008/04/25 04:23:49] <benp-> ya if you set $puppet inside a class its $classname::puppet
[2008/04/25 04:26:25] @ Quit: andrewcshafer:
[2008/04/25 04:26:39] <kyrh> benp-: sorry. is this messages for me?
[2008/04/25 04:27:13] <benp-> no
[2008/04/25 04:27:31] @ andrewcshafer joined channel #puppet
[2008/04/25 04:28:27] @ asa joined channel #puppet
[2008/04/25 04:28:57] @ Quit: asa: Client Quit
[2008/04/25 04:29:02] <kyrh> could somebody learn me, how to configure one filebucket on server, when I using several environments, please?
[2008/04/25 04:29:54] @ Quit: \ask:
[2008/04/25 04:29:58] @ asa joined channel #puppet
[2008/04/25 04:30:30] <ashp_> I want to use external nodes, I just haven't got that far yet
[2008/04/25 04:30:36] <ashp_> I had to learn ldap first, which has been done :)
[2008/04/25 04:30:50] <ashp_> lak: Is there an easy way to override a modules variable in a node def?
[2008/04/25 04:32:19] @ \ask joined channel #puppet
[2008/04/25 04:33:05] <kyrh> ashp_: sorry. Why you want using ldap? What a benefits in this case?
[2008/04/25 04:34:04] <lak> ashp_: no, there's no way to do it
[2008/04/25 04:34:08] <duritong> configuring your puppet environment in external tools
[2008/04/25 04:35:15] <kyrh> duritong: it's about central filebucket?
[2008/04/25 04:35:53] <duritong> no it was the answer to the question why you may use ldap for nodes
[2008/04/25 04:37:25] @ Quit: oxtail: Connection timed out
[2008/04/25 04:42:47] <zirpu> c
[2008/04/25 04:44:17] @ shadoi joined channel #puppet
[2008/04/25 04:47:36] <kyrh> could, please, somebody look, where is problem? My config: http://paste.org.ru/?u1auoi
[2008/04/25 04:50:17] <shadoi> kyrh: what's the error?
[2008/04/25 04:51:31] <kyrh> shadoi: Configuration could not be instantiated: Could not find filebucket server at /var/puppet/environments/development/modules/ntp/manifests/init.pp:16
[2008/04/25 04:52:06] <shadoi> yeah you need to define the "server" filebucket
[2008/04/25 04:52:16] <shadoi> https://reductivelabs.com/trac/puppet/wiki/TypeReference#filebucket
[2008/04/25 04:53:04] <shadoi> the default filebucket is used by default though, you don't have to define a different one unless you want to change the location.
[2008/04/25 04:53:05] <kyrh> shadoi: site.pp have this.
[2008/04/25 04:53:31] <shadoi> no, you just have a default: File { backup => server }
[2008/04/25 04:53:47] <shadoi> you need filebucket { server: server => puppet }
[2008/04/25 04:53:48] <shadoi> for that to work
[2008/04/25 04:54:06] <shadoi> "server" is probably a bad name for it though.
[2008/04/25 04:57:31] @ ashp_ is now known as ashp
[2008/04/25 04:57:36] <kyrh> shadoi: thanks. currently I have next error on master side: err: Could not call: Mounts without paths are not usable
[2008/04/25 04:57:47] <kyrh> and on client: No specified sources exist
[2008/04/25 04:58:18] * kyrh -- newbie. sorry.
[2008/04/25 05:01:55] <shadoi> https://reductivelabs.com/trac/puppet/wiki/TypeReference#mount
[2008/04/25 05:02:03] <shadoi> the name of the resource must be a path.
[2008/04/25 05:02:10] <shadoi> the path that you want mounted
[2008/04/25 05:02:44] <shadoi> mount { "/full/path/to/mount": ... }
[2008/04/25 05:03:15] @ Quit: lak:
[2008/04/25 05:04:02] <kyrh> shadoi: I trying to use modules.
[2008/04/25 05:04:26] <kyrh> shadoi: http://reductivelabs.com/trac/puppet/wiki/ModuleOrganisation
[2008/04/25 05:12:20] <kyrh> shadoi: in this case, I don't need "/full/path/..".
[2008/04/25 05:12:29] <shadoi> it's _required_
[2008/04/25 05:12:36] <ashp> hmm, do i need to modify fileserver.conf to enable [modules] for files under modules?
[2008/04/25 05:14:03] <shadoi> ashp: no
[2008/04/25 05:14:12] <shadoi> it works by default
[2008/04/25 05:14:36] <ashp> hmm, ok, i wonder what i'm doing wrong then :)
[2008/04/25 05:14:47] <ashp> warning: //Node[hlslinutil02.law.harvard.edu]/cobbler/cobbler::settings/File[/etc/xinetd.d/tftp]/source: No specified sources exist
[2008/04/25 05:14:56] <ashp> source => "puppet://puppet/cobbler/files/xinetd.d/tftp",
[2008/04/25 05:15:08] <shadoi> don't specify files
[2008/04/25 05:15:11] <shadoi> it's implicit
[2008/04/25 05:15:13] <ashp> oh, rats
[2008/04/25 05:15:43] <kyrh> shadoi: http://paste.org.ru/?f8aao1 . I'm sorry, but what I can write to path, when I using modules?
[2008/04/25 05:15:51] <kyrh> shadoi: modulepath?
[2008/04/25 05:16:35] <shadoi> kyrh: that's correct
[2008/04/25 05:17:13] <shadoi> kyrh: the error your seeing seems to refer to a "mount" resource, not a module
[2008/04/25 05:17:45] <ashp> i started dragging all my files inside the modules, so I ran into a few oddities
[2008/04/25 05:18:17] @ RainDoctor joined channel #puppet
[2008/04/25 05:18:58] <ashp> i haven't looked into it but my boss asked me.. can you apply multiple tags in an external node database?
[2008/04/25 05:19:19] <shadoi> ashp: btw, you don't have to specify "puppet" as the servername, you can just do puppet:///
[2008/04/25 05:19:51] <ashp> shadoi: i thought so, I added it in when things were failing, but it was the files/ bit
[2008/04/25 05:20:00] <duritong> can I find anywhere an exisitng module with the new nagios_cmds?
[2008/04/25 05:20:12] <kyrh> shadoi: no-no... It's continue for my example. I have very simple config currently. Without any declared "mount" resources: http://paste.org.ru/?nywchc
[2008/04/25 05:20:21] <ashp> shadoi: I ran into the problem whereby depending on the network hosts are on, they need to point to different ip's for the puppet server.
[2008/04/25 05:20:34] <ashp> shadoi: I'm thinking an external node database, with tags, and then set the server based on that is the cleanest option.
[2008/04/25 05:20:39] <ashp> Have you dealt with anything similar?
[2008/04/25 05:20:43] <shadoi> ashp: it's only classes and parameters.
[2008/04/25 05:20:48] <shadoi> for the external nodes tool
[2008/04/25 05:21:04] <ashp> I just don't know how I'm supposed to handle this :/
[2008/04/25 05:21:49] <ashp> i wish facter had 'network' as well as 'ip', that's the other option, add a custom fact
[2008/04/25 05:22:00] <ashp> that grabs the network, and then case on that to pick the ip to put into the hosts file
[2008/04/25 05:22:30] <shadoi> kyrh: ah I see, just remove the "modules" from your source paths
[2008/04/25 05:22:35] <shadoi> kyrh: in the ntp module
[2008/04/25 05:23:00] <shadoi> ashp: yeah, custom fact is simple for that
[2008/04/25 05:23:13] <ashp> I haven't touched custom facts so I'll head off to the documentation. :)
[2008/04/25 05:23:19] <ashp> i've been avoiding this moment
[2008/04/25 05:23:21] <shadoi> it's super easy
[2008/04/25 05:23:50] <ashp> oh, I can probably modify this if needs be: http://reductivelabs.com/trac/puppet/wiki/Recipes/NetworksFactsRecipe
[2008/04/25 05:24:02] <shadoi> yeah
[2008/04/25 05:24:04] <shadoi> https://reductivelabs.com/trac/puppet/wiki/AddingFacts
[2008/04/25 05:24:28] <kyrh> shadoi: Thank you. It's work. :)
[2008/04/25 05:24:38] <ashp> Hmm, I guess I'm going to have to take over puppetd.conf and distribute that to clients to enable factsync
[2008/04/25 05:24:44] <ashp> or do i just need it on the puppetmaster?
[2008/04/25 05:24:52] <shadoi> ashp: yeah you need to push it
[2008/04/25 05:25:08] <shadoi> which can be a bit of a race condition in some situations... I repackaged the client and added it as a default
[2008/04/25 05:25:18] <benp-> is factsync deprecated?
[2008/04/25 05:25:27] <shadoi> benp-: supposedly
[2008/04/25 05:25:31] <shadoi> I think it should stay
[2008/04/25 05:25:39] <shadoi> you're supposed to put them in modules now
[2008/04/25 05:26:17] <shadoi> global facts usually make the most sense though
[2008/04/25 05:28:19] <benp-> yeah
[2008/04/25 05:30:08] <ashp> Oh. hmm.
[2008/04/25 05:30:16] <ashp> So I can add custom facts to modules?
[2008/04/25 05:30:20] <shadoi> yup
[2008/04/25 05:30:25] <ashp> I mean in this case, finding out a network, that to me seems global
[2008/04/25 05:30:29] <shadoi> yeah
[2008/04/25 05:31:07] <ashp> well, here's another vote for lak not to remove it, some facts are global and reused all over[2008/04/25 05:31:07] <gepetto> ::puppet:: Recipes/Networks Facts Recipe edited by pietro @ http://reductivelabs.com/trac/puppet/wiki/Recipes/NetworksFactsRecipe
[2008/04/25 05:31:27] <benp-> you could just make a module called globalfacts
[2008/04/25 05:31:35] <shadoi> hehe this is true
[2008/04/25 05:31:51] <shadoi> or just add it to a "common" module, which I think DavidS does
[2008/04/25 05:32:57] <pietros> stick: i updated NetworkFactRecipe with an work around the colon problem
[2008/04/25 05:33:10] <stick> pietros: ahh cool
[2008/04/25 05:34:21] <stick> pastie: url
[2008/04/25 05:34:41] <pastie> http://pastie.org/186366 by stick.
[2008/04/25 05:34:51] <stick> that's the custom fact I'm currently using
[2008/04/25 05:34:58] @ fbe joined channel #puppet
[2008/04/25 05:35:12] <stick> brenton wrote it at my urging, seems to work ok, though I'm having some problems interpolating it into my template
[2008/04/25 05:35:14] <ashp> you should have just added in network so I could cut and paste it :D
[2008/04/25 05:39:00] @ Quit: fbe: Remote closed the connection
[2008/04/25 05:39:15] @ fbe joined channel #puppet
[2008/04/25 05:40:59] @ shenson is now known as shenson_not_here
[2008/04/25 05:42:09] @ ezralini_ joined channel #puppet
[2008/04/25 05:46:31] <ashp> oh no i'm trying to write real ruby code, this will end badly :)
[2008/04/25 05:46:48] <shadoi> ruby is your friend.
[2008/04/25 05:46:54] <shadoi> you love ruby.
[2008/04/25 05:47:08] <ashp> I want to love ruby, I'm just terrible at logical thinking, which is terrible for a sysadmin
[2008/04/25 05:47:23] <shadoi> I used to feel that way, before ruby. :)
[2008/04/25 05:47:29] <shadoi> I hated programming
[2008/04/25 05:47:34] <shadoi> always used bash
[2008/04/25 05:47:38] <ashp> i decided to try and parse ip -f inet addr show
[2008/04/25 05:47:42] <RainDoctor> lol
[2008/04/25 05:47:48] <ashp> and match on inet \d\d\d, we'll see.
[2008/04/25 05:47:51] <RainDoctor> logical thinking is terrible?
[2008/04/25 05:47:52] <RainDoctor> hehe
[2008/04/25 05:48:56] <shadoi> ashp: rubular.com is helpful with the ruby regex quirks
[2008/04/25 05:49:19] <benp-> rad, thanks for that
[2008/04/25 05:49:56] <shadoi> my other favorite site for API lookups is gotapi.com/rubyrails
[2008/04/25 05:50:28] <ashp> i have this ruby v3 book i bought
[2008/04/25 05:50:44] <shadoi> books suck for API reference
[2008/04/25 05:51:13] @ mccune joined channel #puppet
[2008/04/25 05:51:46] <shadoi> I have pickaxe and such, but I just always go here anyway: http://www.ruby-doc.org/docs/ProgrammingRuby/
[2008/04/25 05:52:17] <shadoi> crappy site.. but *shrug*
[2008/04/25 05:52:28] <randybias> me too, but some things are awfully out of date there these days
[2008/04/25 05:52:31] <benp-> is that the first ed of the pickaxe?
[2008/04/25 05:52:31] <randybias> I think that's v1
[2008/04/25 05:53:26] <shadoi> meh, I only use it for reference core language stuff
[2008/04/25 05:53:27] <ashp> I think it's the pickaxe I have, v3
[2008/04/25 05:53:35] <ashp> I'm useless at programming so it's frustrating to try and use a new language
[2008/04/25 05:53:39] <ashp> I know what I want to do, just not the methods to do so
[2008/04/25 05:54:00] @ shenson_not_here is now known as shenson
[2008/04/25 05:54:12] <shadoi> ashp: in #ruby half the type people type out "how do I do x with ruby" and the answer is to juse use what they typed.. heh
[2008/04/25 05:54:37] <ashp> network.rb: print mynetworkthanks
[2008/04/25 05:54:42] <shadoi> haha
[2008/04/25 05:55:29] <shadoi> that'll work fine, just set mynetworkthanks properly.
[2008/04/25 05:55:33] <shadoi> :P
[2008/04/25 05:55:34] <ashp> so I imagine I want to use output.match(regexp)
[2008/04/25 05:55:50] <ashp> and then do { |line| or something like you have |str| in this networksfactsrecipe
[2008/04/25 05:55:53] <shadoi> yeah.. or =~ is faster I hear
[2008/04/25 05:56:18] <ashp> the interation stuff still confuses me :)
[2008/04/25 05:56:40] <shadoi> {|var| ... } is a block, think of it as a nameless function
[2008/04/25 05:57:04] <shadoi> when you call an iterator method you pass it that nameless function to operate on each interaction
[2008/04/25 05:57:07] <shadoi> interation*
[2008/04/25 05:57:12] <shadoi> iteration*!!
[2008/04/25 05:58:05] <shadoi> {|var| ... } is the same as a multi-line: do |var| ... end
[2008/04/25 05:58:32] @ Quit: ezralini: Read error: 110 (Connection timed out)
[2008/04/25 05:58:58] <shadoi> blocks are probably my favorite feature of ruby
[2008/04/25 06:00:06] * shadoi will stop gushing now.
[2008/04/25 06:00:14] <ashp> i'm just going to play around with some test 'facts' that don't use facter
[2008/04/25 06:00:18] <ashp> just parsing various things
[2008/04/25 06:00:20] <ashp> until I get the hang of this
[2008/04/25 06:00:45] <shadoi> ashp: use irb
[2008/04/25 06:00:50] <shadoi> speeds things up
[2008/04/25 06:01:12] <ashp> i suppose i should , while I get to grips with this
[2008/04/25 06:01:19] <ashp> i just need to work out the regexps because I can't do:
[2008/04/25 06:01:19] <ashp> output.match(/inet(\d+)(:\d+)(:\d+)/) { |line|
[2008/04/25 06:03:21] <ashp> oh well, this would never work anyway as i want .'s not :'s :)
[2008/04/25 06:04:49] <chadh> Does distributing facts with modules work now?
[2008/04/25 06:04:53] <ashp> oh hmm, I can't do output = %x{command} for some reason.
[2008/04/25 06:06:33] <chadh> ahh. I see. Last time I looked at this, I was pre-0.24. Looks like it is supported now: PluginsInModules
[2008/04/25 06:06:41] @ windowsrefund joined channel #puppet
[2008/04/25 06:07:15] <windowsrefund> I've got a dependency cycle problem that I could use a hand with
[2008/04/25 06:08:11] @ lak joined channel #puppet
[2008/04/25 06:09:03] <windowsrefund> http://pastebin.com/m429a3168
[2008/04/25 06:09:10] <windowsrefund> hello Luke
[2008/04/25 06:10:02] <lak> hi
[2008/04/25 06:10:45] <chadh> I don't understand what pluginsource is for?
[2008/04/25 06:11:14] <chadh> If you are using pluginsinmodules, shouldn't that remove the need for pluginsource?
[2008/04/25 06:15:12] <ashp> http://pastebin.com/d49f4d373 <-- that's what I tried while testing, can anyone tell me why print line returns no output?
[2008/04/25 06:15:23] <ashp> I know that this is a really retarded way to build a fact also, I'm just testing
[2008/04/25 06:17:33] @ Quit: Zothar_Work: "ChatZilla 0.9.81 [Firefox 2.0.0.14/2008040414]"
[2008/04/25 06:18:11] <shadoi> ashp: inet\s+(\d+\.\d+\.\d+\.\d+\/\d+).*eth(\d+)
[2008/04/25 06:18:26] <shadoi> gives you the network and the interface #
[2008/04/25 06:18:46] <ashp> that's true, I suppose that would be useful
[2008/04/25 06:18:52] <benp-> should be %x{ .. } not %x[ .. ]
[2008/04/25 06:19:01] <ashp> I just don't get why print line returns nothing, shouldn't line contain the results of the regexp?
[2008/04/25 06:19:11] <windowsrefund> I'm trying to ensure services and stopped and started in a particular sequence if and when yum updates a package. Would someone mind offering their observations of http://pastebin.com/m429a3168
[2008/04/25 06:19:13] <ashp> benp: I thought that, but the docs said [] for some reason :/
[2008/04/25 06:19:39] <benp-> oh, []s work too.. sorry
[2008/04/25 06:19:44] <windowsrefund> that should have read "services are stopped and started..."
[2008/04/25 06:19:47] <ashp> i just don't get why I can't get any output
[2008/04/25 06:19:49] <shadoi> ashp: because your regex doesn't match
[2008/04/25 06:19:54] <shadoi> ashp: use rubular.com
[2008/04/25 06:19:57] <ashp> shadoi: oh, it did in that rubular site
[2008/04/25 06:20:31] <shadoi> ashp: it matches octets of the IP
[2008/04/25 06:20:37] <ashp> which is what i want
[2008/04/25 06:20:40] <ashp> the fourth line is: inet 10.241.209.119/24 brd 10.241.209.255 scope global eth0
[2008/04/25 06:20:48] <ashp> I want to match 10.241.209
[2008/04/25 06:20:56] <ashp> and then set the puppet server based on that
[2008/04/25 06:22:37] <ashp> ah .match doesn't take a block
[2008/04/25 06:23:50] @ zobbo_ joined channel #puppet
[2008/04/25 06:24:29] <ashp> hey shadoi, that http://www.ruby-doc.org/docs/ProgrammingRuby/ you linked me too
[2008/04/25 06:24:40] <ashp> that's the start of the pickaxe pdf i have, this jukebox tutorial
[2008/04/25 06:24:45] <shadoi> yeah
[2008/04/25 06:25:00] <ashp> it's a good tutorial, i just wish i wasn't so thick
[2008/04/25 06:25:13] <shadoi> hmm.. I think it's an awful tutorial.. :)
[2008/04/25 06:25:25] <ashp> puppet = "10.241.209.119" if line =~ /10.241.209/
[2008/04/25 06:25:28] <shadoi> tryruby.hobix.com is pretty cool
[2008/04/25 06:25:30] <ashp> oddly that line should now match
[2008/04/25 06:25:34] <ashp> but i still get nilnil
[2008/04/25 06:25:38] <ashp> if i try to print puppet
[2008/04/25 06:25:47] <ashp> if i print line i see it matches 10.241.209
[2008/04/25 06:25:56] <shadoi> ashp: the way your regex matches you get 3 separate variables (or an array)
[2008/04/25 06:26:17] <ashp> oh, scan breaks it into pieces
[2008/04/25 06:26:42] <ashp> I'm going about this parsing totally wrong, aren't I?
[2008/04/25 06:26:47] <shadoi> octets = output.match(/inet (\d+)(.\d+)(.\d+)/).captures
[2008/04/25 06:27:03] <shadoi> octets[0] ... [2]
[2008/04/25 06:27:32] <shadoi> or oct1, oct2, oct3 = output.match(/inet (\d+)(.\d+)(.\d+)/).captures
[2008/04/25 06:27:47] <ashp> hmm, but in this case i don't really want an array
[2008/04/25 06:27:52] @ Quit: lak:
[2008/04/25 06:27:54] <ashp> i just want a single variable
[2008/04/25 06:28:18] <ashp> i don't want to have to say if oct1 =~ /10/ and oct2 =~ etc
[2008/04/25 06:28:24] <shadoi> then change the regex like I pasted it above
[2008/04/25 06:28:33] <ashp> just to the .captures one?
[2008/04/25 06:28:37] <shadoi> no.. further up
[2008/04/25 06:28:40] <ashp> oh ok
[2008/04/25 06:28:42] <shadoi> with the interface #
[2008/04/25 06:29:02] <shadoi> each () is a capture
[2008/04/25 06:29:40] <ashp> ahhh
[2008/04/25 06:29:54] <ashp> so would it be output.1?
[2008/04/25 06:30:03] <shadoi> output[0]
[2008/04/25 06:30:06] <shadoi> it's an array
[2008/04/25 06:31:12] @ frei joined channel #puppet
[2008/04/25 06:31:43] @ Quit: freiheit: Read error: 104 (Connection reset by peer)
[2008/04/25 06:35:50] @ shenson is now known as shenson_not_here
[2008/04/25 06:36:00] <ashp> Aha, I was doing it all wrong.
[2008/04/25 06:36:04] <windowsrefund> does anyone have an example that shows how to deal with restarting services in some kind of order?
[2008/04/25 06:36:09] <ashp> output = %x, then just do output.each do |line|
[2008/04/25 06:36:18] <ashp> and do the regexp in there for the network, and job done
[2008/04/25 06:40:07] @ shenson_not_here is now known as shenson
[2008/04/25 06:43:17] <benp-> yay
[2008/04/25 06:44:02] <ashp> I can do:
[2008/04/25 06:44:03] <ashp> setcode do
[2008/04/25 06:44:07] <ashp> puppetserver
[2008/04/25 06:44:16] <ashp> and that would set the fact to the contents of puppetserver.. right?
[2008/04/25 06:45:27] <RainDoctor> windowsrefund, I have no idea
[2008/04/25 06:45:40] <RainDoctor> but can you post your question to puppet users list on groups.google.com
[2008/04/25 06:45:46] <RainDoctor> you will get an answer
[2008/04/25 06:46:07] <ashp> http://pastebin.com/d23897622 <-- see if that makes sense?
[2008/04/25 06:46:44] <benp-> ya
[2008/04/25 06:51:54] <ashp> err: Could not retrieve catalog: undefined local variable or method `puppetserver' for #<Facter::Resolution:0xb7d4ee70>
[2008/04/25 06:51:57] <ashp> no matter what I do i get this.
[2008/04/25 06:52:06] <ashp> I reorganised the code completely so it was all contained within setcode do
[2008/04/25 06:52:22] <ashp> do i have to do a return out of blocks?
[2008/04/25 06:52:48] <ashp> no, apparently not as that breaks it
[2008/04/25 06:52:59] <ashp> i set the puppetserver variable then try to use it seconds later, this should just work.
[2008/04/25 06:55:14] <ashp> i give up and i'm going home instead, I left my code like this, someone try it? : http://pastebin.com/d48d2bdd2
[2008/04/25 06:58:39] <windowsrefund> RainDoctor, I may be making some progress here
[2008/04/25 07:00:52] @ Quit: patobrien: "Leaving"
[2008/04/25 07:01:09] @ lak joined channel #puppet
[2008/04/25 07:02:21] @ Quit: zobbo: "Enough, no more. 'tis not as sweet as it was before."
[2008/04/25 07:06:00] <chadh> Will puppetmaster recreate everything in /var/lib/puppet ?
[2008/04/25 07:09:48] @ zobbo joined channel #puppet
[2008/04/25 07:10:15] <stick> so I've run completely into a wall
[2008/04/25 07:10:36] <stick> I abandoned by alias by fact thing b/c it was getting overly complicated and wasn't working
[2008/04/25 07:10:50] <stick> and created a plugin to take an interface and return the ip for use in a template
[2008/04/25 07:11:18] <stick> for the last hour I've been trying to figure out why half the time it tells me 'unknown function'
[2008/04/25 07:11:32] <stick> despite the fact that the plugin is in the right place and the code works
[2008/04/25 07:11:46] <stick> in fact the plugin works with puppet standalone (just not when running puppetd)
[2008/04/25 07:12:11] <stick> the other half of the time it tells me one of my define'ed types that I've been using for the better part of a week doesn't exist either
[2008/04/25 07:12:39] <stick> I know I've got an error somewhere but puppet can't seem capable to tell me where it is, no matter how much debug trace etc I do
[2008/04/25 07:14:37] @ Demosthenes joined channel #puppet
[2008/04/25 07:16:13] @ Quit: kposs:
[2008/04/25 07:19:09] <chadh> lak: think you'll have the training hotel picked out by tomorrow?
[2008/04/25 07:21:22] <lak> chadh: i *just* got confirmation that i'll be the monaco
[2008/04/25 07:21:42] <lak> and the sooner you make the reservation the better, because apparently it's Rose Festival weekend
[2008/04/25 07:21:54] <chadh> I'll do it first thing in the morning if I can.
[2008/04/25 07:22:19] <chadh> lak: how do I go about the training payment? Do you have an online form?
[2008/04/25 07:22:33] <lak> i do not; i'll be sending an invoice, i think
[2008/04/25 07:22:51] <lak> if you send me the email address of the person who should get the invoice, it would help
[2008/04/25 07:23:28] <chadh> to your madstop address?
[2008/04/25 07:24:46] @ mccune left channel #puppet ()
[2008/04/25 07:25:43] <lak> either one, really
[2008/04/25 07:25:56] <stick> lak: do you know of any other reason a plugin couldn't be found despite being in the apparently correct place?
[2008/04/25 07:26:23] <lak> yeah, depending on whether you're talking client/server, functions, etc.
[2008/04/25 07:26:37] <stick> parser functions
[2008/04/25 07:27:14] <lak> using multiple environments?
[2008/04/25 07:29:51] @ spheromak_ joined channel #puppet
[2008/04/25 07:29:53] @ Quit: spheromak: Read error: 104 (Connection reset by peer)
[2008/04/25 07:29:58] <stick> lak: not yet
[2008/04/25 07:30:06] <lak> ok, then it's not that
[2008/04/25 07:30:12] <lak> what server version?
[2008/04/25 07:30:49] @ Quit: spheromak_: Read error: 104 (Connection reset by peer)
[2008/04/25 07:31:14] @ spheromak joined channel #puppet
[2008/04/25 07:33:01] <shadoi> ashp: lookupvar('ipaddress') for referencing other facts I think
[2008/04/25 07:33:32] <Soahc> Morning (afternoon/evening)
[2008/04/25 07:33:56] <shadoi> twilight
[2008/04/25 07:33:58] <shadoi> dawn
[2008/04/25 07:34:18] <Soahc> hehe oh well i got the main 3 :)
[2008/04/25 07:34:26] <shadoi> :)
[2008/04/25 07:34:30] @ shenson is now known as shenson_not_here
[2008/04/25 07:35:28] @ e^ipi_ joined channel #puppet
[2008/04/25 07:37:49] <stick> lak: 0.24.4
[2008/04/25 07:38:09] <lak> hrm
[2008/04/25 07:38:13] <lak> then i'm pretty confused
[2008/04/25 07:38:19] <stick> I vented a few minutes ago (see scrollback) about my woes, it's intermittent
[2008/04/25 07:38:53] <stick> I bounce back and forth about a defined type not existing and a function not exisiting, but to the best of my abilities they are both there and syntacitally correct
[2008/04/25 07:39:00] @ f--z joined channel #puppet
[2008/04/25 07:39:25] <stick> there's likely an error somewhere that's being masked but for the life of me I can't find it
[2008/04/25 07:39:34] @ Quit: jeckersb: "Leaving"
[2008/04/25 07:40:09] <shadoi> stick: you don't get any stack traces?
[2008/04/25 07:40:26] <shadoi> are they both in modules? (type and function)
[2008/04/25 07:40:29] <Soahc> is there anything more detailed than --debug? When I used storedconfigs I get a compounding config compile delay and i can't work out why. the mysql server isn't reporting any slow queries
[2008/04/25 07:40:36] <shadoi> Soahc: --trace
[2008/04/25 07:40:42] <Soahc> ta
[2008/04/25 07:41:08] <shadoi> Soahc: roughly how many classes/resources do you have per node?
[2008/04/25 07:41:16] <lak> Soahc: it's because the db stuff is pretty damn slow, unfortunately
[2008/04/25 07:41:22] <shadoi> Soahc: and are you using tags?
[2008/04/25 07:41:28] <stick> shadoi: I get traces but they say that either the function doesn't exist or the type doesn't
[2008/04/25 07:41:41] <Soahc> no tags and probably about 30-40 classes/resources
[2008/04/25 07:41:50] <shadoi> stick: sounds like a race condition....
[2008/04/25 07:42:16] <shadoi> Soahc: was it working ok and then just started getting extremely slow or what?
[2008/04/25 07:42:22] <stick> shadoi: yeah or something masking the real error, I just can't find it
[2008/04/25 07:42:34] <Soahc> lak: so i'm seeing. without stored configs it takes 0.5 seconds to compile the config, with it it takes 30s and all the cpu
[2008/04/25 07:42:54] <Soahc> it was working on in 0.23.2 then i upgraded to 0.24.4 and it's unusable
[2008/04/25 07:42:55] <shadoi> stick: when you have debug on, do you see it load the function/type in the right order?
[2008/04/25 07:43:32] <shadoi> Soahc: the first compile will take a long time, after that it should be about 1/5th time
[2008/04/25 07:44:04] <shadoi> It's because of all the relationships it's defining... we could dump all the data in raw and parse it later, I was thinking of making that change.
[2008/04/25 07:44:23] <lak> Soahc: really? storeconfigs got worse with 0.24.4?
[2008/04/25 07:44:26] <shadoi> but that's really a message passing model
[2008/04/25 07:44:30] <Soahc> in 0.23.2 my ssh key collection wasn't working. hence my upgrade to 0.24.4 and ssh key collection started working and my slowness started. I thought it might be the sql db so i tuned it and had puppet start fresh (droped the db).
[2008/04/25 07:44:31] <lak> that's the first i've heard of that
[2008/04/25 07:44:43] @ Quit: andrewcshafer:
[2008/04/25 07:44:49] <Soahc> it starts out at 30s per compile. and if i leave it go for about 30 mins it gets to 720s per host
[2008/04/25 07:45:09] <shadoi> Soahc: when you drop the DB it has to do all the stores again
[2008/04/25 07:45:10] <Soahc> but it hink thats because it's cpu bound and can't get anymore cpu so the config compiels back up
[2008/04/25 07:45:17] <shadoi> Soahc: so after each node stores once it will be the same speed as 0.23.2
[2008/04/25 07:45:40] <Soahc> *nod* but it was unusable
[2008/04/25 07:45:51] <Soahc> all my client timeout
[2008/04/25 07:45:56] <Soahc> clients
[2008/04/25 07:46:09] @ Quit: f--z: "KVIrc 3.2.5 Anomalies http://www.kvirc.net/"
[2008/04/25 07:46:14] @ Quit: lak:
[2008/04/25 07:46:30] <shadoi> wow.. is your puppetmaster server really slow or overloaded?
[2008/04/25 07:46:36] <shadoi> it shouldn't take that long at all
[2008/04/25 07:46:48] <Soahc> not overloaded no
[2008/04/25 07:46:51] <shadoi> I'm seeing an average of 70ish seconds for a decent size manifest
[2008/04/25 07:46:55] <shadoi> first-time store
[2008/04/25 07:47:11] <shadoi> Soahc: what DB are you using?
[2008/04/25 07:47:16] <Soahc> mysql
[2008/04/25 07:47:23] <shadoi> weird
[2008/04/25 07:47:27] <Soahc> the host is a sun v440 with 4x1.5Ghz cpus
[2008/04/25 07:47:31] @ Quit: e^ipi: Read error: 110 (Connection timed out)
[2008/04/25 07:47:37] <Soahc> since puppet isn't threaed it only uses one of them
[2008/04/25 07:47:40] <shadoi> yeah
[2008/04/25 07:47:54] <shadoi> should be plenty fast... something else is going on
[2008/04/25 07:48:01] @ Quit: zobbo_: Remote closed the connection
[2008/04/25 07:48:23] <Soahc> it ws doing things like taking 28 seconds to collect 16 ssh keys
[2008/04/25 07:48:49] <shadoi> that's something I haven't tested much... export/collect with a large database
[2008/04/25 07:48:59] <shadoi> I can't imagine it getting linearly worse in performance
[2008/04/25 07:49:07] <shadoi> s/can't/can/
[2008/04/25 07:49:11] @ andrewcshafer joined channel #puppet
[2008/04/25 07:50:04] <Soahc> puppet compiles configs whenyou don't have storeconfig right?
[2008/04/25 07:50:20] <shadoi> yes
[2008/04/25 07:50:36] <shadoi> compiling and storing are two completely separate processes
[2008/04/25 07:50:41] <Soahc> I don't get why putting them into the db/taking them out drives the cpu from 2% (current usage without storeconfigs) to 25% (max 1 cpu)
[2008/04/25 07:50:57] @ kolla joined channel #puppet
[2008/04/25 07:51:04] <shadoi> Soahc: it's because it basically has to translate all the relationships to ActiveRecord model-style relationships
[2008/04/25 07:51:14] <Soahc> ahh
[2008/04/25 07:51:45] <shadoi> Soahc: once REST support is in puppet we can do all this in a more sane way (all the ActiveRecord code will get ripped out)
[2008/04/25 07:53:12] <Soahc> is there a timeframe for that? I might just live without export stuff until then. I'll hack up something to collect ssh keys
[2008/04/25 07:53:16] <shadoi> 0.25.x
[2008/04/25 07:54:21] @ lak joined channel #puppet
[2008/04/25 07:55:11] <Soahc> yeah i should beable to wait it out then
[2008/04/25 07:55:46] <shadoi> I don't think even Luke has a good idea when 0.25.x will be ready though. :)
[2008/04/25 07:55:57] <lak> true dat
[2008/04/25 07:56:23] <Soahc> I'm guessing a feature request to have 0.25 rewritten in python wouldn't go down well ;)
[2008/04/25 07:56:34] <shadoi> hah
[2008/04/25 07:56:40] <lak> summarily closed, indeed
[2008/04/25 07:56:41] <shadoi> I'd boycott the project. ;)
[2008/04/25 07:56:53] @ Quit: lak: Client Quit
[2008/04/25 07:57:44] <Soahc> I guess i'll have to learn ruby one day. I got scared off with the begin and end statements. I had pascal flashbacks
[2008/04/25 07:57:46] <shadoi> we'd have to rename it to self.puppet.self.self.self
[2008/04/25 07:57:56] <stick> shadoi: I thought rest was more an answer for better file serving, not a replacement for activerecord
[2008/04/25 07:58:11] * stick doesn't pretend to understand it that deep
[2008/04/25 07:58:22] <shadoi> stick: actually I think replacing storeconfigs was one of the original things that made Luke start down the path
[2008/04/25 07:58:49] <stick> *nod* as long as the funcationality storeconfigs provides remains I don't care :)
[2008/04/25 07:59:16] <shadoi> stick: it will allow a clean API into/out of puppet.. so puppet can send stuff out via REST, or pull things in via REST (or maybe it's better to say things can push things in)
[2008/04/25 07:59:25] @ Quit: andrewcshafer:
[2008/04/25 08:00:24] <stick> interesting
[2008/04/25 08:00:24] <shadoi> So puppetmasterd could push out node data to some external tool (like puppetshow or something) via REST.
[2008/04/25 08:00:48] <shadoi> as well as allowing a more direct interface for stuff like external_node tools
[2008/04/25 08:00:56] @ lak joined channel #puppet
[2008/04/25 08:01:00] <shadoi> all sorts of possibilities.
[2008/04/25 08:01:55] @ Quit: lak: Client Quit
[2008/04/25 08:02:44] @ tim|imac_ joined channel #puppet
[2008/04/25 08:04:41] @ Quit: tim|imac: Read error: 113 (No route to host)
[2008/04/25 08:04:49] <stick> awesome I can't get the non-existant function error to show up now
[2008/04/25 08:05:06] <stick> just the missing defined type (which is actually there)
[2008/04/25 08:06:14] <stick> oh, hey there it is
[2008/04/25 08:08:34] <stick> hmm looks like I think I can get it to show up on the first run after the puppetmaster starts but not afterwards
[2008/04/25 08:10:35] <shadoi> interesting
[2008/04/25 08:10:52] <shadoi> first client that connects gets it but no others?
[2008/04/25 08:11:35] @ e^ipi_ is now known as e^ipi
[2008/04/25 08:12:02] <stick> first run of the test client can't find the function, subsequent runs it complains about a defined type
[2008/04/25 08:12:28] <shadoi> wow
[2008/04/25 08:12:42] <shadoi> they aren't named the same are they?
[2008/04/25 08:13:03] <shadoi> I mean.. they should have nothing to do with each other at all
[2008/04/25 08:13:28] <Soahc> i had something weird last night when i upgraded to 0.24.4 that sounds simlar. On first run it gave me an error that a function was defined twice. And proceeded to list the same file/line number for both definitions
[2008/04/25 08:13:37] <Soahc> never saw it again
[2008/04/25 08:13:38] @ Quit: cmoates-_: SendQ exceeded
[2008/04/25 08:14:11] <shadoi> stick: have you tried moving them out of modules and using pluginsync?
[2008/04/25 08:14:20] <stick> they aren't in modules
[2008/04/25 08:14:33] <shadoi> maybe try them in modules then
[2008/04/25 08:14:37] <stick> I haven't moved any of my plugins or facts into modules yet
[2008/04/25 08:14:42] <shadoi> there's a bug about that somewhere
[2008/04/25 08:14:52] <stick> hmm
[2008/04/25 08:15:03] <stick> everything else is fine but :)
[2008/04/25 08:17:08] <shadoi> yeah I dunno
[2008/04/25 08:17:19] <shadoi> I can't find the ticket
[2008/04/25 08:19:29] @ Quit: tim|imac_: "Leaving"
[2008/04/25 08:21:03] @ f--z joined channel #puppet
[2008/04/25 08:22:40] @ Quit: jvanzyl:
[2008/04/25 08:22:49] @ tim|imac joined channel #puppet
[2008/04/25 08:23:35] @ Quit: Demosthenes: "leaving"
[2008/04/25 08:23:47] <stick> shadoi: you are magical
[2008/04/25 08:23:52] <stick> that appears to work now
[2008/04/25 08:24:06] <stick> I get wrong/bad data but it's progress
[2008/04/25 08:24:22] <shadoi> putting it into a module?
[2008/04/25 08:25:59] <stick> yeah
[2008/04/25 08:27:08] <stick> though it seems like when the plugins are in modules I have to bounce puppetmaster for it to pick up changes
[2008/04/25 08:27:45] <stick> pastie: url
[2008/04/25 08:28:04] <pastie> http://pastie.org/186468 by stick.
[2008/04/25 08:28:17] <stick> so that's my plugin
[2008/04/25 08:28:30] <stick> which works from standalone puppet and via irb
[2008/04/25 08:28:40] <stick> but puppetd is now bitching about the gsub
[2008/04/25 08:28:47] * stick loves a moving target
[2008/04/25 08:33:55] @ Quit: frei: Read error: 110 (Connection timed out)
[2008/04/25 08:34:41] <shadoi> what's the error?
[2008/04/25 08:36:26] <shadoi> maybe /bin isn't in the PATH when it runs
[2008/04/25 08:36:34] <shadoi> just make it /bin/ip
[2008/04/25 08:37:04] <stick> err: private method `gsub' called for nil:NilClass at /etc/puppet/modules/master/apache/manifests/init.pp:272
[2008/04/25 08:37:19] <stick> that line is where the function is called
[2008/04/25 08:37:42] <stick> if I take out the gsub it doesn't throw an error, I think the var comes out empty in that case though
[2008/04/25 08:38:17] @ freiheit joined channel #puppet
[2008/04/25 08:45:42] @ Quit: ezralini_:
[2008/04/25 08:48:43] * stick goes home
[2008/04/25 08:52:23] @ lak joined channel #puppet
[2008/04/25 08:54:17] @ shake-n-bake joined channel #puppet
[2008/04/25 08:54:26] @ Quit: authentic: "Reconnecting"
[2008/04/25 08:55:23] @ authentic joined channel #puppet
[2008/04/25 08:57:54] @ Quit: shake-n-bake_: Read error: 110 (Connection timed out)
[2008/04/25 08:58:35] @ jvanzyl joined channel #puppet
[2008/04/25 09:04:20] <shadoi> stick: still there?
[2008/04/25 09:06:14] <shadoi> stick: if you see this, your interface_data doesn't always get filled, that's why gsub fails. there must be cases where that command fails.
[2008/04/25 09:06:58] <shadoi> stick: which is why I said that about the path
[2008/04/25 09:33:45] <benp-> 15:48 * stick goes home
[2008/04/25 09:34:05] <shadoi> that's what scrollback buffers are for. ;)
[2008/04/25 09:36:55] @ Quit: markl_: "Lost terminal"
[2008/04/25 09:37:35] @ Quit: freiheit:
[2008/04/25 09:45:40] @ fbe_ joined channel #puppet
[2008/04/25 09:59:35] @ Quit: fbe: Read error: 110 (Connection timed out)
[2008/04/25 10:15:03] @ Quit: lak:
[2008/04/25 10:18:19] @ zirpu is now known as zirpu-away
[2008/04/25 10:18:30] @ johnf joined channel #puppet
[2008/04/25 10:19:47] <fujin> shadoi: /lastlog stick :)
[2008/04/25 10:19:53] @ zirpu-away is now known as zirpubolci
[2008/04/25 10:20:44] @ zirpubolci is now known as zirpubolc
[2008/04/25 10:21:22] <shadoi> yeep
[2008/04/25 10:22:40] @ zirpubolc is now known as zirpu-away
[2008/04/25 10:26:12] @ pawalls_ joined channel #puppet
[2008/04/25 10:32:40] @ Quit: shadoi: "leaving"
[2008/04/25 10:39:05] @ Quit: mcbride: "leaving"
[2008/04/25 10:41:57] @ Quit: jvanzyl:
[2008/04/25 10:43:03] @ pawalls_ is now known as pawalls[work]
[2008/04/25 10:56:21] @ Quit: johnf: Read error: 110 (Connection timed out)
[2008/04/25 11:01:38] <benp-> whoa thats handy
[2008/04/25 11:02:15] <benp-> you'd think after ~12 years of irc i'd know about /lastlog
[2008/04/25 11:02:37] <stick> interesting (lastlog)
[2008/04/25 11:02:41] <stick> didn't know about that
[2008/04/25 11:02:56] <stick> but I use an irc proxy that does autorecall as well, so still saw it
[2008/04/25 11:04:06] <benp-> so you never log out?
[2008/04/25 11:04:18] <benp-> i guess less people use screen than i thought
[2008/04/25 11:05:17] <stick> no I logout all the time but my proxy doesn't it just keeps running
[2008/04/25 11:05:26] <stick> I used to use dircproxy, but now I use bip
[2008/04/25 11:05:39] <stick> I could use screen but I find it a little annoying
[2008/04/25 11:05:59] <stick> plus bip is smart enough to know when I connect and disconnect and only replay what I've missed
[2008/04/25 11:06:54] @ mcbride joined channel #puppet
[2008/04/25 11:14:11] @ Quit: mcbride: "leaving"
[2008/04/25 11:15:23] @ mcbride joined channel #puppet
[2008/04/25 11:16:09] <spheromak> screen 4tw
[2008/04/25 11:20:04] <RainDoctor> oh well
[2008/04/25 11:20:10] <RainDoctor> is it a bouncer?
[2008/04/25 11:20:21] <RainDoctor> like psybnc
[2008/04/25 11:21:23] <bda> http://www.gnu.org/software/screen/
[2008/04/25 11:26:42] <stick> bip.berlios.de/
[2008/04/25 11:30:33] <benp-> heh, mention screen and the lurkers come out of the woodwork
[2008/04/25 11:31:22] <bda> It calls to us.
[2008/04/25 11:34:22] @ M- joined channel #puppet
[2008/04/25 11:34:38] <stick> so if there a way to print debugging from inside a ruby plugin so that I can find/see it when puppet runs it
[2008/04/25 11:34:59] <stick> I tried printing stderr but it doesn't appear to go anywhere obvious
[2008/04/25 11:40:54] <stick> odd, things I test in irb that work, don't work when puppet runs the plugin
[2008/04/25 11:46:35] <stick> undefined method `empty?' for nil:NilClass
[2008/04/25 11:46:46] <stick> yet when I test my code in irb it's fine
[2008/04/25 11:46:58] <stick> does puppet change the type of things in a plugin?
[2008/04/25 11:49:01] <stick> ahh shadoi was right the value is getting lost
[2008/04/25 11:49:05] * stick wonders why
[2008/04/25 11:52:12] @ johnf joined channel #puppet
[2008/04/25 11:54:13] @ Quit: f--z: Remote closed the connection
[2008/04/25 11:54:39] @ f--z joined channel #puppet
[2008/04/25 11:55:30] <randybias> stick:
[2008/04/25 11:55:41] <randybias> $stderr = File.open("/tmp/plugin.output","w")
[2008/04/25 11:56:04] <stick> randybias: thanks kinda forgot about opening a new file :)
[2008/04/25 11:56:23] <stick> hmm so the command isn't returning data or returning it incorrectly
[2008/04/25 12:00:39] <stick> interface_data = `/sbin/ip address show label #{interface_alias}`.split
[2008/04/25 12:00:51] <stick> so that's what's not getting any data back for some reason when puppet runs it
[2008/04/25 12:00:55] <stick> works fine in irb though
[2008/04/25 12:01:06] <stick> interface_alias does have the correct value as well
[2008/04/25 12:01:49] <fujin> Show me your fact dude?
[2008/04/25 12:01:55] <fujin> & the relevant manifest usage
[2008/04/25 12:02:08] <fujin> or is it a function?
[2008/04/25 12:03:27] @ Quit: f--z: "KVIrc 3.2.5 Anomalies http://www.kvirc.net/"
[2008/04/25 12:04:58] @ Quit: fujin: "Changing server"
[2008/04/25 12:06:19] @ fujin joined channel #puppet
[2008/04/25 12:08:32] @ Quit: fujin: Client Quit
[2008/04/25 12:08:45] @ fujin joined channel #puppet
[2008/04/25 12:10:16] <stick> randybias: so if I open a file there with stderr how do I print to it?
[2008/04/25 12:10:24] @ f--z joined channel #puppet
[2008/04/25 12:10:31] <stick> fujin: it's a function
[2008/04/25 12:10:36] <stick> pastie: url
[2008/04/25 12:11:09] <fujin> Just use the print method of the object you open.
[2008/04/25 12:11:52] <fujin> If you just want to talk to the stderr FD like, use $stderr.print
[2008/04/25 12:12:02] <pastie> http://pastie.org/186556 by stick.
[2008/04/25 12:12:05] <fujin> Thanks
[2008/04/25 12:12:07] <fujin> Let me take a looksies
[2008/04/25 12:12:22] <stick> ahh
[2008/04/25 12:12:23] <fujin> agh! I don't have PuTTy w/ URL highlighting, brb. detaching
[2008/04/25 12:12:38] <stick> retraining the brain from perl to ruby isn't as easy as advertised
[2008/04/25 12:14:10] @ ^authentic joined channel #puppet
[2008/04/25 12:14:24] <fujin> I agree
[2008/04/25 12:14:36] <fujin> I've been having some issues picking up Ruby. It's quite tough going from say Perl
[2008/04/25 12:14:47] <fujin> It's just that I use perl nearly every day - you get used to coding in one style
[2008/04/25 12:14:52] <fujin> Ruby is very nice though, so far anyhow
[2008/04/25 12:17:22] <fujin> so, what seems to be the problem with this code?
[2008/04/25 12:19:29] @ Demosthenes joined channel #puppet
[2008/04/25 12:20:11] <fujin> seems to work fine here stick - http://pastie.org/186559
[2008/04/25 12:20:57] @ shadoi joined channel #puppet
[2008/04/25 12:21:03] <stick> yeah it works fine for me as well when I use puppet standalone or irb
[2008/04/25 12:21:19] <fujin> but from puppetmaster & puppetd it doesn't?
[2008/04/25 12:21:35] <stick> but when it runs from puppetd I get the _default_
[2008/04/25 12:21:52] <fujin> weird;
[2008/04/25 12:21:53] <fujin> Let me try it.
[2008/04/25 12:25:06] <benp-> putty has url highlighting??
[2008/04/25 12:25:08] <fujin> lol
[2008/04/25 12:25:10] <fujin> Yes.
[2008/04/25 12:25:20] <benp-> but how
[2008/04/25 12:25:23] <fujin> Putty Tray does, anywho. It has a small regex implementation and a customisable regex for URL syntax highlighting.
[2008/04/25 12:25:29] <fujin> WHen you click them, they work.
[2008/04/25 12:25:31] <benp-> ah
[2008/04/25 12:25:38] <fujin> stick: err: Permission denied - /tmp/plugin.output at /etc/puppet/manifests/site.pp:7 on node junglist.gen.nz
[2008/04/25 12:25:41] <fujin> On my master
[2008/04/25 12:25:47] <fujin> and the client
[2008/04/25 12:25:57] @ Quit: f--z: "KVIrc 3.2.5 Anomalies http://www.kvirc.net/"
[2008/04/25 12:26:11] <stick> you can take that out if you need to
[2008/04/25 12:26:18] <stick> that's just me trying to figure out what's wrong
[2008/04/25 12:26:21] <fujin> ah.
[2008/04/25 12:27:08] <fujin> I wonder if there is a way to throw an exception from inside a plugin
[2008/04/25 12:27:20] <fujin> raise Puppet::Parser::Exception "function failed"
[2008/04/25 12:27:39] @ zirpu-away is now known as zirpu
[2008/04/25 12:28:02] <fujin> stick: It's working here, w/ puppet & master.
[2008/04/25 12:28:18] <stick> ...
[2008/04/25 12:28:19] <fujin> pastie: show me the money
[2008/04/25 12:28:40] <pastie> http://pastie.org/186563 by fujin.
[2008/04/25 12:28:54] @ Quit: authentic: Connection timed out
[2008/04/25 12:28:58] @ ^authentic is now known as authentic
[2008/04/25 12:29:48] <fujin> stick: what error does it throw when it fails for you?
[2008/04/25 12:30:45] <stick> I was getting a gsub error, but since I put the conditional around it, everywhere I use the variable in question it's set to '_default_'
[2008/04/25 12:30:58] <stick> so I'm not getting the value of the interface like I want
[2008/04/25 12:31:29] <fujin> inet 123.100.70.2/29 brd 123.100.70.7 scope global secondary eth0:0
[2008/04/25 12:31:33] <fujin> /exec -o ip address show label eth0:0
[2008/04/25 12:31:41] <fujin> Does yours look like mine?
[2008/04/25 12:33:38] <stick> yup
[2008/04/25 12:33:54] <stick> I can get the same code to work from irb
[2008/04/25 12:35:08] <stick> # ip address show label eth0:0
[2008/04/25 12:35:09] <stick> inet 10.10.41.100/23 brd 10.10.41.255 scope global secondary eth0:0
[2008/04/25 12:35:27] <fujin> feh
[2008/04/25 12:37:01] * fujin boggles
[2008/04/25 12:37:40] @ lak joined channel #puppet
[2008/04/25 12:37:52] <fujin> howdy lak
[2008/04/25 12:38:03] <lak> hi
[2008/04/25 12:38:43] <stick> fujin: yeah it's a doozy
[2008/04/25 12:41:29] @ Quit: M-: "This computer has gone to sleep"
[2008/04/25 12:46:29] <stick> yeah and if I move it back into my plugins dir and use pluginsync puppet can't find the fuction
[2008/04/25 12:46:38] <fujin> uh
[2008/04/25 12:46:42] <fujin> sounds like your pluginsync isn't setup right
[2008/04/25 12:46:53] <fujin> Mine is pluginsyncing and definitely finding it
[2008/04/25 12:47:06] <stick> so if I have it in modules it is found but the output doesn't work correctly
[2008/04/25 12:47:11] <stick> if it's in plugins sync it can't be found
[2008/04/25 12:47:20] <fujin> ah.
[2008/04/25 12:47:41] <stick> I have it in plugins/puppet/parser/functions
[2008/04/25 12:47:55] <stick> along with several other functions which work fine
[2008/04/25 12:49:20] <fujin> what version of Puppet?
[2008/04/25 12:49:24] <stick> 24.4
[2008/04/25 12:49:45] <fujin> ;\
[2008/04/25 12:51:37] <stick> fujin: you running 24.4 as well?
[2008/04/25 12:52:10] * lak can't fight the sarcasm
[2008/04/25 12:52:27] <fujin> Yep.
[2008/04/25 12:52:32] * fujin smacks lak
[2008/04/25 12:53:24] <fujin> care to take a look at his plugin lak ? it works fine in IRB and standalone puppet.
[2008/04/25 12:53:29] <fujin> and works in puppetmaster/puppet for me
[2008/04/25 12:54:13] <lak> sure
[2008/04/25 12:54:49] <fujin> http://pastie.org/186559
[2008/04/25 12:56:02] <stick> it's linux specific atm, (macosx doesn't have /sbin/ip to my knowledge)
[2008/04/25 12:56:09] <shadoi> stick: is iproute on the system you're testing it on?
[2008/04/25 12:56:16] <shadoi> hehe
[2008/04/25 12:56:16] <randybias> stick: just do $stdout and $stderr to files then any puts will go there ($stdout)
[2008/04/25 12:57:16] <stick> shadoi: yes
[2008/04/25 12:57:18] <lak> stick: you know that only gives ip data on the server, right?
[2008/04/25 12:57:31] <stick> ...
[2008/04/25 12:57:38] <stick> plugins are run on the server
[2008/04/25 12:57:43] <lak> functions only run on the server
[2008/04/25 12:57:52] <lak> well, custom facts, types, and providers, would run on the client
[2008/04/25 12:58:03] * stick vomits in his hat
[2008/04/25 12:58:05] <lak> but functions are only parser constructs, which means only on the server
[2008/04/25 12:58:05] <fujin> heh.
[2008/04/25 12:58:07] <shadoi> hehe
[2008/04/25 12:58:08] <lak> sorry :(
[2008/04/25 12:58:12] * fujin smacks head
[2008/04/25 12:58:17] <fujin> My server is my client.
[2008/04/25 12:58:24] <fujin> Go figure :}
[2008/04/25 12:58:27] <stick> fujin: there we go
[2008/04/25 12:58:31] <fujin> Well, should be easy enough to turn that into a fact, stick.
[2008/04/25 12:58:54] <stick> not really for other reasons I was down that road yesterday
[2008/04/25 12:59:00] <lak> stick: sorry, i should have been able to help you with that earlier
[2008/04/25 12:59:14] <stick> lak: no worries, I'm more irritated that I didn't remember that
[2008/04/25 13:00:19] <shadoi> for some reason earlier I thought it _was_ a custom fact
[2008/04/25 13:00:30] <lak> what are you trying to do with your interfaces?
[2008/04/25 13:00:34] <shadoi> or maybe I mixed you up with ashp
[2008/04/25 13:03:15] <stick> well it all stems from apache
[2008/04/25 13:03:27] <stick> we have frontline proxy servers that handle ssl termination
[2008/04/25 13:03:43] <stick> so all the vhost contains have to contain an ip (b/c of ssl)
[2008/04/25 13:03:53] <stick> but all of these proxies are in a cluster
[2008/04/25 13:04:17] <stick> so we're talking about 17 or so aliased interfaces on each of 9 or so machines
[2008/04/25 13:04:51] <fujin> Argh! Why so many interfaces? You guys must do a shitload of traffic!
[2008/04/25 13:05:06] <stick> fujin: yes
[2008/04/25 13:05:50] <stick> so I'm trying to link together a given vhost with an alias interface
[2008/04/25 13:06:03] <stick> so that it's vhost container gets the correct ip in it
[2008/04/25 13:06:14] <fujin> so why can't you use a fact and a template to do this?
[2008/04/25 13:06:44] <stick> well facter (currently released version) doesn't create facts for aliased interfaces (only physical interfaces)
[2008/04/25 13:07:32] <stick> I have a custom fact that will generate those but they way I'm passing in the vhost and the alias that goes with it I would need to be able to do double interpolation which I can't do
[2008/04/25 13:07:55] <fujin> facter ipaddress_eth0:0
[2008/04/25 13:07:55] <stick> I guess I could break it out into attribute to a type
[2008/04/25 13:07:59] <fujin> 123.100.70.2
[2008/04/25 13:08:03] <fujin> Works fine here ;>
[2008/04/25 13:08:07] <shadoi> when I worked at hosting company we averaged like 75 - 100 aliases per box
[2008/04/25 13:08:07] <fujin> I'm running facter out of Git though
[2008/04/25 13:08:11] <stick> fujin: I don't trust you anymore :-D
[2008/04/25 13:08:22] <fujin> That's a fact! seriously
[2008/04/25 13:08:29] <fujin> I use it at work for a number of manifests, mostly munin stuff
[2008/04/25 13:08:41] <fujin> so it sets up the ip_ plugin for each wildcard interface for graphing.
[2008/04/25 13:09:22] <fujin> pastie: stop trying to hit me and hit me
[2008/04/25 13:09:23] <pastie> fujin: are you sure, it might hurt?
[2008/04/25 13:09:30] * fujin beckons pastie
[2008/04/25 13:09:35] <stick> fujin: apparently not on rhel
[2008/04/25 13:09:45] <fujin> Blargh, That's fail.
[2008/04/25 13:10:05] <fujin> Are you able to pull down the facter Git, build a package for a local repository?
[2008/04/25 13:10:18] <fujin> How old is the rpm creation stuff in the Git repo, lak ?
[2008/04/25 13:10:25] <lak> wicked old
[2008/04/25 13:10:32] <lak> i think lutter does his own stuff
[2008/04/25 13:10:39] <fujin> I see
[2008/04/25 13:10:46] <lak> i actually don't know
[2008/04/25 13:10:50] <lak> the spec file should be up to date, tho
[2008/04/25 13:10:51] <fujin> I'll take a look around
[2008/04/25 13:10:56] <fujin> ah yes.
[2008/04/25 13:11:05] <stick> [root@jbossproxy01 ~]# ip address show dev eth0|wc -l
[2008/04/25 13:11:05] <stick> 23
[2008/04/25 13:11:06] <stick> [jbossproxy01.intdev.redhat.com] [11:10:38 PM]
[2008/04/25 13:11:06] <stick> [root@jbossproxy01 ~]# facter |grep ipaddress|wc -l
[2008/04/25 13:11:07] <stick> 2
[2008/04/25 13:12:02] <fujin> fail :\
[2008/04/25 13:12:32] <fujin> Have you got a local yum or rpm repo? hell you can probably get away with serving the Facter rpm out of Puppet even.
[2008/04/25 13:12:50] <lutter> fujin: the spec file in git is pretty recent .. in cases where I forget to push it out (or have lak pull) you can always find it under http://people.redhat.com/dlutter/yum/spec
[2008/04/25 13:13:15] <fujin> I see
[2008/04/25 13:13:16] <lutter> there's also a SRPM there
[2008/04/25 13:13:17] <stick> I have a custom fact that gives me that aliases
[2008/04/25 13:13:32] <fujin> How does one create an RPM from a spec file?
[2008/04/25 13:13:46] <lutter> right now the SRPM is a little funky, since I added the manpages as a separate tarball
[2008/04/25 13:13:58] <lutter> fujin: what OS do you need an RPM for ?
[2008/04/25 13:14:06] <fujin> stick: ?
[2008/04/25 13:14:19] <lutter> first see if I already have it in http://people.redhat.com/dlutter/yjum
[2008/04/25 13:14:21] <stick> fujin: you running the latest facter
[2008/04/25 13:14:36] <lutter> ugh .. that's http://people.redhat.com/dlutter/yum
[2008/04/25 13:14:46] <stick> lutter: stop fighting the keyboard :)
[2008/04/25 13:15:01] <lutter> stick: I know, hands are made for holding drinks
[2008/04/25 13:15:08] <stick> haha
[2008/04/25 13:15:11] <fujin> stick: 1.3.8, pulled just now and reinstalled
[2008/04/25 13:15:28] <stick> facter-1.3.8-1.el5
[2008/04/25 13:15:33] * fujin boggles
[2008/04/25 13:15:42] <stick> yeah I'm full of good news tonight
[2008/04/25 13:15:51] <stick> but anyway it's not the fact that's the problem
[2008/04/25 13:15:52] <fujin> oh
[2008/04/25 13:15:54] <fujin> ROFL
[2008/04/25 13:15:57] <fujin> I've got a custom fact
[2008/04/25 13:15:59] <fujin> Fuck I'm aatard
[2008/04/25 13:16:02] <fujin> moment. I'll pastie it
[2008/04/25 13:16:07] <fujin> pastie: gimme
[2008/04/25 13:17:06] <stick> fujin: tricksy! tricksy!
[2008/04/25 13:17:26] <pastie> http://pastie.org/186582 by fujin.
[2008/04/25 13:18:01] <fujin> How about that.
[2008/04/25 13:18:22] <fujin> Will that do what you require?
[2008/04/25 13:19:38] <shadoi> lak, lutter have you guys seen this? http://treetop.rubyforge.org
[2008/04/25 13:19:49] <shadoi> I almost understand it, which is scary.
[2008/04/25 13:20:03] <stick> fujin: thanks
[2008/04/25 13:20:14] <stick> the fact isn't the problem, I think I'll have to refacter
[2008/04/25 13:20:20] <stick> I was doing something like
[2008/04/25 13:20:32] <randybias> shadoi: didn't I send that out?
[2008/04/25 13:20:42] <stick> apache::vhost { "foo.example.com|eth0:0" }
[2008/04/25 13:20:46] <shadoi> randybias: not to me
[2008/04/25 13:20:52] <randybias> I was thinking about using it for something like Augeus so I could parse Xen config files
[2008/04/25 13:20:55] <lutter> shadoi: no, haven't seen it .. looks nice
[2008/04/25 13:20:58] <stick> then splitting it and going from there
[2008/04/25 13:21:04] <randybias> but now I'll probably just try Augeus first
[2008/04/25 13:21:08] <lutter> randybias: real men use bison ;)
[2008/04/25 13:21:22] <randybias> lutter: yeah and Perl
[2008/04/25 13:21:26] <randybias> ;)
[2008/04/25 13:21:30] <randybias> LOL
[2008/04/25 13:21:36] <stick> that way I can keep an array instead of a whole list of types
[2008/04/25 13:21:43] <lutter> problem with bison is it makes you smell like a yak
[2008/04/25 13:21:45] <fujin> I've substantially decreased my Perl usage since playing around with Puppet
[2008/04/25 13:21:49] <stick> we do add vhosts on a semi-frequent basis
[2008/04/25 13:22:04] <randybias> lutter: yukky yaks...
[2008/04/25 13:22:30] <shadoi> actually I think Eric Hodel was preaching about treetop to Luke at Seattle.rb a while ago now that I think about it
[2008/04/25 13:22:37] <stick> so since I'm passing it to a define I would need to do something like:
[2008/04/25 13:23:04] <stick> $vhost_ip = ${ipaddress_${interface_alias}}
[2008/04/25 13:23:05] <fujin> I'm detaching, going to my other machine.
[2008/04/25 13:23:07] <stick> which doesn't work
[2008/04/25 13:23:55] <lak> shadoi: i haven't actually looked at it much
[2008/04/25 13:24:10] <shadoi> stick: ${ipaddress}_${interface_alias}
[2008/04/25 13:24:15] <shadoi> ?
[2008/04/25 13:24:17] <lak> stick: use multiple variables
[2008/04/25 13:24:20] <stick> will that work?
[2008/04/25 13:24:31] <lak> $name = "ipaddress_${interface_alias}"
[2008/04/25 13:24:42] <stick> that would result in the fact ipaddress_eth0:0 for example
[2008/04/25 13:24:44] <lak> $vhost_ip = "${ipaddress_$name}"
[2008/04/25 13:24:48] <lak> or something like that
[2008/04/25 13:24:58] <lak> actually, that probably won't really work
[2008/04/25 13:25:10] <lak> that's kinda like references, and puppet can't really do that
[2008/04/25 13:25:12] <lak> i think :)
[2008/04/25 13:25:32] <stick> I didn't think so I played with a couple of syntaxes and couldn't get it
[2008/04/25 13:25:32] <shadoi> stick: I've never tried two variables at once like that but I think it should work
[2008/04/25 13:25:42] @ M- joined channel #puppet
[2008/04/25 13:27:51] <shadoi> actually I do know it works
[2008/04/25 13:27:58] <shadoi> I have it in production at stanford
[2008/04/25 13:28:31] <stick> pastie: url
[2008/04/25 13:28:59] <pastie> http://pastie.org/186589 by stick.
[2008/04/25 13:29:12] <shadoi> put it in quotes
[2008/04/25 13:29:27] <shadoi> $foo = "${ipaddress}_${interface_alias}"
[2008/04/25 13:29:51] <stick> notice: Scope(Class[main]): 10.10.41.1_eth0:0
[2008/04/25 13:30:01] <stick> 41.1 is eth0's ip, not eth0:0
[2008/04/25 13:30:30] <shadoi> oh I see
[2008/04/25 13:30:41] <shadoi> yeah you'd have to tie that to a custom fact
[2008/04/25 13:31:11] <stick> lak: is it possible to disable storeconfigs from the commandline
[2008/04/25 13:31:25] <stick> I always have to set storeconfigs = false in the config in order to use puppet standalone on a system
[2008/04/25 13:31:35] <stick> else it complains about rails missing
[2008/04/25 13:31:37] <shadoi> --no-storeconfigs
[2008/04/25 13:31:44] <shadoi> is supposed to work I think
[2008/04/25 13:31:51] <lak> indeed
[2008/04/25 13:31:53] <stick> sweet
[2008/04/25 13:31:56] <stick> it does
[2008/04/25 13:32:05] <stick> I think I was doing --storeconfig false or something
[2008/04/25 13:32:19] <stick> crazy double negative options :)
[2008/04/25 13:32:29] <jamesturnbull> stick: have you looked at the code in the git head?
[2008/04/25 13:32:35] <jamesturnbull> stick: the facter git head
[2008/04/25 13:32:39] <stick> jamesturnbull: no
[2008/04/25 13:33:31] <jamesturnbull> stick: the interface facts in their might prompt some ideas
[2008/04/25 13:33:36] <jamesturnbull> s/their/there/
[2008/04/25 13:33:49] <stick> jamesturnbull: *nod* I'm not have trouble getting at the data
[2008/04/25 13:34:03] <stick> it's abstracting it too many times that's become difficult
[2008/04/25 13:35:20] @ Quit: shake-n-bake:
[2008/04/25 13:36:18] <jamesturnbull> stick: ah I thought you were saying your fact wasn't picking up the alias address
[2008/04/25 13:36:37] <stick> well the stock version I have currently doesn't pick up aliases
[2008/04/25 13:36:41] <stick> only physical
[2008/04/25 13:36:51] <stick> but I have a custom one that that does
[2008/04/25 13:37:26] <shadoi> stick: why doesn't your fact just return the alias IP along with the interface?
[2008/04/25 13:37:55] <stick> shadoi: I don't follow
[2008/04/25 13:38:22] <shadoi> fact returns 1.1.1.1_eth0:0
[2008/04/25 13:38:30] <shadoi> just add another one that aggregates them
[2008/04/25 13:38:48] <shadoi> make it your vhost fact
[2008/04/25 13:38:53] <shadoi> vhost_ip or whatever
[2008/04/25 13:39:16] <jamesturnbull> stick: yeah the new interface fact returns 1.1.1.1_eth0_0
[2008/04/25 13:39:24] <jamesturnbull> subs : for _
[2008/04/25 13:39:34] <stick> so the fact I have now does:
[2008/04/25 13:39:35] <stick> facter ipaddress_eth0_0
[2008/04/25 13:39:35] <stick> 10.10.41.100
[2008/04/25 13:40:00] <stick> the problem is I can't build ipaddress_eth0_0
[2008/04/25 13:40:19] <stick> I guess I can hardcode that where I'm linking together vhosts and interfaces
[2008/04/25 13:40:19] <shadoi> build?
[2008/04/25 13:40:40] <shadoi> yeah, just make the fact return exactly what you need for vhost_ips
[2008/04/25 13:40:52] <stick> that's the whole ${ipaddress_${alias}}
[2008/04/25 13:40:57] <shadoi> make it part of that module, done.
[2008/04/25 13:40:59] <lak> or have a function that accepts a name and looks up the associated value
[2008/04/25 13:41:07] <shadoi> yeah.. which should be no problem in ruby
[2008/04/25 13:41:09] <lak> e.g., ip_for("eth0:0")
[2008/04/25 13:41:21] <stick> lak: that's what I was trying to do with the plugin
[2008/04/25 13:41:41] <shadoi> lak: how would it know what host do do that for?
[2008/04/25 13:41:47] <lak> instead of having the function call /bin/ip or whatever, have it look up facts from the scope
[2008/04/25 13:41:50] <stick> but then I run into the whole plugins are only run on the server
[2008/04/25 13:41:57] <shadoi> ahhhh yeah
[2008/04/25 13:42:00] <lak> right, but if you've got that fact, then the server has the data
[2008/04/25 13:42:02] <shadoi> that would be pretty slick
[2008/04/25 13:42:06] <lak> you just need to retrieve and munge it
[2008/04/25 13:42:49] <stick> ok, sounds promising
[2008/04/25 13:42:59] <stick> how do I lookup a fact from the scope?
[2008/04/25 13:43:06] <shadoi> lookupvar('ipaddress')
[2008/04/25 13:47:17] @ jvanzyl joined channel #puppet
[2008/04/25 13:50:34] <stick> pastie: url
[2008/04/25 13:50:49] <pastie> http://pastie.org/186590 by stick.
[2008/04/25 13:50:59] <stick> so that's the function
[2008/04/25 13:51:52] * stick fixes single quotes
[2008/04/25 13:52:46] <shadoi> don't need the second address call
[2008/04/25 13:52:58] <shadoi> last assigned object is good enough
[2008/04/25 13:53:40] <stick> *nod*
[2008/04/25 13:53:44] <stick> habit :)
[2008/04/25 13:54:14] <stick> yay that function hates me when it's in my pluginsync directory
[2008/04/25 13:54:25] @ jvanzyl_ joined channel #puppet
[2008/04/25 13:54:39] @ Quit: jvanzyl: Read error: 104 (Connection reset by peer)
[2008/04/25 13:55:06] @ Quit: jvanzyl_: Read error: 104 (Connection reset by peer)
[2008/04/25 13:55:33] @ jvanzyl joined channel #puppet
[2008/04/25 13:56:01] * stick moves it back into a module
[2008/04/25 13:56:03] <stick> seems to work there
[2008/04/25 13:56:31] @ f--z joined channel #puppet
[2008/04/25 13:56:34] @ Quit: jvanzyl: Read error: 104 (Connection reset by peer)
[2008/04/25 13:56:45] @ jvanzyl joined channel #puppet
[2008/04/25 13:58:15] @ jvanzyl_ joined channel #puppet
[2008/04/25 13:58:19] @ Quit: jvanzyl: Read error: 104 (Connection reset by peer)
[2008/04/25 13:58:29] <stick> huzzah!
[2008/04/25 14:02:13] <jamesturnbull> stick: nice
[2008/04/25 14:02:36] <stick> still don't know why I get weird errors when it pluginsyncs but works ok in a module
[2008/04/25 14:03:04] <stick> especially considering I have other functions that work fine
[2008/04/25 14:03:15] <stick> (actually alot of davidS's functions)
[2008/04/25 14:05:36] <gepetto> ::puppet:: Ticket #1205 (enhancement created): CONFIG['bindir'] CONFIG['sbindir'] have undesirable defaults on ... @ http://reductivelabs.com/trac/puppet/ticket/1205 (by nigel@explanatorygap.net)
[2008/04/25 14:10:17] @ Quit: lak:
[2008/04/25 14:14:27] @ Quit: f--z: Connection timed out
[2008/04/25 14:15:27] @ Quit: windowsrefund: Read error: 104 (Connection reset by peer)
[2008/04/25 14:15:46] @ Quit: M-: "This computer has gone to sleep"
[2008/04/25 14:26:51] @ nigelk joined channel #puppet
[2008/04/25 14:46:25] @ shadoi_ joined channel #puppet
[2008/04/25 14:47:50] @ Quit: jvanzyl_: Read error: 113 (No route to host)
[2008/04/25 14:55:06] @ ricky_ joined channel #puppet
[2008/04/25 14:57:43] @ Quit: ricky: Nick collision from services.
[2008/04/25 14:57:47] @ ricky_ is now known as ricky
[2008/04/25 14:59:11] @ Quit: nigelk:
[2008/04/25 15:03:37] @ stahnma_ joined channel #puppet
[2008/04/25 15:04:03] @ Quit: stahnma: Remote closed the connection
[2008/04/25 15:05:53] @ Quit: stahnma_: Remote closed the connection
[2008/04/25 15:06:15] @ stahnma joined channel #puppet
[2008/04/25 15:07:37] @ Quit: wibbit: Read error: 110 (Connection timed out)
[2008/04/25 15:07:54] @ wibbit joined channel #puppet
[2008/04/25 15:08:04] @ ^authentic joined channel #puppet
[2008/04/25 15:17:29] @ stahnma_ joined channel #puppet
[2008/04/25 15:18:53] <shadoi_> content => "line1\nline2\n" works fine right?
[2008/04/25 15:18:57] <shadoi_> I can't remember
[2008/04/25 15:21:23] @ zirpu is now known as zirpu-zzz
[2008/04/25 15:21:37] @ stahnma__ joined channel #puppet
[2008/04/25 15:21:42] @ Quit: stahnma_: Remote closed the connection
[2008/04/25 15:22:48] @ Quit: stahnma: Read error: 113 (No route to host)
[2008/04/25 15:27:30] @ Quit: authentic: Read error: 110 (Connection timed out)
[2008/04/25 15:27:32] @ ^authentic is now known as authentic
[2008/04/25 15:28:20] @ Quit: stahnma__: Read error: 104 (Connection reset by peer)
[2008/04/25 15:28:23] @ stahnma joined channel