Is there a way to get a mutual exception in a node chef?

For example, if a process updates a node while the chef client is running, the chef-client will overwrite the node data:

  • chef-client receives node data (state 1)
  • Process A receives node data (state 1)
  • Process A locally updates node data (state 2)
  • This process saves node data (state 2)
  • chef-client updates locally node data (2 * state)
  • chef-client stores node data, and this node data does not contain changes in process A (state 2). The chef is overwriting the node data. (state 2 *)

The same thing happens if we have two processes storing node data at the same moment.

EDIT

We need an external modification, because we have a good Chef server user interface for remote management of many computers shown as a tree (similar to LDAP). The administrator can update the value of recipes from here. This project is OpenSource: https://github.com/gecos-team/

Although we had a semaphore system, we found that if we have two or more simultaneous queries, we might have a match problem:

EDIT 2

I have added a document with a lot of information about our problem.

+4
source share
5 answers

- , . , node chef-client ( , - ), .

, .

- node chef-, node / .

Consul.io / . - LWRP, consul (http, DNS,...).

push-job chef-client (IMHO , push jobs "-", ACL/ Chefs), . , node script.

Chef , , .

+2

, , :

  • , ,
  • //,
    • node DLM 1.
      • , .
    • ( ) .
  • , , , , .
  • !!! , Chef Run , , , , .

( ), api ( - 12, 25 , )

node ( URL- - /, 11.16 backport)

node , node .

+3

- node node -.

, Chef node node . , , , .

+3

, node . -: -)

, node. - -. , node , , , , .

+2
source

If you want to disable dependency on another external service, perhaps you can use some slicing time.

Roughly: nodes only run the chef client for odd minutes. Api updates the chef’s data even within minutes (distribute these even minutes if you have a longer queue).

0
source

Source: https://habr.com/ru/post/1613682/


All Articles