#chef

gzc how are you trying to overwrite it in your recipe? 00:01
allaire gzc:I tried node.default['postgresql']['version'] = '9.3' & node.override['postgresql']['version'] = '9.3' 00:02
but it still use 9.1 00:03
gzc try node.set 00:03
allaire the only way to have 9.3 is in my node file to have this: 00:03
"postgresql": { 00:03
"version": "9.3" 00:03
}, 00:03
gzc are you doing chef server or solo? 00:04
allaire solo 00:04
gzc: same error with node.set :/ 00:04
node.set['postgresql']['version'] = '9.3' 00:05
maybe it's because automatic attributes take over all the others 00:05
gzc bizarre, but i never use solo, I'd have thought that a the json above would work if in the 'default_attributes' section 00:05
allaire and in the attributes file, version is wrapped in a if with an automatic attribute 00:06
what do you think? 00:06
gzc defaults and automatics are different, but if nothing else the override should've kicked in 00:06
hrrm, interesante 00:06
still all defaults, should be overridable with 'normal' attrs at the very least 00:07
out of my depth though on solo 00:07
allaire gzc: I think it would be the same behavior with chef srver tho 00:08
sn0wb1rd It appears the the problem I was having will be fixed by https://tickets.opscode.com/browse/COOK-3819 00:50
josephholsten ugh 01:15
can anyone find a chef-server ticket about POST /environments/foo/cookbook_versions timing out when a cookbook depends on another cookbook at a certain version, but that version doesn't exist? 01:16
@schiasmo ^^ 01:17
well, it's an nginx 504 gateway timeout 01:21
cmaxw Anyone up for a quick rails/chef question? 01:36
I'm trying to use the application and application_ruby recipes to deploy a rails application. But I can't get it to run migrations. 01:37
I've set the 'migrate' attribute to true and the 'migration_command' to the rake task (and alternated removing both. Neither helps. 01:37
wishlistmaster cmaxw, your migration_command is like "bundle exec rake task" ? 01:47
should _default environment be considered as the production? what's the common practice? 01:48
janmike qq: is there a chef support IRC channel? I noticed that chef runs for servers in APAC in Amazon is failing with a connection error to an S3 bucket (Error connecting to https://s3-external-1.amazonaws.com/opscode-platform-production-data/) and I haven't seen anything on status.opscode.com 01:52
holms ERROR: Error installing berkshelf: buff-ruby_engine requires Ruby version >= 1.9.2. 02:00
=/ 02:00
edwardc hello folks, is there any chef build for mac osx 10.9 yet ? i got error message while (re)install chef 02:01
https://tickets.opscode.com/browse/CHEF-4678 # 02:03
kallistec edwardc: same build works for all supported os x versions, you can grab it here: https://opscode-omnibus-packages.s3.amazonaws.com/mac_os_x/10.7/x86_64/chef-11.6.2_1.mac_os_x.10.7.2.sh 02:16
http://www.opscode.com/chef/install/ 02:16
wishlistmaster Hi guys, what's the steps to do when updating cookbook versions *chef-server* 02:31
Joel how do you move a file around on a machine? I've tried source "file://tmp/blah" but it complains it can't find file://tmpblahfile://tmp/blah 02:53
trying the following: http://pastebin.com/fCiGzN3Z 02:55
gchristensen Joel: I think for that you need file:// (protocol definition) /path/to/foo , file:///tmp/sa-challenge-files 02:56
Joel gchristensen: that gets me undefined method '+' for nil:NilClass 02:57
ezotrank source 'file://tmp/sa-challenge-files/mpc-app.war' maybe source '/tmp/sa-challenge-files/mpc-app.war' 02:58
gchristensen tragically then, it probably isn't supported 02:58
Joel ezotrank: tried that too. 02:58
gchristensen: possibly I'm on too old a version of chef for it. 02:59
ezotrank can you show log? 02:59
Joel ezotrank: which version do youwant the stacktrace of? 02:59
file:// file:// or /tmp 02:59
file:/// 02:59
ezotrank '/tmp' version 03:01
Joel https://github.com/jcam/chef/commit/4e31c205ec003734b4ed03ed57121fb4e896afb6 03:01
ezotrank: in that case it seems to be searching in the files portion of the recipe, which is not what I want. 03:03
heh seems to be in a newer version of chef then I' using 03:05
holms i wonder is librarian doing that think I think about. 03:05
if it's so this is horrible design 03:06
we have Cheffile with cookbook which deps should be installed automatically 03:06
and then we write the same to node.json? 03:06
Joel any other thoughts on how to copy a file on the system? 03:07
gchristensen Joel: execute? 03:09
Joel gchristensen: yeah, I'm just going to call a ruby block, seems like the easiest way out. 03:09
gchristensen Joel: not ruby... http://docs.opscode.com/resource_execute.html 03:09
edwardc kallistec: it seems not chef-solo version ? # 10:16 <@kallistec> edwardc: same build works for all supported os x versions, you can grab it here 03:58
Paresh i have chef-client installed on machine which uses ruby 1.9.1 version and i have installed ruby 1.9.3. When i start unicorn which is available on ruby 1.9.3 from my chef server it uses ruby 1.9.1 and gives error 07:40
anyone out there 07:45
arussel using the chef opensource server, I can create a user, he can create a client and a node, but then he can't delete them. I need to make him admin to be able to delete its own node, is that normal ? 08:03
s2r2 arussel: I tend to think about that as "admin" ~ human, "non-admin" ~ chef-client, unpriviledged 08:12
arussel then this would make sense, thanks 08:14
arussel when I use this lwrp in a recipe: https://github.com/arussel/chef-java-wrapper/blob/master/resources/default.rb 08:19
it works without problem 08:20
I get this error: undefined method `app_parameters' for Chef::Resource::JavaWrapper 08:21
when used in multiple recipe 08:21
s2r2: so basically, in open source chef, any human can do anything ? 08:25
it would be nice to at least restrict overwriting a cookbook version 08:26
s2r2 arussel: not sure about fine-grained ACLs here but I don't know if enterprise has 'em... 08:59
nd__ Guys, I have a problem with opscode-cookbooks/mysql. I include mysql::server which sets up the server, starts it, then writes the my.cnf and tries to restart it, which always fails. So I have to reload the box (vagrant), then provisioning runs through without problems. https://gist.github.com/alappe/e6ab05aee66b9e8fcc05 Has anyone a clue on how to fix that? Or what exactly is the problem here? 09:26
MattMaker nd__: dmesg | grep mysql 09:38
does ^ show any additional errors? 09:38
nd__ Let me destroy and up again 09:39
MattMaker the internets say it's maybe a file permission issue 09:40
bigbigbang Ohai Chef ! Does anyone know how I can determine the file system type in ruby ? I want to do security check on files that are only ext3 type ... It'isn't really a question about Chef but perhaps there is a library or cookbook that i'm not aware of .. 09:40
MattMaker nd__: and whatever error logs mysql might keep, perhaps /var/log/mysql.err 09:43
or /var/lib/mysql/[hostname].err 09:46
terracor hello! can somebody tell me, if it's possible to reuse an attribute? I want to use the proxy server attributes from my base role to customize a recipe in a role for my cluster servers. something like this: "override_attributes": { "jboss": { "http.proxyHost" : node['proxy']['server'] }} ? 10:02
arussel s2r2: hosted chef has fine grain permission. No permission is a big pb for us, we have dev that don't kno about chef (and shouldn't know) that just want to vagrant up/down, we don't want them to have any rights in our server apart from creating/deleting node/client. 10:34
JuanFernandez Hello everybody 10:34
s2r2 arussel: ah, I see 10:34
JuanFernandez I have a question about software package versions and chef (official) cookbooks. I want to adapt the apache2 cookbook to Apache 2.4, and I managed success, but I'd like to reformat the patches in a proper way. 10:36
s2r2 arussel: you could spin up a dedicated chef server for your developers and ensure that whatever your chef-team (ops? jenkins?) uploads to the one chef-server they'll also upload to the other one 10:36
JuanFernandez I thought about setting the package version in attributes/default 10:37
but I'm wondering that setting node['apache']['version'] = '2.4' would not work with subsequent versions, like '2.4.1' 10:37
arussel s2r2: this or maybe use chef-sole for dev or have someone ring opscode an negotiate a fair deal :-) 10:37
s2r2 arussel: yep chef-solo might be a good idea. btw, isn't berkshelf able to grab cookbooks out of a chef-server? maybe that's the way to go... 10:38
JuanFernandez Is there a way in the cookbook to enforce the installation of a package from a version number up? 10:39
I mean, I'd like to have a conditional saying ... "if ubuntu 13.10 then install apache 2.4 onwards" 10:39
arussel s2r2: good idea, we're using berkshelf, that would be a good mix 10:39
JuanFernandez and then, in the code, "if apache 2.4 onwards then use this template path" 10:39
s2r2 arussel: well, with solo's limitations of course but it might just do the trick 10:40
arussel s2r2: solo for the 'create a vm for a dev' is probably enough then we use our chef server for infrastructure management with only access for devops 10:42
s2r2 arussel: yep 10:42
nd__ MattMaker: Nothing in the dmesg, .err says InnoDB: Unable to lock /var/lib/mysql/ibdata1, error: 11, InnoDB: Check that you do not already have another mysqld process and the file it want's to use to get the PID (/var/lib/mysql/vagrant-centos-6.pid) doesn't exist, it's base.acm.local.pid. But the .err tells me another thing, right at the end: mysqld_safe mysqld from pid file /var/lib/mysql/vagrant-centos-6.pid ended 10:50
MattMaker: So it could be, that mysql starts up, tries to write into its directory, can't, then exits. Then chef/init tries to kill the process, but it's already dead and this kills the chef-run. 10:51
Then again I don't see the reason yet why there seem to be two mysql-processes trying to setup ibdata 10:52
MattMaker nd__: you are doing something to the config file, I think you said? 10:55
you also implied that it does this with mysql still running 10:56
nd__ No, the cookbook configures my.cnf, not me I only adjusted attributes. 10:56
MattMaker ah, ok 10:57
nd__ I'll try to see if I can test it with test-kitchen in this cookbook 10:57
MattMaker and it's on Centos? 10:57
nd__ Yes. Sadly :) I'm not using it very often 10:58
They provide a test-suite, so let's see what happens there either that will help directly or give me something valid to add as an issue on github 11:00
MattMaker nd__: it looks like that error might be one that happens when something tries to stop mysql and mysql fails at stopping 11:01
nd__ MattMaker: Yes. 11:03
MattMaker: Reloading the box works fine then everything continues but this is not a good solution ;-) 11:03
MattMaker nd__: are you doing anything funny in the filesystem? NFS? 11:05
and are you sure the image you are using doesn't have mysql in it already? 11:07
nd__ MattMaker: No, standard fs on centos (whatever it is) 11:07
MattMaker: I just double-checked this, no mysql on the box except the one I install (which is MariaDB) 11:07
MattMaker trying anything unusual in the configuration? 11:10
nd__ Wouldn't say so, no. 11:13
MattMaker: Do you have an idea where test-kitchen gets the URL for the image from? mysql-cookbook doesn't provide a Vagrantfile (where I'd expect it) and the URL it finds is not for vmware so I'd have to change it 11:14
MattMaker maybe a silly question, but you aren't out of disk space in that Vagrant somehow? 11:14
I don't know much about test-kitchen, sorry 11:14
or out of memory, or swap? 11:15
nd__ No, definitely not out of disk-space, can't really say out of memory/swap in this exact point of time, but I don't think so. As said, running it a second time works. 11:16
And at this point, a lot of more heavy (memory-wise) things are not on the Box yet some java apps. 11:16
MattMaker I guess you can try setting it to not use innodb :( 11:18
nd__ well, but I need InnoDB and as said, after restarting the box, all runs fine 11:19
arussel does someone knows of a small chefspec example for lwrp ? 11:21
arussel found doc on chefspec github 11:29
MattMaker nd__: I'm out of ideas then, except maybe set innodb_fast_shutdown to 0 11:34
and make sure that maybe some temp files or folders aren't getting created with permissions mysql can't read (and which are then recreated properly on a reboot) 11:35
nd__ MattMaker: Yes, I will try to check that thanks so far 11:41
bigbigbang re Hi , I got a little issue : In a cookbook, I install a gem "sys-filesystem", but then, when I try to load it (require) Chef tells me it can't load this file ( cannot load such file -- sys-filesystem). How should I do that ? Should I reload something ? Should I separate the installation and the use ? 12:19
s2r2 bigbigbang: gem's for chef need to be installed with "chef_gem" 12:20
bigbigbang s2r2: yes i have done this , here is a gist of my recipe if it can help .. : https://gist.github.com/bigbigbang/7213657 12:21
nd__ MattMaker: Well, during installation, mysql is indeed running twice 12:28
zaargy bigbigbang: you need to do chef_gem "foo" do action :install end.run_action(:install) to get the gem to be there in the subsequent chef run i believe 13:24
this makes it install the gem during the compile phase 13:25
bigbigbang zaargy: thanks in fact it was a human mistake ... I was doing : "require 'sys-filesystem' instead of require 'sys/filesystem' my bad .. thanks anyway 13:26
DenisK hi. is it possible to get list of cookbook files inside recipe? 13:29
smt like: cookbook_files.each do 13:29
bigbigbang DenisK: Probably with something like node["recipe"] There is the recipe run-list in ohai so you probably can retrieve this attribute .. 13:31
DenisK thanks. will try it. 13:31
bigbigbang DenisK: with "s" node["recipes"] sorry 13:32
zaargy DenisK: why do you want to do that out of interest? 13:35
DenisK I want to install pure-ftpd and it has config options one per file. 13:37
nXqd hi guys 14:27
tomduffield hi 14:27
nXqd is there anyway that we can replace capistrano completely with chef ? 14:27
I'm amateur to chef, I use chef mostly to provision and use capistrano to deploy 14:29
meineerde nXqd: have a look at http://docs.opscode.com/resource_deploy.html which is modeled after the capistrano 14:30
nXqd meineerde: nice, didn't know it :P 14:30
meineerde nXqd: you might have to adapt your workflow though as chef is intended to be used with a pull model (i.e. a chef client runs on each server and updates regularly) vs. capistrano which is push (i.e. an admin choses the exact moment when to push code and to perform things) 14:31
using knife ssh and chef-apply, most things should be able to run similar to capistrano. ymmv 14:32
nXqd: also have a look at https://github.com/opscode-cookbooks/application which provides a nice abstraction layer 14:33
nXqd meineerde: great, thanks for your anaswer. I will look into that, if I do have any question, I will ask :) 14:35
allaire Anybody use the rbenv-cookbook from RiotGames? Is gem_package working for you? 14:35
gazarsgo i don't think that's where gem_package comes from ? 14:54
storme_out gazarsgo: it's not, but i believe they're asking about interactions between the cb and the standard resource 14:55
gazarsgo ah, i get it. i'd expect to have to use rbenv's resource rather than the standard one, but i've been surprised by magic before 14:56
mattupstate can't seem to find resources on on how to test LWRP's with test-kitchenanyone have some insight? 15:07
bean mattupstate: Oh, one of my co-workers just did that like 2 days ago. I think nicgrayson is around? 15:08
mattupstate i'm trying to look at the opscode cookbooks but its not apparent at first glance 15:09
allaire When running gem_package, does it uses sudo or not? 15:09
tomduffield it runs as the user you triggered the chef-run as 15:09
mattupstate lots of variance in the `test` folders 15:09
tomduffield so if you ran `sudo chef-client` it'll run as root 15:10
chris613 Is there an easy way for a recipe to tell if it's being run in the context of a "chef-client -o" overidden run_list? 15:12
allaire tomduffield: thanks, i dont get it, I installed the rbenv cookbook 15:12
and if I try sudo gem install thin, it returns command not found 15:12
but if I do gem install thin, it finds the command, but can't run it since I dont have the permissions 15:12
O.o, no idea why sudo change my path 15:12
heh, this works: sudo env PATH=$PATH gem install thin 15:13
tomduffield: By any chances, did you ever used rbenv-cookbook? 15:14
tomduffield allaire: nope, sorry 15:15
meineerde allaire: sudo has a list of "safe" paths. it preserves any existing $PATH entries matching that list will be preserved, all others will be removed 15:19
allaire: you could add this to your /etc/sudoers and sudo will preserve the binary and shims paths: 15:21
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/rbenv/shims" 15:21
allaire meineerde: Cool trick, rbenv-cookbook should do that by default I guess, do you use it? 15:22
meineerde allaire: if you use the sudo cookbook, you can add that to its config 15:22
node.default["authorization"]["sudo"]["sudoers_defaults"] << 'secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/rbenv/shims"' 15:23
but from my pov, having that on by default feels a bit to intrusive, especially concerning other configuration options 15:24
allaire yeah 15:24
I might run rbenv under my deployer user... 15:24
bigbigbang Does someone know how I can retrieve the file system (ext3, etx4) of a path (/root, /opt ...) ? I have tried with ruby File class and a gem :sys-filesystem and I can't get the file system ... Now I see that Ohai detects this but only on path like : /dev/mapper/vg_root-lv_home .. and i don't know how to get a relation between /root and /dev/mapper/vg-root-lv_home to get the file system .. 15:25
gazarsgo cat /etc/fstab ? 15:32
the mount point is the 2nd column 15:33
mattupstate bean: 15:33
i think i figured it out 15:33
bigbigbang gazarsgo: thanks for the tips 15:34
JuanFernandez Hello everybody 15:39
meineerde bigbigbang: ohai also gives you the mountpoint, e.g. node["filesystems"]["/dev/mapper/vg_root-lv_home"]["mount"] 15:39
JuanFernandez I need some advice tweaking the apache2 module 15:40
allaire meineerde: If I use knife solo and it runs chef solo using sudo (https://github.com/matschaffer/knife-solo/blob/382d017f4aa588354f1994d4526570f957bb20cb/lib/chef/knife/solo_cook.rb#L284), will gem_package also do 'sudo gem myGem' or simply 'gem myGem' ? 15:40
do you have any idea, still sounds confusing to me :( 15:40
meineerde allaire: it will not use sudo 15:40
allaire: generally, you should run chef as root whenever possible. else you always have to work around permission issues in the very chef run 15:41
JuanFernandez I would like to modify it completely to support apacher 2.4 15:41
allaire meineerde: i think knife-solo solve that :) 15:41
meineerde yes 15:42
allaire meineerde: it only ask for my sudo pass once at the beginning 15:42
JuanFernandez is it possible to create another cookbook called also apache2 with some version constraints? I would like to set it to require ubuntu 13.10 minimum 15:42
and indicate in the official one that it does not support ubuntu 13.10 15:42
bigbigbang meineerde: Yeah but I would like the "reverse" thing : I know the mount point (/root) and I want to retrieve the device ... 15:43
meineerde: and retrieve the file system associated woth the mount point .. 15:43
meineerde JuanFernandez: have a look at the supports keyword in the metadata.rb. http://docs.opscode.com/essentials_cookbook_metadata.html 15:43
JuanFernandez meineerde yes, that's what I thought 15:44
thom bigbigbang: mount | awk '/\/root/ { print $5 }' 15:45
JuanFernandez but the thing is that i would like to name it "apache2" as well, because other cookbooks depending on apache2 don't care if it's 2.2 or 2.4 15:45
so, depending on the system, it sould grab the 2.2 cookbook or the 2.4 cookbook 15:45
is that possible? 15:45
someara yep 15:46
thom or $1 if you want the device 15:46
someara cookbook are identified by "name"+"version" 15:46
if you omit the version, it grabs the latest 15:46
but you can lock them down to specific version with the Environments mechanism 15:46
JuanFernandez but i'm not talking about the cookbook version 15:46
bigbigbang thom: thanks u vry much, will try this 15:46
JuanFernandez but the apache2 2.2 cookbook or the apache2 2.4 cookbook 15:47
thom bigbigbang: mount | awk '$3 == "/root" { print $1 }' is actually better 15:47
someara oh right 15:47
JuanFernandez we can include the check in the official apache2 cookbook 15:47
but it's quite dirty 15:47
meineerde bigbigbang: node["filesystems"].values.find{|device| device["mount"] == "/root"}["fstype"] 15:47
someara right now we don't support namespacing 15:47
JuanFernandez there are some structural changes (for example, conf-available / conf-enabled) 15:47
someara so, you'll have to either name it something else 15:48
my-apache2 15:48
or fork it and use that 15:48
JuanFernandez but it will break dependencies from other cookbooks 15:48
someara things that depend on the apache2 cookbook? 15:48
JuanFernandez the logic would be: if it's ubuntu < 13.10 then use the apache2.2 cookbook, if it's ubuntu >= 13.10 then use apache2.4 cookbook 15:49
I cannot make it automatic 15:49
meineerde bigbigbang: or even this 15:49
bigbigbang: mount_fstype_mapping = node["filesystems"].values.inject({}){ |result, device| result[device["mount"]] = device["fstype"]; result } 15:49
JuanFernandez unless, I'm thinking, there is some kind of cookbook aliases 15:49
that I can set runtime 15:49
bigbigbang meineerde: Wow ! This look as what I was expecting ! 15:50
meineerde: thks a lot will try this 15:50
someara historically, we've been encoding distribution and distribution-version specific idioms into The Apache Cookbook 15:50
so if you look around the attributes file, you'll see lots of case logic 15:51
JuanFernandez yes, i've seen that and modified in there 15:51
someara but 15:51
if apache 2.4 acts differently enough that its going to explode the case logic in The Apache Cookbook 15:51
then I'd probably just make a new one 15:51
JuanFernandez exactly 15:52
but I'd like to be able to keep the other cookbook dependencies 15:52
some sort of saying "apache2.2 cookbook supports ubuntu < 13.10" (which you should set nowadays in the current apache2 cookbook) 15:52
someara dependencies are hard lets go ride bikes 15:53
JuanFernandez and "if you're using ubuntu >= 13.10, grab this apache2 cookbook (which is the apache2.4 one)" 15:53
someara eh 15:53
think of cookbooks the same way you would a rubygem, perl module, or a python module 15:53
doing platform specific case logic on deps is the path to madness 15:53
think of the depsolver 15:54
jtimberman someara: you have a H control character at the beginning of each line. 15:54
so that's weird. 15:54
someara really? that's super lame. 15:54
I'm going to blame adium 15:54
gleam that seems fair 15:54
stormerider s/lame/crappy/ 15:55
gchristensen does the default bootstrap template not copy the data bag secret? 16:06
JuanFernandez sorry for the delay @someara I got a phone call 16:08
I can send you the modifications that I'm doing to the apache2 cookbook trying to support it to apache 2.4 16:08
but it's not a clean way, as you said 16:08
too many "ifs" 16:09
someara yep 16:12
mattupstate quickest way to determine if a node is on aws? 16:19
node['aws'] ? 16:19
gchristensen mattupstate: node['cloud']['provider'] 16:20
mattupstate cheers 16:20
tomduffield node['ec2'] 16:20
xerxas someara: sorry to bother you directly but as you are ops, you should be staff at opscode. Do you know who is responsible for new packages ? Ive built ubuntu 13.10 bento box, and built omnibus chef client packages within that box. Is it worth opening tickets / doing some pr for this ? who should I ask this ? 16:20
gchristensen so many ways! :P 16:21
xerxas: I assumed the same, however not all ops are employees, and not all employees are ops. 16:21
xerxas ;) 16:21
right, I see some Hwops guys that are ops, for ex .. 16:21
;) 16:22
gchristensen wat? 16:22
xerxas gchristensen: anyway , Im searching for the release manager ? 16:22
heavywater ops (a company that is not opscode) ;) 16:22
but , must ops are from opscode ;) 16:23
xerxas I meant most, not must ;) 16:31
bigbigbang meineerde: Are you still there ? I got a little issue with your command ... I use this one : filetype = node["filesystems"].values.find{|device| device["mount"] == dir}["fstype"] , but Chef tells me it did'nt know 'values' (undefined method ' values' or nil .... 16:34
meineerde bigbigbang: it's actually node["filesystem"] (notice the missing s at the end) 16:35
bigbigbang meineerde: oh my bad thx 16:35
meineerde: end of the day ... 16:36
meineerde I had it wrong above. I just hadn't tested the code... 16:36
elliottt is there a good way to specify that one recipe depends on the completion of another? like installing a compiler, then using it to build code from a repo? 16:36
someara so in your thing-you-need-to-build-the-code recipe 16:37
do an include_recipe "compiler::stuff" 16:38
elliottt and include_recipe will force it to wait for completion? 16:38
someara well you'd put the include_recipe before the resources that do the compiling 16:38
elliottt i had that, and it was still running the recipes that do the compiling before the compiler was available 16:39
i'll check my code, maybe i'm not understanding what i did correctly :) 16:39
someara a chef-client run actually evaluates the recipes and compiles a things called a "resource collection" 16:39
when it sees package, user, cron, directory, file, whatever those are stuck on an array 16:40
so if you have (software) compiley things happening in the (chef) compilation phase, thats usually the problem 16:40
elliottt is something that runs during chef compilation something that specifies an action other than :nothing, or one that has an invocation of an action following the definition? 16:41
well, let me rephrase that: what's the easiest way to tell what phase something runs in? 16:44
jbz elliottt: Generally, things inside chef resources are run during convergence. Code *outside* the do/end blocks of resources is run at compilation time. 16:47
elliottt ah, thanks :) 16:47
jbz elliottt: So if you want arbitrary ruby code to execute during compile, put it outside resources. If you want it to execute *at convergence*, put it inside a ruby block resource. 16:48
e.g. 16:48
elliottt jbz: so that makes my dependency problem even stranger 16:48
jbz sorry, didn't see that 16:48
elliottt jbz: i'm installing a compiler, then trying to use it, and the use of the compiler happens before it's done installing 16:48
jbz how are you trying to use it? 16:48
from inside a block? 16:49
elliottt jbz: yes 16:49
jbz ok, the ordering of blocks is not, AFAIK, completely transparent 16:49
elliottt it's within an execute "install" do ... block 16:49
someara oooh 16:50
I see what you're saying 16:50
sec let me find an example hack for this 16:50
jbz elliottt: you could do this: 16:50
Have the action on the execute "install" block be :nothing 16:50
elliottt jbz: command is given within the execute install 16:50
jbz but then have the block which installs the compiler notify that resource to :execute 16:50
or, :run sorry 16:51
someara elliot: 16:51
jbz can't remember the exact syntax lol 16:51
someara https://github.com/opscode-cookbooks/jenkins/blob/master/recipes/server.rb#L100 16:51
that's what you want 16:51
elliottt and if the two are in separate recipes? 16:51
well, cookbooks 16:51
someara you want a resource that spins its wheels checking to see if your compiler is done installing 16:51
elliottt using the subscribes attribute? 16:51
jbz ah ok what @someara said looks better 16:52
elliottt is block ruby, or chef? 16:52
jbz the ruby_block is a chef resource 16:53
elliottt yes, and the block call on the next line? 16:53
jbz that defines the actual code block to be executed by the ruby_block resource 16:54
elliottt ok, so it's an attribute of the recource 16:54
jbz yes, sorry 16:54
elliottt np :) 16:54
jbz note that beneath it is an action attrib 16:54
elliottt so, if action is :nothing, and block is specified, block will still run? 16:55
oh, i see 16:55
jbz no 16:55
elliottt the log starts it 16:55
jbz the block is being called from the resource below with :create 16:55
someara so 16:55
https://gist.github.com/someara/89372922b4d1edc547cf 16:55
those three resources will be compiled onto the collection, then fire in order during converge 16:55
jbz action :nothing just means 'don't do anything when you compile this resource'. It can still be kicked off by notify. 16:55
elliottt so, if it has action :nothing present, will it make it to convergence if nothing ever changes its action? 16:56
someara resource 3 will probably act funny *if resource 2 does not block* 16:56
elliottt so, no notifications, and it has no subscription attribute? 16:56
jbz elliottt if it has :nothing set at compile and nothing notifies it, it will never execute. 16:57
someara depends on how you decide to solve your problem 16:57
elliottt so, notification during convergence modifies the run queue? 16:57
someara yep 16:57
elliottt ok 16:57
that helps 16:57
someara the block_until_operational trick will basically pause the chef-run until your software is done installing 16:58
elliottt it seems like what i really need is to subscribe to the installation resource for the compiler 16:58
so that my use of it doesn't start until the compiler has finished 16:58
freezey does anyone know who is working on the juniper client? 16:58
someara in the jenkins cookbook example, the script that stars the java process returns before the software is loaded and operational 16:58
so you need to block before a dependent resource fires 16:58
I bet you're having the same problem 16:59
elliottt so in that case, the installation script forks something that takes some time to start, and that's the problem? 16:59
the script exits before the service is ready? 16:59
someara yep 16:59
elliottt i think in my case, the installation script should be running to completion before it exits; there arent any async things happening 17:00
someara oh 17:00
elliottt so i should be able to use the dependency stuff to make it work out 17:00
or does chef fork all uses of execute? 17:00
someara yea. some combination of blocking, notification or subscription can usually solve anything 17:00
depending on what the underlying issue really is 17:01
elliottt ok. thanks for the help :) 17:02
you two have really cleared up my mental model of how all this stuff works :) 17:02
freezey added a pr https://github.com/opscode-cookbooks/logrotate 17:02
incase someone wants to allow it 17:02
stephenking hi. I'm again trying to upgrade to chef server 11 17:04
while iploading, I always get: ERROR: JSON::ParserError: Unsupported `json_class` type 'Chef::WebUIUser' 17:04
I get the same error also when using knife-vault while adding users 17:05
but my repo never contains a WebUIUser string 17:05
any idea what's going wrong? 17:05
adamjk-dev hey all, anyone used knife to create a cookbook with passing in the -m EMAIL option and that option being messed up? 17:09
I did a knife cookbook create my_cookbook -C "My Company" -m "my_email@email.com" -r md --> and got the email in the metadata file to be 'd' 17:09
gchristensen when I tell ohai to reload a plugin, it *says* its reloaded, but then the attribute isn't available later. running ohai on the node itself works fine. any suggestions on what may be going on here? I'm following this example here - https://github.com/opscode-cookbooks/nginx/blob/master/recipes/ohai_plugin.rb 17:10
is thisthe case that lazy attributes are handy? 17:13
boom 17:14
oops - wrong channel for the 'boom' - the attribute question still stands :P 17:14
stormerider trying to do a chef-rewind on apache so i can get it working with apache2.4, but i'm getting this: Cannot find a resource matching template[/etc/apache2/apache2.conf] (did you define it first?) -- any ideas? 17:33
jstallard is there a way to reference the name of a recipe from within the recipe itself? i.e. If I have a recipe called foo::bar, is there a variable I can access whose value is "foo::bar" ? 17:51
opstrong jstallard: what is your use case for that? 17:51
jstallard a basic one is a comment line at the top of a template file getting created. e.g. "This file created by chef recipe foo::bar. Do not modify" 17:52
tomduffi_ jstallard: do you have multiple recipes referencing the same template file? 17:57
stormerider so i figured that out (the template is defined just as template['apache2.conf']), but now i'm having an error with mod_authz_default, even after changing node['apache']['default_modules'] 17:57
jstallard tomduffi_: let's say I do 17:59
jstallard there are cookbook_name and recipe_name variables, in case anyone was wondering. So I can use "#{cookbook_name}::#{recipe_name}" to do what I'm trying to do 18:12
sdanzig Hi DevOps people. I'm trying to get chef-solo running on a Windows 7 VM, with django running in a virtualenv. All while learning Chef. It's been a pain in the ass. Right now, I'm fighting a "NoMethodError: package[python] (python::package line 46) had an error: NoMethodError: undefined method `version'" error trying to install Python. I saw in the windows cookbook, there's a "version" method in the libraries.. Tried "depends" in 18:25
http://dougireton.com/blog/2012/12/16/how-to-include-the-windows-cookbook-helper-methods-in-your-chef-recipe/ suggested I put "::Chef::Recipe.send(:include, Windows::Helper)" in front of the recipe... no luck yet. Am I fighting a losing battle here? 18:26
tomduffield are you using the community python cookbook sdanzig? 18:28
sdanzig yep... lemme confirm the URL 18:29
http://community.opscode.com/cookbooks/python 18:29
SFLimey I'm building a new cloudformation template at AWS to do a build from our hosted chef account. I'm a little confused which version of chef I should specify. The template I'm working off of show 10.24.4-1. Is there any reason I should be using a later version and if not, do you have a recommendation on which version I should specify? 18:29
tomduffield and you're using the latest 1.4.0? 18:29
sdanzig: ^^^ 18:30
sdanzig I attempted to add that "helper" thing in the package.rb recipe. And yeah, I think it's 1.4.1 18:30
nope, 1.4.0 .. was downloaded within the last week anyway 18:30
tomduffield okay. I don't see any reference to version in the community recipe. Is your code available sdanzig? 18:31
SFLimey: I would recommend using at least 11 18:31
bilbur Can anyone help me understand why my chef-clients are getting this error even when they are not passed a run list? http://fpaste.org/50243/07147113/ 18:32
stormerider bilbur: looks like an error with a handler configured in the chef client 18:33
bilbur Can you elaborate on "handler" ? 18:33
SFLimey Thanks Tom, any reason I wouldnt just use 11.0.8 (The latest I believe)? 18:33
tomduffield you're welcome SFLimey. and no, I would always encourage you to use the latest which is 11.8 18:34
or 11.6 18:34
stormerider bilbur: error handler, report handler, etc.-- check your client.rb 18:34
tomduffield 11.6.2 i think is the latest SFLimey 18:35
sdanzig hmm... no, not available at the moment, but I can certainly make it available Going to try to retrace where "version" was used first, and I'll reinstall and retest the python library before I post the code. 18:35
bilbur Thanks stormerider my client.rb is: http://fpaste.org/50246/83071790/ 18:36
SFLimey Final question Tom, can you just specify "Latest" for ChefVersion default in the cloudformation template to have it just use the latest version? 18:37
bilbur stormerider: So I dont see any handler information... 18:37
stormerider bilbur: not sure, then. 18:38
bilbur stormerider: thanks anywho 18:39
tomduffield SFLimey: I'm not sure since CloudFormation is an Amazon thing. 18:39
if you show me your CF script I could take a look but you can also always just give it a shot! 18:39
SFLimey Okay, appreciate the help again Tom. 18:40
azret is there a way to insert the server FQDN into a template file using node? 19:02
i added <%= node[:fqdn] %> to a file, but it didn't aggregate the hostname 19:03
sdanzig tomduffield ... Pushed the garbage I was mucking about in here: https://github.com/sdanzig/chef-repo/tree/python-attempt 19:03
tomduffield sdanzig: sorry to say this but I don't know if this cookbook, as it currently is, will work on windows 19:08
and I'm afraid I don't know how to get around that 19:08
sdanzig yeah, I figured that. I saw a windows version of a python cookbook.. it doesn't have the virtualenv stuff though. and have been trying cygwin.. but that's a can of worms 19:09
can you at least pray/cry for me and I'll keep trying? 19:09
tomduffield i'll light a candle 19:10
bilbur is there a list of all the data ohai attempts to harvest? 19:32
justizin seriously, am I high? wtf http://pastebin.com/Cp2RDpq8 19:55
the actual message: FATAL: Bad value (mixed) for node['postgresql']['config_pgtune']['db_type'] attribute. Valid values are one of dw, oltp, web, mixed, desktop. 19:56
tcate justizin: just a gues, but do you have that node attribute set somewhere to something other than a string? 20:01
awgross justizin: mixed isnt defined as a symbol or anything right? 20:02
justizin awgross: ah that's worth checking 20:02
yep that's it ;d 20:02
awgross yeah, node stuff is mostly the special Mash type, which can do some weird stuff around symbols and strings 20:03
i ended up writing some custom stuff to find/get a nested key in the node attribute regardless of whether is was a string or symbol because I had that issue often 20:04
justizin yah i went through over the weekend and converted all our unnecessary double quotes to single, and converted single quotes to symbols where possible, and i slightly overdid it :) 20:04
dmdeklerk jblack: Hi! In the irc logs I found you ran into a mysql-server apt install issue. I think I'm running into the exact same issue here, did you happen to find a solution (apart from running chef-client again?) 20:04
awgross justizin: yeah the single vs double is a bad one too 20:05
f2s I'm attempting to use the chef-server cookbook to install using vagrant. Unfortunately it generates a new chef-validator each time and I can't get it to read in my own chef-validator.pem. Does anyone have an example of a working chef-server via chef solo provisioner and chef client using validation.pem 20:08
rcuirle some of my nodes are not pulling the latest version of the cookbooks from my private chef server. There are no environment version restrictions, so it should always be getting the latest. I've tried deleting the cookbook from the node's chef cache, but it still gets an old version from the server. Any thoughts on where to begin troublshooting? 20:11
justizin rcuirle: are there version constraints imposed by dependency relationships? 20:15
coderanger kallistec: http://hastebin.com/kofipeyuga.rb ;-) 20:18
rcuirle justizin: there are not. In fact, the cookbook I'm most concerned about is explicitly named in the runlist, so it's at the root and not in a dependency of the cookbook in the runlist 20:19
justizin ah, but if it is *also* listed as a dependency with a version restriction, that will win over no version restriction 20:19
that may not be it, just helping you think it through 20:20
awgross rcuirle: can you see the latest cookbook version on the Chef-Server / have you tried re uploading it? 20:20
rcuirle good point, but probably not what's happening here. The correct / latest version IS deploying to OTHER nodes, just not ALL 20:21
awgross: I can see the latest version on the chef server. I have not tried to re-upload - will do so now - with a delete and reupload 20:21
tubbo okay so, i'm having a major issue with the decisions made in the mysql cookbook 20:21
for starters, why the hell is my upstart script taking forever? because the mysql cookbook implements some kind of db installation that sets the DB up for use when i bring it up. makes sense, until Chef times out waiting for the command to finish. 20:22
my question is...how do i get this to stop so i can go on with my day? 20:22
gazarsgo sudo apt-get install mysql 20:23
savant Hi all. How does chef know to map data_bag_item to the DataBagItem class? 20:23
tubbo gazarsgo: word. i think i'm gonna try that. 20:23
gazarsgo: this cookbook is really frustrating me. 20:23
gazarsgo tubbo: you can wrap it in a script block, too, and then it's all chef'd and everything. 20:24
tubbo gazarsgo: does that come with an upstart script too? 20:24
this just started happening like randomly 20:24
gazarsgo i would find a new distro to use if you install a service as a package and it doesn't come with a wrapper script for initd/upstart/whatever 20:25
tubbo gazarsgo: haha true 20:27
m00sey Folks, I'm trying to build out a chef cookbook for my application, I've added 'include_recipe "openssl"' and 'include_recipe "mysql::sever"' - and I'm receiving the error: NameError: uninitialized constant Chef::Recipe::Opscode 20:28
f2s does anyone expain what chef.validation_key_path does in the chef_client provisioner (vagrant) ? 20:28
kallistec coderanger: still don't like it. compile vs. converge is confusing enough as is without having 3 run contexts in alternate stages of compile and converge. Using a resource defn to wrap your LWRP will do exactly the right thing 20:29
m00sey one issue on git talks about adding a 'depends' not sure where that goes, or if it's needed - could I be missing something else? 20:29
coderanger kallistec: That makes subclassing impossible 20:29
kallistec: It has to be an interwoven flow to allow replacing subsections 20:29
kallistec coderanger: no, the way the LWRP DSL is written makes subclassing impossible 20:29
coderanger kallistec: This isn't an LWRP 20:29
kallistec if you really want subclassing 20:29
then make a static method on Chef 20:30
Chef.define_provider(superclass=Chef::Provider::LWRPBase) do; stuff; end 20:30
savant How do I check if a data_bag_item exists? 20:30
kallistec then write your LWRPs in library files 20:30
coderanger kallistec: http://hastebin.com/doyucaguki.rb is the full resource 20:31
savant I am using chef solo 20:31
rcuirle justizin & awgross: not sure if it's related or not, but the node takes forever in "resolving cookbooks for run list" - yet network communications are fine and I can curl to the server which is up - may or may not be related to not getting the right version of the cookbook 20:31
awgross rcuirle: Definitely curious, have you tried runnning with with `-l debug` for more output? 20:33
rcuirle awgross: I have not. I will try that as well 20:33
mveitas is there a way to see the versions of the cookbooks that have been run against a node? 20:36
m00sey @savant in ruby wouldn't data_bag_item lookup just be nil? 20:36
dmdeklerk savant: knife data bag list 20:39
m00sey: 'depends' go in your metadata.rb file 20:40
m00sey gotcha - so does 'depends' run the mysql::server recipe, or does the include_recipe do that? 20:41
azret If I am getting "[2013-10-29T16:41:22-04:00] WARN: Expected JSON response, but got content-type 'application/octet-stream'" for a bz2 file i am downloading on a remote server, how do I get the server to return a json response 20:42
awgross mveitas: Running with `-l debug` tells you the version you download from the Chef Server, though it seems to be in hex, let me see if I can find a better way 20:42
dmdeklerk m00sey: depends brings it in your internal 'structure', you can then include_recipe from that 20:42
rcuirle awgross: with debug on, I can see that GET's to chef server are successful for information about the running node and the environment the node is in. A POST to /reports/nodes/<nodename>/runs is what hangs 20:42
m00sey ok - I think I get that 20:43
@dmdeklerk thanks 20:43
awgross rcuirle: very strange, it must be trying to upload a huge amount of node data, do you know if you have any large node data in there? 20:43
rcuirle awgross: so I'm not even getting a version yet. It may be timing out entirely and using the latest version it has - seems like multiple problems. 20:43
andrewdeandrade so when using a git resource, how do I clone with the --bare option? FWIW I'm trying to setup my application servers so I can deploy to them automatically after all tests pass 20:43
dmdeklerk m00sey: your wellcome 20:44
awgross rcuirle: yeah, something strange is definitely happening. Is it hosted chef or your own 20:44
andrewdeandrade this is the first time I'm doing continuous integration/deployment with chef, so feel free to correct me if I'm approaching this wrong 20:44
rcuirle our own - private - 11.4.0 20:45
awgross; I'll take it up with our infrastructure guy - i just don't get why some nodes (on the same network segment) are fine. 20:45
awgross mveitas: Found it, run with `-l debug` and look for 'DEBUG: Cookbooks detail:' 20:46
mveitas: it should have it there 20:46
rcuirle: ok, sorry I use hosted chef so I am not the best with those issues 20:46
mveitas awgross: thanks :) 20:46
awgross mveitas: np 20:46
savant dmdeklerk: programmatically, from within a recipe 20:50
dmdeklerk savant: why not use chef-client. then its simple. 20:53
andrewdeandrade mveitas: you can add `chef_client_path 'chef-client -l debug'` to your knife.rb file to always run in debug mode. when you don't need it, just comment it out 20:53
savant dmdeklerk: because im using it in a recipe and i dont think shelling out to find out whether a data bag exists is a good idea. 20:54
dmdeklerk savant: search(:data_bag_name) 20:54
savant: but that doesnt work in chef-solo out of the box 20:54
savant hmmm okay 20:54
thanks for your help! i'll figure it out :) 20:55
dmdeklerk savant: Why not use chef-client? 20:56
tubbo yo fuck 20:56
mysql 20:56
seriously 20:56
savant dmdeklerk: i have a databag setup 20:57
i define what a service is 20:57
what commands it runs 20:57
and what codebases it can/should install on the server 20:57
if the data bag item for that codebase doesnt exist, it should fail gracefully 20:58
if you mean "why dont you use chef-server" its because we dont have it and we dont plan on doing so for now. 20:58
dmdeklerk savant: Maybe its time to rethink chef-server 21:00
savant: I used to look into chef-solo-search, never got it working, but it might help you in this case 21:01
awgross savant: if you want you can just do the databag lookup inside a library file, gives you simple access to begin/rescue. Could do it once and use that function instead 21:02
savant meh 21:03
codebases = data_bag("codebases") 21:03
codebases.include? codebase 21:03
:) 21:04
seems to work 21:04
idlemichael can you pass options to the chef-client throuhg knife when you're provisioning a server or something? 21:12
bougyman sure 21:12
idlemichael how do you do that 21:13
:O 21:13
andrewdeandrade Guess my question was missed. I've looked everywhere and can't find an answer, but is there a way to clone via a git resource with the --bare option? 21:15
dmdeklerk andrewdeandrade: I dont think you can do that. Since the git resource tries to be idempotent i dont see an easy way to allow a user to pass all sorts of arguments to it. It seems like you have to use the command/execute resource. I'm no expert thouhg! 21:18
andrewdeandrade dmdeklerk: Yeah, I figured as much. It's a huge pain to have imdempotency span the entire server creation from start to finish without some mechanism for "caching" artifacts created along the way 21:19
dmdeklerk andrewdeandrade: Just to be clear I say this, not knowing what the --bare option does 21:20
andrewdeandrade dmdeklerk: I'm trying to get something where vagrant and ami images are idempotent via Packer.io. Then server configuration idempotency is managed via Chef and finally find another solution for node.js application idempotency 21:20
dmdeklerk andrewdeandrade: cant help you with that 21:21
andrewdeandrade dmdeklerk: the --bare option clones a repo without a working tree. it's meant strictly to receive changes coming from another git repo. It's the option that is commonly used with continuous integration/deployment of apps 21:21
dmdeklerk: np 21:21
looks like this will work: https://github.com/gerhard/deliver 21:22
dmdeklerk andrewdeandrade: But... do they have an irc channnel? 21:25
andrewdeandrade dmdeklerk: dunno... it's an alternative to what i wanted to do 21:32
awgross they probably do, same people make packer and vagrant 21:33
andrewdeandrade since a lot of people here do ops, I was wondering if anyone knew of a tool that dynamically adds and removes entries in the /etc/hosts file... like if i cd into a chef project that deploys to ec2, it would be nice to be able to have some hosts added dynamically to /etc/hosts and reloaded 21:34
dmdeklerk andrewdeandrade: google?? http://powdahound.com/2010/07/dynamic-hosts-file-using-chef 21:37
andrewdeandrade dmdeklerk: was just doing that 21:37
dmdeklerk lol 21:37
silk Is there a reason that the data retrieved from an API call to /environments would be different to the data retrieved by knife ? (Is there a possibility of delay in one or the other for recent updates) 21:39
andrewdeandrade silk: I think if you have a Chef Server, knife will always pull from the Chef Server and ignore the local files. 21:39
silk using hosted chef 21:39
andrewdeandrade silk: you need to upload your /environments on each change 21:39
silk well, I used knife to edit it, and the changes have taken place on the node 21:40
andrewdeandrade silk: knife environment from file environments/some_env.{rb,json} 21:40
silk but when querying the contents of the environment via the API, there are differences 21:40
Andrew, i dont use that method 21:40
andrewdeandrade silk: oh, you mean via a rest call 21:40
silk knife environment edit $blah 21:40
yes 21:41
the contents being returned appear to be stale 21:41
andrewdeandrade silk: dunno... haven't used that yet 21:43
jjasonclark anyone have an example of installing mysql 5.1 with the community cookbook? http://community.opscode.com/cookbooks/mysql I can only get it to install version 5.0 21:47
dmdeklerk jjasonclark: I put this in my attributes file. default['mysql']['server']['packages'] = %w[mysql-client-5.5 mysql-server-5.5]. Not sure if I need the client package 21:49
jjasonclark @dmdeklerk I also tried the same thing. I picked mysql51 and mysql51-mysql-server although the log showed it was still trying to install the mysql package 21:50
dmdeklerk jjasonclark: well thats just weird 21:51
jjasonclark: your on ubuntu? 21:51
jjasonclark @dmdeklerk centos 5.9 21:52
dmdeklerk jjasonclark: is that debian? 21:53
jjasonclark yea. very odd. I of course can install it manually. first thing I checked. Seems odd that chef cannot do it 21:53
dmdeklerk jjasonclark: I was just doing this on ubuntu tonight. 21:53
jjasonclark I think its "rhel" http://docs.opscode.com/dsl_recipe_method_platform_family.html 21:53
dmdeklerk jjasonclark: did you check out the cookbook source, mysql cookbook is one of the *simple* one IMHO 21:54
jjasonclark @dmdeklerk I did. It looked like https://github.com/opscode-cookbooks/mysql/blob/master/recipes/server.rb#L104 was what I needed to change. But was surprised when it didn't 21:56
@dmdeklerk the attributes just needed to be updated. I did that in an app specific cookbook that sets the attribute 21:57
dmdeklerk jjasonclark: that line was giving me troubles too. on ubuntu. 21:57
jjasonclark hmm.. 21:57
dmdeklerk jjasonclark: untill i set that attribute. 21:57
jjasonclark how did you set it? maybe I did it wrong 21:57
I have it in my attributes file of the app specific cookbook. This seems to work for all the other settings. 21:58
dmdeklerk jjasonclark: I 'm on debian offcourse so the package names might be different for you 21:58
jjasonclark: thats my method too 21:58
hugespoon dmdeklerk: use node.override if you are overriding another cookbooks default attributes (or just override as the node is implied in an attributes file) 22:02
dmdeklerk: ive done exactly what you are suggesting in a wrapper cookbook for mysql 22:03
dmdeklerk hugespoon: Cool. Thanks! 22:03
hugespoon: what is the syntax? "node.override['mysql']['server']['packages'] = foo" ? 22:06
hugespoon: never mind, it is that syntax, i'm being lazy 22:07
hugespoon dmdeklerk: not a problem, but that should do ya 22:08
jjasonclark shoot! tried it with the override syntax and it didn't work. I'm guessing I'm not setting an attribute like I should. Going to read the source 1 more time. Thankfully mysql is a short one 22:26
dmdeklerk jjasonclark: I just noticed mysql::server includes mysql::client, which uses default['mysql']['client']['packages'] = %w[mysql mysql-devel] 22:38
jjasonclark: That would explain the mysql package in your log. 22:39
jjasonclark: I'm now seeing this: Ran "/usr/bin/mysql" -u root -p'FILTERED' < "/etc/mysql/grants.sql" returned 1.. ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) arghhh 22:41
CharlieSu Anyone looking for a DevOps job in Colorado? If so, PM me. 22:57
redondos even though I've configured knife.rb with log_level :info, running `knife bootstrap' throws: opt/chef/embedded/lib/ruby/gems/1.9.1/gems/mixlib-log-1.4.1/lib/mixlib/log.rb:97:in `level=': Log level must be one of :debug, :info, :warn, :error, or :fatal (ArgumentError) 23:05
any hints? 23:06
coderanger redondos: Is it throwing that locally or remotely? 23:10
redondos remotely 23:12
coderanger: ^ 23:12
coderanger redondos: what does knife --version show 23:13
redondos Chef: 11.6.0 23:13
coderanger And are you using the default bootstrap? 23:13
redondos probably, because I didn't know you could change the bootstrap script 23:13
bootstrapping a different node works well, so it must have to do with a setting in this node 23:16
running it with `-d ubuntu12.04-gems' worked. thanks for the hint, coderanger! 23:18
coderanger redondos: That is highly not recommended 23:19
redondos i assumed since it installed the gems one by one. what do you recommend? 23:19
coderanger You should be using the default, it is likely that first server already had an older version of chef installed by hand 23:20
You should just kill it and spawn a new one 23:20
redondos ok, thanks again. 23:21
coderanger By default the log_level is set to :auto 23:22
which older versionso f chef didn't understand 23:22
redondos how could i change the log_level remotely? (knife.rb does specify :info) 23:22
coderanger chef-client cookbook 23:23
redondos and you are right, the node had 10.24.0 installed 23:23
is it possible to use bootstrap to upgrade previous installations of chef? 23:24
dmdeklerk Hi ops-folks.. 23:33
Could someone help this dev out and tell me if this apache conf looks sane? 23:33
http://paste.ubuntu.com/6326968/ App is giving a "301 Moved Permanently" and "<p>The document has moved <a href="http://pricetool.foo.com/&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&quot;. I'm really not at all sure whats going on there. 23:33
conf comes from the passenger_apache2 cookbook 23:35
coderanger redondos: Not normally, you can use the omnibus_updater cookbook now though 23:39
redondos k, ty. i'm going to spawn a new instance instead, which means rewriting some recipes but it needed to be done eventually. 23:41
coderanger redondos: Welcome to the ephemeral future 23:43
:) 23:43
redondos heh 23:43
_ci Using the opscode database cookbook, is there a way to add "REQUIRE SSL" to :grant statements? 23:43
quack_up remedial question, i'm having a hard time using the chef-client cookbook to get the chef-client to run as a service after bootstrap. i've got a role "base" with chef-client::config, service, init_service recipes (in that order). after i bootstap vms with that role, the service isn't running. did i need to do something else to get it to be started by default? 23:47
packeteer guys, can somebody point me at an example role with multiple recipes ? 23:54
nshenry03 If you set an attribute in attributes/default.rb (default['jumpcloud']['databag_name'] = 'secrets'), you should be able to use that in a recipe without setting it in a role or anything, correct? 23:55
jumpcloud_credentials = Chef::EncryptedDataBagItem.load(node['jumpcloud']['databag_name'], node['jumpcloud']['databagitem_name']) 23:55