Run recipe on multiple boxes using knife search

Hi All,

I am facing a weird issue , i am not sure whats wrong.

This is what i am trying to do ,

  • from all the chef slaves find slaves which has one particular role
    applied
  • run chef-client -o “recipe[xyz]” on those servers.

below is the command i run , The issue i face is the recipe gets applied on
randomly on some servers and does not do anything on the other servers …
and this is random…

Is there anything i am missing here or anything i can do to enhance this.

knife ssh “role:billing-qa-machine” “chef-client -o recipe[$product]” -x
user -P password

Thanks
Manoj

Hi Chefs,

Please advise on what is it i am doing wrong , or may be there is a better
way to apply a recipe on multiple nodes.

Thanks
Manoj

On Wed, Oct 16, 2013 at 2:03 PM, Manoj Thakkar manoj.thakkar@gmail.comwrote:

Hi All,

I am facing a weird issue , i am not sure whats wrong.

This is what i am trying to do ,

  • from all the chef slaves find slaves which has one particular role
    applied
  • run chef-client -o "recipe[xyz]" on those servers.

below is the command i run , The issue i face is the recipe gets applied
on randomly on some servers and does not do anything on the other servers
.... and this is random....

Is there anything i am missing here or anything i can do to enhance this.

knife ssh "role:billing-qa-machine" "chef-client -o recipe[$product]"
-x user -P password

Thanks
Manoj

You probably want to run “sudo chef-client “ unless you are logging in as root.

On Oct 16, 2013, at 7:02 PM, Manoj Thakkar manoj.thakkar@gmail.com wrote:

Hi Chefs,

Please advise on what is it i am doing wrong , or may be there is a better way to apply a recipe on multiple nodes.

Thanks
Manoj

On Wed, Oct 16, 2013 at 2:03 PM, Manoj Thakkar manoj.thakkar@gmail.com wrote:
Hi All,

I am facing a weird issue , i am not sure whats wrong.

This is what i am trying to do ,

  • from all the chef slaves find slaves which has one particular role applied
  • run chef-client -o "recipe[xyz]" on those servers.

below is the command i run , The issue i face is the recipe gets applied on randomly on some servers and does not do anything on the other servers .... and this is random....

Is there anything i am missing here or anything i can do to enhance this.

knife ssh "role:billing-qa-machine" "chef-client -o recipe[$product]" -x user -P password

Thanks
Manoj

Thanks Jesse,

the chef client works fine since i did a work around for this by changing
permission on /etc/chef, it runs and shows its working as expected in the
logs but somehow the recipe gets applied only on one

may be its the recipe,

Thanks
Manoj

On Wed, Oct 16, 2013 at 9:43 PM, Jesse Nelson spheromak@gmail.com wrote:

You probably want to run “sudo chef-client “ unless you are logging in
as root.

On Oct 16, 2013, at 7:02 PM, Manoj Thakkar manoj.thakkar@gmail.com
wrote:

Hi Chefs,

Please advise on what is it i am doing wrong , or may be there is a better
way to apply a recipe on multiple nodes.

Thanks
Manoj

On Wed, Oct 16, 2013 at 2:03 PM, Manoj Thakkar manoj.thakkar@gmail.comwrote:

Hi All,

I am facing a weird issue , i am not sure whats wrong.

This is what i am trying to do ,

  • from all the chef slaves find slaves which has one particular role
    applied
  • run chef-client -o "recipe[xyz]" on those servers.

below is the command i run , The issue i face is the recipe gets applied
on randomly on some servers and does not do anything on the other servers
.... and this is random....

Is there anything i am missing here or anything i can do to enhance this.

knife ssh "role:billing-qa-machine" "chef-client -o recipe[$product]"
-x user -P password

Thanks
Manoj