Skip to content

Refresh instance status on IP address and mount changes#1059

Open
cvaroqui wants to merge 32 commits into
opensvc:mainfrom
cvaroqui:main
Open

Refresh instance status on IP address and mount changes#1059
cvaroqui wants to merge 32 commits into
opensvc:mainfrom
cvaroqui:main

Conversation

@cvaroqui

@cvaroqui cvaroqui commented Jul 1, 2026

Copy link
Copy Markdown
Member

No description provided.

cvaroqui added 14 commits July 6, 2026 09:01
Now that the daemon bus routes NetIPAddrDeleted and NetIPAddrAdded
events (sent by netmon on netlink events), make imon trigger a
instance status refresh if the instance has the ipaddr in one
of its resource info.
To relay mount/umount/remount events on the daemon bus.
Subscribe imon to FS* events, add a "mnt" (and "dev" for future
use) resource status info in a drivers handling mounts, lookup
the changed mount in the instance status infos, on match queue
status refresh.
which transforms this unexpected error, rendered to optimize troubleshooting:

	# om foooo ed
	Error: local (fallback caused by: unexpected get objects selector status 500 Internal Server Error) expand object selection: object not found

into this expected, more readable:

	# om foooo ed
	Error: foooo: object not found
With:

	$ om cvi1 config show --section labels
	[labels]
	com.acme.foo1 = bar
	com.acme.foo2 = baz

instance.Config now exposes:

	# om cvi1 instance status -o json
	[
	    {
		"path": "cvi1",
		"config": {
		    "labels": {
			"com.acme.foo1": "bar",
			"com.acme.foo2": "baz"
		    },
	...

and the keyop selector works:

	$ om labels.com.acme.foo1=bar ls
	cvi1
Instead of [500] Internal Server Error.

Example:

	# om testdrbd config eval --kw app#1.starte
	Error: testdrbd: [400] EvalAs: keyword does not exist: "app#1.starte"
This behaviour is not expected:

	# om idontexist eval --kw orchestrate --ignore-not-found
	Error: prout: object not found

Fix to implement this behaviour:

	# bin/om idontexist eval --kw orchestrate --ignore-not-found
	# echo $?
	0
"make help" prints this message:

	Available targets:
	  api            - Generate the api code from api.yaml
	  build          - Build om and ox
	  compobj        - Build the compliance modules pack
	  dist           - Build, strip binaries and make a tarball
	  om             - Build om
	  ox             - Build ox
	  install        - Install o[mx] to /usr/bin
	  restart        - Restart the daemon
	  deploy         - Install and restart on all nodes
	  clean          - Clean build artifacts
	  deps           - Update dependencies
	  test           - Run tests
	  test-cover     - Run tests with coverage
	  vet            - Run go static analyzer
	  version        - Update the version string from git status

	Available -race targets:
	  build-race     - Build om and ox if race-free
	  compobj-race   - Build the compliance modules pack if race-free
	  om-race        - Build om if race-free
	  ox-race        - Build ox if race-free
	  test-race      - Run tests with race detection
And fix a formatting bug in the "config validate" COMMENT.
The math and boundary conditions are all wrong.
Use --node to show a multi-node dataset, instead of
multi-node by default. The ox command will stay multi-node by
default, as we don't know which node to focus on if not
explicited by the user.
In this case the status refresh will happen at the end of the
action already.
cvaroqui added 13 commits July 6, 2026 14:59
To "resource info list|push".

We already have the "resource list" command in the "resource"
command tree, and every resource action is clearly node-scoped.
As a synomym for "om svc1 container enter --rid container#zzz".

The late syntax being longer to type and stuttering, it was
getting annoying.
As a synomym for "om svc1 container logs --rid container#zzz".

The late syntax being longer to type and stuttering, it was
getting annoying.
As a synomym of "om <svc> resource ls --rid container".
As a synomym of "om svc resource ls --rid task".
As a synonym of "om svc instance run --rid task#<id>".
As a synonym of "om svc resource ls --rid sync".
So the start_timeout does not appear as applicable to a resource
which driver does actually not support it.
* om <sel> container|ip|fs|disk|volume|share start|stop|restart|provision|unprovision
* om <sel> app start|stop|restart
Example:

	Resource Groups:
	  app          list, action app resources
	  container    list, action container resources, enter, stream logs
	  disk         list, action disk resources
	  fs           list, action fs resources
	  ip           list, action ip resources
	  share        list, action share resources
	  sync         list, action sync resources
	  task         list, run tasks
	  volume       list, action volume resources
Make sure "om svc* <res-group> <action>" (without the positional
parameter) works only on <res-group>, instead of all resources.

Add the res-groups actions to the "all" command subtree.
svcconf must import the driver packages so they can register
their keywords.

Restricting the core keyword "stop_timeout" to the DEFAULT
section made this latent issue appear, because the kw lookup
failed even if the "stop_timeout" is actually in the
container drivers manifest.
cvaroqui added 5 commits July 8, 2026 11:18
And more actions in the per res-group commandsets: prstart,
prstop, shutdown, startstandby.
* global flags
* per-kind cobra command factory funcs
Continue the work of commit d396c67 by adding the missing NewCmdNscfg()
function to commoncmd/factory_kind.go and updating both om and ox
kind_nscfg.go files to use it.
Continue the work of previous commits by adding more command factory functions:
- NewCmdNetwork, NewCmdNetworkIP
- NewCmdPool, NewCmdPoolVolume
- NewCmdNodeCapabilities, NewCmdNodeCompliance
- NewCmdNodeCollector, NewCmdNodeCollectorTag
- NewCmdNodeSCSI
- NewCmdNodeRelay
- NewCmdNodeSSH

These are top-level and subsystem commands that have identical definitions
in both om and ox packages.
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.

1 participant