How to add several roles/recipes in an existing node?

How can I add list of roles/recipes via knife in the nodes run list?

When I add multiple roles, the resulting run list for that node is weird.

knife node run_list add i-4f55fb2b 'role[base],role[app_database_master],role[app_ror],role[app_ror_run_migrations]'

run_list: 
    recipe[recipe[recipe[recipe[role[base],role[wecove_database_master],role[app_ror],role[app_ror_run_migrations]]]]
    recipe[role[base],role[app_database_master],role[app_ror],role[app_ror_run_migrations]]

In the help knife node run_list -h, there is bulk delete but not bulk add.

Is there any work-around for this?


@millisami
~ Sachin Sagar Rai
Ruby on Rails Developer
http://tfm.com.np
http://nepalonrails.tumblr.com
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)

Try separating roles with double quotes: "role[blah]","role[moo]"

On Mar 8, 2012, at 2:42 PM, Sachin Sagar Rai wrote:

How can I add list of roles/recipes via knife in the nodes run list?

When I add multiple roles, the resulting run list for that node is weird.

knife node run_list add i-4f55fb2b 'role[base],role[app_database_master],role[app_ror],role[app_ror_run_migrations]'

run_list: 
    recipe[recipe[recipe[recipe[role[base],role[wecove_database_master],role[app_ror],role[app_ror_run_migrations]]]]
    recipe[role[base],role[app_database_master],role[app_ror],role[app_ror_run_migrations]]

In the help knife node run_list -h, there is bulk delete but not bulk add.

Is there any work-around for this?


@millisami
~ Sachin Sagar Rai
Ruby on Rails Developer
http://tfm.com.np
http://nepalonrails.tumblr.com
Sent with Sparrow

On Thu, Mar 8, 2012 at 9:44 AM, Jamie van Dyke jamie@fearoffish.com wrote:

recipe[recipe[recipe[recipe[role[base],role[wecove_database_master],role[app_ror],role[app_ror_run_migrations]]]]

This result is a bug http://tickets.opscode.com/browse/CHEF-1398

Bryan

@Jamie
That doesn't work too.
There is a bug as @Bryan said.


@millisami
~ Sachin Sagar Rai
Ruby on Rails Developer
http://tfm.com.np
http://nepalonrails.tumblr.com
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)

On Thursday, March 8, 2012 at 8:29 PM, Jamie van Dyke wrote:

Try separating roles with double quotes: "role[blah]","role[moo]"

On Mar 8, 2012, at 2:42 PM, Sachin Sagar Rai wrote:

How can I add list of roles/recipes via knife in the nodes run list?

When I add multiple roles, the resulting run list for that node is weird.

knife node run_list add i-4f55fb2b 'role[base],role[app_database_master],role[app_ror],role[app_ror_run_migrations]'

run_list: 
    recipe[recipe[recipe[recipe[role[base],role[wecove_database_master],role[app_ror],role[app_ror_run_migrations]]]]
    recipe[role[base],role[app_database_master],role[app_ror],role[app_ror_run_migrations]]

In the help knife node run_list -h, there is bulk delete but not bulk add.

Is there any work-around for this?


@millisami
~ Sachin Sagar Rai
Ruby on Rails Developer
http://tfm.com.np (http://tfm.com.np/)
http://nepalonrails.tumblr.com (http://nepalonrails.tumblr.com/)
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)

On Mar 8, 2012, at 8:42 AM, Sachin Sagar Rai wrote:

When I add multiple roles, the resulting run list for that node is weird.

knife node run_list add i-4f55fb2b 'role[base],role[app_database_master],role[app_ror],role[app_ror_run_migrations]'

Yeah, we ran into that bug, too. At this stage, I either add multiple roles as part of a "knife node edit" process, or I have to do multiple commands -- one for each additional role.

This one is a real PITA until you figure out what is going on and what the work-arounds are.

--
Brad Knowles bknowles@ihiji.com
SAGE Level IV, Chef Level 0.0.1

On Thu, Mar 8, 2012 at 10:00 AM, Sachin Sagar Rai millisami@gmail.com wrote:

@Jamie
That doesn't work too.
There is a bug as @Bryan said.

Looking at the code, this may be a new feature needed as it is built
around an "entry" being provided, not a list of entries. The format
for providing a list of run list items has always been particularly
varying across knife plugins (knife bootstrap versus knife ec2 server
create). I suppose we need a mixin for parsing these and to start
using it everywhere.

Bryan

On Mar 8, 2012, at 9:34 AM, Bryan McLellan wrote:

I suppose we need a mixin for parsing these and to start
using it everywhere.

Code re-use FTW! Thanks, Bryan!

--
Brad Knowles bknowles@ihiji.com
SAGE Level IV, Chef Level 0.0.1

On Thu, Mar 8, 2012 at 10:34 AM, Bryan McLellan btm@loftninjas.org wrote:

I suppose we need a mixin for parsing these and to start using it everywhere.

I've created CHEF-2968 for this if anyone wants to take a stab at it.

http://tickets.opscode.com/browse/CHEF-2968

Bryan

On Thu, Mar 8, 2012 at 3:50 PM, Bryan McLellan btm@loftninjas.org wrote:

On Thu, Mar 8, 2012 at 10:34 AM, Bryan McLellan btm@loftninjas.org wrote:

I suppose we need a mixin for parsing these and to start using it everywhere.

I've created CHEF-2968 for this if anyone wants to take a stab at it.

http://tickets.opscode.com/browse/CHEF-2968

Hi, this was annoying me too so I decided to give it a try. I've just
sent a pull-request to the ticket that mey fix this.

If you think it is necessary anything else to finish the ticket, tell
me, I'm up fo it.

Thanks

--
Juanje

2012/3/8 Juan Jesús Ojeda Croissier juanje.ojeda@gmail.com:

On Thu, Mar 8, 2012 at 3:50 PM, Bryan McLellan btm@loftninjas.org wrote:

On Thu, Mar 8, 2012 at 10:34 AM, Bryan McLellan btm@loftninjas.org wrote:

I suppose we need a mixin for parsing these and to start using it everywhere.

I've created CHEF-2968 for this if anyone wants to take a stab at it.

http://tickets.opscode.com/browse/CHEF-2968

Hi, this was annoying me too so I decided to give it a try. I've just
sent a pull-request to the ticket that mey fix this.

If you think it is necessary anything else to finish the ticket, tell
me, I'm up fo it.

Hi,

I pull-requested my solution to this bug and I put it as resolved, as
well as this other one which is very related:
http://tickets.opscode.com/browse/CHEF-1398

Could some one test it and give some feedback? I love to see those
bugs closed, are quite annoying when you use knife...

Thanks :slight_smile:

--
Juanje

You just forget to assign ticket to project lead. I id it now so it will be
reviewed by Opscode team later.

2012/3/13 Juan Jesús Ojeda Croissier juanje.ojeda@gmail.com

2012/3/8 Juan Jesús Ojeda Croissier juanje.ojeda@gmail.com:

On Thu, Mar 8, 2012 at 3:50 PM, Bryan McLellan btm@loftninjas.org
wrote:

On Thu, Mar 8, 2012 at 10:34 AM, Bryan McLellan btm@loftninjas.org
wrote:

I suppose we need a mixin for parsing these and to start using it
everywhere.

I've created CHEF-2968 for this if anyone wants to take a stab at it.

http://tickets.opscode.com/browse/CHEF-2968

Hi, this was annoying me too so I decided to give it a try. I've just
sent a pull-request to the ticket that mey fix this.

If you think it is necessary anything else to finish the ticket, tell
me, I'm up fo it.

Hi,

I pull-requested my solution to this bug and I put it as resolved, as
well as this other one which is very related:
http://tickets.opscode.com/browse/CHEF-1398

Could some one test it and give some feedback? I love to see those
bugs closed, are quite annoying when you use knife...

Thanks :slight_smile:

--
Juanje

Oh, thanks, I didn't know to whom assign the ticket or if I have to do it.
Thanks :slight_smile:

On Tue, Mar 13, 2012 at 11:35 AM, Akzhan Abdulin
akzhan.abdulin@gmail.com wrote:

You just forget to assign ticket to project lead. I id it now so it will be
reviewed by Opscode team later.

2012/3/13 Juan Jesús Ojeda Croissier juanje.ojeda@gmail.com

2012/3/8 Juan Jesús Ojeda Croissier juanje.ojeda@gmail.com:

On Thu, Mar 8, 2012 at 3:50 PM, Bryan McLellan btm@loftninjas.org
wrote:

On Thu, Mar 8, 2012 at 10:34 AM, Bryan McLellan btm@loftninjas.org
wrote:

I suppose we need a mixin for parsing these and to start using it
everywhere.

I've created CHEF-2968 for this if anyone wants to take a stab at it.

http://tickets.opscode.com/browse/CHEF-2968

Hi, this was annoying me too so I decided to give it a try. I've just
sent a pull-request to the ticket that mey fix this.

If you think it is necessary anything else to finish the ticket, tell
me, I'm up fo it.

Hi,

I pull-requested my solution to this bug and I put it as resolved, as
well as this other one which is very related:
http://tickets.opscode.com/browse/CHEF-1398

Could some one test it and give some feedback? I love to see those
bugs closed, are quite annoying when you use knife...

Thanks :slight_smile:

--
Juanje

--
Juanje