Skip to content

Comments

Move the labels from node.Status to node.Config#983

Merged
cgalibern merged 6 commits intoopensvc:mainfrom
cvaroqui:main
Feb 20, 2026
Merged

Move the labels from node.Status to node.Config#983
cgalibern merged 6 commits intoopensvc:mainfrom
cvaroqui:main

Conversation

@cvaroqui
Copy link
Member

  • drop useless node.Node.Labels()
  • log san paths and labels changes
  • don't log icfg refreshs at info level (flooding logs)

* drop useless node.Node.Labels()
* log san paths and labels changes
* don't log icfg refreshs at info level (flooding logs)
* Add the hooks to node.Config
* Detect the hooks config change when decide to fire a
  NodeConfigUpdated event
* Move output.Flatten to flatten.Flatten as the data flattening
  is used for more than the output renderer (e.g. in logs)
* Rename node.Config.Equals to node.Config.Equal (aligned with
  Equal functions in the golang core)

Example:

	$ bin/om cluster config show --section hook#1
	[hook#1]
	events = HeartbeatAlive HeartbeatStale
	command = env | tee /tmp/hook1.txt

	$ bin/om daemon status -o flat | grep hook
	cluster.node.dev2n1.config.hooks[0].command[0] = "env"
	cluster.node.dev2n1.config.hooks[0].command[1] = "|"
	cluster.node.dev2n1.config.hooks[0].command[2] = "tee"
	cluster.node.dev2n1.config.hooks[0].command[3] = "/tmp/hook1.txt"
	cluster.node.dev2n1.config.hooks[0].events[0] = "HeartbeatAlive"
	cluster.node.dev2n1.config.hooks[0].events[1] = "HeartbeatStale"
	cluster.node.dev2n1.config.hooks[0].name = "1"

Changes are highlighted precisely in logs:

	11:26:49.257 INF daemon: hook: 1: +events[2]="NodeLabelsCommited"
	11:26:49.257 INF daemon: hook: 1: stop listening for events [HeartbeatAlive HeartbeatStale NodeLabelsCommited]
	11:26:50.054 INF daemon: hook: 1: listening for events [HeartbeatAlive HeartbeatStale]
The scheduler must avoid executing the CRM command when it
knows it will produce a max_parallel overflow logged as an
error.
Emit NodeConfigUpdated when the collector config changes.

Also make the collector daemon subsystem use node.Config.Collector
directly to prepare the requester, without having to allocate
a object.NewNode() ... the shared function are now all in the
core/collector package.
@cgalibern cgalibern merged commit 202fe90 into opensvc:main Feb 20, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants