[chef] Re: Re: Simultaneous node edits


Chronological Thread 
  • From: Lamont Granquist < >
  • To:
  • Subject: [chef] Re: Re: Simultaneous node edits
  • Date: Wed, 01 Jul 2015 15:08:48 -0700


RFC #045 https://github.com/chef/chef-rfc/blob/master/rfc045-node_state_separation.md is the closest thing we have for plans for addressing node editing conflicts, but it still won't help you in the case of two admins doing a knife node edit.  It does address a lot of the use cases of #2.

#1 might be addressed better via something like a knife plugin the converted the task the admins were doing into something more similar to `knife node run_list add 'role[foo]'`.   by getting it onto the command line you narrow the race condition between reading the old value and writing the new value.  you could also make it even a bit more declarative/idempotent/convergent so that running it twice by two admins didn't result in duplicated edits (unlike knife node run_list add).

On 7/1/15 12:26 PM, Brian Hatfield wrote:
" type="cite">
We avoid it by abstaining: we don't do individual node edits, ever. The advantage of this is that nearly all of our chef server can be recreated by an upload and client resync, with the exception of the client keys.

On Wed, Jul 1, 2015 at 3:23 PM, Daniil S < " target="_blank"> > wrote:
Hello.

I'd like to know how people avoid collisions, while two simultaneous node edits take place. Some very common (and painful) examples from my practice:
1. Two sysadmins +/- simultaneously issue 'knife node edit' on the same node. First of them who save edits will lost them because of the save of the second admin;
2. Person for sure lost his edits if he try to 'knife node edit' while chef client runs on this node. And you can't predict it even if you are single person who can manage nodes because chef may run as a daemon or via cron.

I would we grateful for any advices or ideas.

--
Thanks in advance, Daniil.





Archive powered by MHonArc 2.6.16.

§