Perl 6 - the future is here, just unevenly distributed

IRC log for #puppet-openstack, 2013-11-20

| Channels | #puppet-openstack index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:09 brdude joined #puppet-openstack
00:09 sanman joined #puppet-openstack
00:19 tnoor joined #puppet-openstack
00:21 tnoor joined #puppet-openstack
00:40 badiane_ka joined #puppet-openstack
00:47 rmoe joined #puppet-openstack
01:09 rongze joined #puppet-openstack
01:41 xarses joined #puppet-openstack
02:03 rongze joined #puppet-openstack
02:32 xingchao_ joined #puppet-openstack
03:12 xingcha__ joined #puppet-openstack
03:22 michchap joined #puppet-openstack
03:56 mjblack joined #puppet-openstack
04:12 rongze joined #puppet-openstack
04:13 openstackgerrit Doug Schaapveld proposed a change to stackforge/puppet-keystone: Create memcache_servers option  https://review.openstack.org/57361
04:22 mgagne joined #puppet-openstack
04:22 mgagne joined #puppet-openstack
04:28 mgagne1 joined #puppet-openstack
04:28 mgagne1 joined #puppet-openstack
04:49 thumpba joined #puppet-openstack
04:53 tnoor joined #puppet-openstack
05:00 vikass__ joined #puppet-openstack
05:01 vikass__ hello everyone, need little help on hiera scalability. anyone around?
05:09 vikass__ basically i need to define hostnames in multiple hiera.yaml ( location based )  and map it to something in site.pp
05:10 vikass__ right now i am using hostnmaes and kinda regular expression in site.pp
05:11 vikass__ any idea how to achieve this?
05:17 vikass__ anyone around to answer this?
05:26 xingchao_ joined #puppet-openstack
05:37 michchap vikass__: you could try #puppet
05:39 vikass__ michchap: I am using puppet-openstack modules and hiera.yaml was part of this release where i have added/modified some data
05:42 michchap vikass__: I don't have a lot of experience with Hiera so I probably can't help.
05:42 mgagne1 vikass__: where are the regex used? in node {} definitions? And I suppose you want hiera to use whatever "parts" was caught by the regex in site.pp?
05:43 vikass__ michchap::no problem, i reached out #puppet folks and they suggested to ask in this channel since it's openstack related stuff
05:43 vikass__ mgagne1: regex is used in site.pp at this point but i want to put everything in hiera since it is easier to manage
05:45 mgagne vikass__: is it correct to say regex is used to "not match" suffix of hostname or region part in URL to allow generic configuration?
05:46 vikass__ for example==>  i am using this line in hiera openstack::compute::db_host:            '%{db_server}'
05:46 vikass__ and declared db_server in site.pp
05:48 mgagne vikass__: db_server would be specific to a set of nodes and different for others?
05:49 vikass__ mgagne: for regex here's how i am defining ins site.pp    node /compute-openstackh1-/
05:49 vikass__ so all my compute-openstackh1-1 to compute-openstackh1-30 nodes are getting same compute class profile
05:50 vikass__ mgagne: db_server is only one server defined in site.pp
05:51 vikass__ mgagne: yes you are right, it's specific to set of nodes.. we call it POD
05:53 mgagne vikass__: what's the challenge? is there many pods configured in the same site.pp, each with their own db_server?
05:54 vikass__ mgagne: right now, i have only one POD and things are working as expected but they are going to grow now
05:55 marun joined #puppet-openstack
05:56 mgagne vikass__: I'm still trying to understand/figure out the part you need help with =)
05:56 vikass__ mgagne: also right now i don't run agent frequently on controller, compute nodes, but i am assuming, if i change site.pp for a new pod, it won't resolve nodes
05:58 vikass__ mgagne: i need help in defining controller, compute nodes, db nodes, VIP nodes in hiera itself and provide a mapping to site,pp, this way i will end up maintaining multiple hiera files ( site based ) but only one global site.pp
05:59 mgagne vikass__: are you looking for a way to allow configuration of N pods without having to define each of them in site.pp? (and avoid a mess in hiera too)
05:59 vikass__ mgagne: yes, easier to manage multiple hiera.yaml files
06:00 vikass__ mgagne: let me show you my site.pp on gist.. one minute
06:05 michchap joined #puppet-openstack
06:05 mgagne vikass__: you need to make your site.pp generic enough to accommodate any new pods. When using regex in site.pp, there is no way to "capture" matches in the actual node name. You could however try to use puppet facts (like $::fqdn) to match part of the hostname (maybe the pod name) and use it to build any value, like db_host: http://docs.puppetlabs.com/puppet/2.7/reference/lang_datatypes.html#regular-expressions
06:10 vikass__ mgagne: here's my site.pp file
06:10 vikass__ https://gist.github.com/svikass/8efcafdc52ccdf40e332
06:16 mgagne vikass__: what do you need help with? How is a pod identified? Is the db specific for each pods? What's vip? Is it pod specific?
06:17 thumpba joined #puppet-openstack
06:18 vikass__ mgagne: yes, all values i.e. db_server, vip_server and primary_ccn are pod specific, so all i want is define them in hiera.yaml and apply classes via site.pp
06:19 mgagne vikass__: how are your hostnames structured? if there is a structure/logic to it, it would be trivial to generalize site.pp enough to accommodate any pods.
06:20 thumpba_ joined #puppet-openstack
06:20 xingcha__ joined #puppet-openstack
06:21 vikass__ mgagne: yes openstack201 next pod will be openstack202, 203 and so on,
06:24 vikass__ mgagne: so i was assuming to include db_server ==>> hostname in hiera.yaml and assign it under Database, then define node /Database/ and include class xx xxx, this way i don't need to change site.pp at all
06:30 vikass__ mgagne: do you think this grouping is possible at all?
06:32 mgagne vikass__: how about something like that: https://gist.github.com/mgagne/c450c51b5a85f4cf2b4d
06:33 mgagne vikass__: I was confused by the hostname naming scheme used in your example so I took the liberty to change hostnames.
06:38 leseb joined #puppet-openstack
06:38 marun joined #puppet-openstack
06:38 vikass__ mgagne: sounds great!!! thanks a ton, let me try this in the morning and update you.. thanks again for the help..
06:41 vikass__ mgagne: one more question.. am i suppose to run puppet agent -t via cron all the time or it's just one time during install?
06:44 mgagne vikass__: it really depends. If people aren't messing with configuration on the server itself, I guess it's ok to run it once (or whenever you need), configs don't need to be updated once set. If you don't run the agent or have a cron, the challenge you might have is having to manually run puppet agent -t on all your nodes. I mean, this could be time consuming unless you have ssh keys or can run commands across all your nodes remotely.
06:45 vikass__ thanks
06:50 rongze joined #puppet-openstack
07:08 mgagne1 joined #puppet-openstack
07:08 mgagne1 joined #puppet-openstack
07:14 marun joined #puppet-openstack
07:56 sileht_ joined #puppet-openstack
08:05 marun joined #puppet-openstack
08:06 thumpba joined #puppet-openstack
08:11 mmagr joined #puppet-openstack
08:38 openstackgerrit Athlan-Guyot sofer proposed a change to stackforge/puppet-swift: Fix filter name for puppetdb  https://review.openstack.org/57393
08:48 thumpba joined #puppet-openstack
08:50 EmilienM michchap: i'm pretty comfortable to merge ML2 plugin support
08:52 thumpba joined #puppet-openstack
08:53 thumpba joined #puppet-openstack
08:54 derekh joined #puppet-openstack
08:55 thumpba joined #puppet-openstack
09:14 rongze joined #puppet-openstack
09:14 marun joined #puppet-openstack
09:20 rongze_ joined #puppet-openstack
09:21 tnoor joined #puppet-openstack
09:36 rongze joined #puppet-openstack
09:38 openstackgerrit Flavio Percoco proposed a change to stackforge/puppet-glance: Replace qpid_host with qpid_hostname  https://review.openstack.org/56208
10:34 rongze joined #puppet-openstack
11:23 piliman974 joined #puppet-openstack
11:24 michchap EmilienM: If you're happy then I'm happy :)
11:28 EmilienM michchap: it's late by your place :)
11:28 michchap EmilienM: only 10:30, not too late yet
11:28 EmilienM michchap: i think we can merge the ml2 patch if puppet side is ok
11:29 EmilienM michchap: it's time for beers, but if you are here, i'll ask you to make a quick review
11:31 openstackgerrit A change was merged to stackforge/puppet-glance: Replace qpid_host with qpid_hostname  https://review.openstack.org/56208
11:31 michchap I'll have another look now. I didn't get a chance to test it out
11:32 EmilienM michchap: i think you could use it i your setup, it's a very nice plugin
11:32 EmilienM michchap: with l2population mechanism i mean
11:33 michchap EmilienM: We'll almost certainly use it
11:39 rongze joined #puppet-openstack
11:43 rongze_ joined #puppet-openstack
11:49 xingchao joined #puppet-openstack
12:24 marun joined #puppet-openstack
12:25 michchap_ joined #puppet-openstack
12:28 dmsimard joined #puppet-openstack
12:34 marun joined #puppet-openstack
12:57 dprince joined #puppet-openstack
13:09 morazi joined #puppet-openstack
13:12 bcrochet joined #puppet-openstack
13:14 piliman974 joined #puppet-openstack
13:30 bogdando joined #puppet-openstack
14:22 e1mer joined #puppet-openstack
14:22 e1mer joined #puppet-openstack
14:34 dprince joined #puppet-openstack
15:00 mjblack joined #puppet-openstack
15:02 mjblack joined #puppet-openstack
15:04 openstackgerrit Doug Schaapveld proposed a change to stackforge/puppet-keystone: Create memcache_servers option  https://review.openstack.org/57361
15:16 morazi joined #puppet-openstack
15:42 tnoor joined #puppet-openstack
15:43 tnoor1 joined #puppet-openstack
15:54 rmoe joined #puppet-openstack
16:19 badiane_ka joined #puppet-openstack
16:24 mgagne joined #puppet-openstack
17:05 mjblack joined #puppet-openstack
17:20 rmoe joined #puppet-openstack
17:22 angdraug joined #puppet-openstack
17:31 rmoe_ joined #puppet-openstack
17:32 xarses joined #puppet-openstack
17:36 openstackgerrit A change was merged to stackforge/puppet-swift: Fix filter name for puppetdb  https://review.openstack.org/57393
18:01 openstackgerrit Benedikt Trefzer proposed a change to stackforge/puppet-heat: fix postgresql connection string  https://review.openstack.org/57502
18:12 rongze joined #puppet-openstack
18:19 marun joined #puppet-openstack
18:27 hogepodge joined #puppet-openstack
18:27 mjblack ah just the person I was looking for
18:47 brdude joined #puppet-openstack
18:58 thumpba joined #puppet-openstack
19:06 Hunner mjblack: Hi
19:06 ashp joined #puppet-openstack
19:06 hogepodge hunner: this is the patch in question. https://review.openstack.org/#/c/55303/4
19:06 mjblack Hunner: hi
19:07 Hunner mjblack: Something about keystone needing a resource that acts as a "global configuration" resource that other resources can reference?
19:07 hogepodge If you look at the source repo, there's something like 7 providers that are derived from the base one.
19:09 mjblack adding param/prop to the types would add a lot of extra duplicate code
19:10 Hunner mjblack: There is a way to make a resource type that holds data, (like insecure) that other resource types can read, so you don't have to pass insecure to everything
19:11 mjblack ok, do you have example code I can look at?
19:13 Hunner mjblack: The best example I know of is https://github.com/electrical/puppet-lib-file_concat/tree/master/lib/puppet/type . The file_fragment resource has no provider and only holds the data. The file_concat provider searches the catalog for file_fragment resources and reads their content
19:13 rongze joined #puppet-openstack
19:15 Hunner mjblack: This is the magic line https://github.com/electrical/puppet-lib-file_concat/blob/master/lib/puppet/type/file_concat.rb#L110
19:16 mjblack Hunner: yeah I'm just wondering if its possible to get the resource from outside of the type
19:16 Hunner mjblack: So anyway, you can have a resource (say, keystone_globals) that you put in a catalog with global parameters set (like insecure => false) and all the other keystone_* resources can look up the keystone_global resource's 'insecure' value
19:17 Hunner mjblack: You can call `catalog.resources.each` in any type and search for any other types in the catalog
19:18 mjblack Hunner: ah its not in a type, where it needs to be accessible is a class that the providers reference
19:18 Hunner so keystone_user_role could search for a corrisponding keystone_user and keystone_role info, etc
19:19 mjblack https://github.com/stackforge/puppet-keystone/blob/master/lib/puppet/provider/keystone.rb
19:20 Hunner mjblack: Same thing. `catalog.resources.select { |r| r.is_a?(Puppet::Type.type(:class)) && r[:title] == 'keystone::globals' }`
19:22 mjblack Hunner: so that resource example you just used, that would be a puppet class that I'm searching for with that code?
19:23 Hunner mjblack: That would be a line of ruby in a type that would search the catalog for any puppet classes with the title 'keystone::globals' and return it. Then you have the class "resource" and can call accessors on it to read its parameters
19:23 openstackgerrit Andrew Woodward proposed a change to stackforge/puppet-ceph: Add ceph::repo RedHat support  https://review.openstack.org/57063
19:24 Hunner mjblack: If you throw a pry statement into your type and do a puppet apply, you should be able to see what I'm talking about
19:27 mjblack Hunner: yeah it makes sense to me
19:31 Hunner Hmm. It's actually giving an error on :class that sounds suspiciously like a bug. But proper resource type searching seems to work
19:35 mjblack Hunner: yeah searching for the specific one might be better instead of pulling back all of them
19:37 Hunner mjblack: That's why you check r[:title] :)
19:37 Hunner since there can only be one class with a title
19:40 xarses I keep hearing that it should be possible to retreive the current value of a setting from a ini_file provider, but I still haven't seen a working case, does anyone have more details?
19:43 bkero joined #puppet-openstack
19:46 hogepodge joined #puppet-openstack
19:52 tnoor joined #puppet-openstack
19:56 rmoe joined #puppet-openstack
19:59 catalyst_xav joined #puppet-openstack
20:04 badiane_ka joined #puppet-openstack
20:11 derekh joined #puppet-openstack
20:43 Hunner xarses: From an ini file on-disk, or an inisetting in the catalog?
20:49 hogepodge joined #puppet-openstack
20:54 openstackgerrit A change was merged to stackforge/puppet-heat: fix postgresql connection string  https://review.openstack.org/57502
20:54 xarses Hunner: either
20:55 xarses Hunner: i would assume the latter will be inclusive of the prior
21:07 Hunner xarses: Actually not. As we just discussed you can search `catalog.resources` for the inisetting resources and grab them easily
21:07 Hunner To grab it off of disk, you have to call the `puppet resource` indirector and search the returned instances
21:07 Hunner which is a lot harder
21:07 EmilienM hogepodge: o/
21:07 EmilienM hogepodge: ml2 patch is ready for me
21:08 hogepodge sweet
21:08 EmilienM 'night
21:12 bauzas joined #puppet-openstack
21:14 rongze joined #puppet-openstack
21:35 hogepodge joined #puppet-openstack
21:54 hogepodge joined #puppet-openstack
22:12 hogepodge joined #puppet-openstack
22:15 rongze joined #puppet-openstack
22:32 openstackgerrit Doug Schaapveld proposed a change to stackforge/puppet-keystone: Create memcache_servers option  https://review.openstack.org/57361
23:14 mjblack joined #puppet-openstack
23:15 rongze joined #puppet-openstack
23:18 michchap joined #puppet-openstack
23:19 dmsimard joined #puppet-openstack
23:35 xarses joined #puppet-openstack
23:37 Jean-Roger joined #puppet-openstack
23:39 brdude joined #puppet-openstack

| Channels | #puppet-openstack index | Today | | Search | Google Search | Plain-Text | summary