Project

General

Profile

Actions

Architecture #9861

closed

Improve rudder→cfengine compliance by means of ordering for directive execution.

Added by Dmitry Svyatogorov almost 8 years ago. Updated 6 months ago.

Status:
Rejected
Priority:
N/A
Assignee:
-
Category:
Architecture - Code maintenance
Effort required:
Name check:
Fix check:
Regression:
No

Description

The key problem for me is that cfengine executes bundle methods in given order, while method actions (like package management) are executing by cfengine all together.
This leads to unpredictable execution order of promises generated for each distinct technique. * And awful racing between range of hooks inside all directives that are based on the same technique.
  • Just now I use dirty hack to implement order: clone "RudderTechnique"→"RudderTechnique_1", then sort directives content between regular technique and it's clone. Now the 2 directives can be linked into 2 alphabetically sorted rules.
  • Why it's important? For example, first package installs the new repository, then the next 99 packages come from new repo. With no order, about all are erred at first pass.
  • Another example is to change config-set for some service. Need restart on any change. But concurrent "restart" from relative hooks may lead to deadlock and zombies bearing!

What I propose? The cheap way is to introduce bundle tagging. E.g check_apt_package_installation divides in "check_apt_package_installation_tag1" "check_apt_package_installation_tag2" and so on.
This way needs minor changes: there can be used directive "Name" field in alpha-order for tagging, or reimplemented "Priority", or new field. Then rewrite .cf generator to loop through sorted tags, thus bundle for directive forks into N bundles ordered by tag. Profit.

Actions

Also available in: Atom PDF