Skip to content

namespaces enhancements#1041

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

namespaces enhancements#1041
cvaroqui wants to merge 25 commits into
opensvc:mainfrom
cvaroqui:main

Conversation

@cvaroqui

Copy link
Copy Markdown
Member

No description provided.

cvaroqui added 23 commits June 19, 2026 11:02
nscfg object control the namespace-level cgroup.

Example:

	# om test/ pg update
	12:55:09.161 INF test/nscfg/namespace: applied pg /opensvc.slice/opensvc-ns.test.slice: cpus=1
This boot action calls a "pg update" to setup the namespace
cgroup tunables.
We want only one nscfg object per-namespace, so we can simplify
the string representation to a simple "nsname/".

This was already the case in v2.1, and the v3 parser already
understood this format.

Add a do test.
To avoid stacking on schedule listing.
Parent those in <var>/namespace/<ns>/nscfg/namespace/, ie. use the
FQN <ns>/nscfg/namespace representation, not the canonical <ns>/
representation produced by path.String().
nscfg /etc/opensvc/namespaces/ns1/namespace.conf was incorrectly
parsed as a ns1-kind object.
And parse the /etc/opensvc/namespace.conf as a the nscfg instead
of the svc named "namespace".

Add go test to verify these rules.
The `om */nscfg/* pg update` this not match any object,
because objectselector calls naming.InstalledPaths(),
which does not have the new nscfg rules.

Call the new ConfigFilePath() func to avoid duplicating the
complex lookup algo.
Support the pg update action without the full blown actor
interface.

Remove the dummy Schedules() and Boot() implementation.

Also add a xerror for "instance action not supported" (4).

Example:

	# om system/usr/* pg update
	Error: system/usr/relay: instance action not supported
	system/usr/cga: instance action not supported
	system/usr/cva: instance action not supported

	# echo $?
	4
* Allocate only one pg Mgr for the process.
  actioncontext.WithProps() did not verify that a Mgr already
  exists.

* Name "register{Namespace,Object,Resourceset}PG" functions
  functions to be clear about the role, unlike the previous
  name (updatePG) that did not reflect the deferred nature of
  the update.

* Register the Object-level pg in actor.action()

* Rename CleanPG to PGClean, so we end up with a coherent funcset:
  PGConfig, PGUpdate, PGClean

* Split core.pgAnonConfig() out of core.pgConfig() to factorize
  the pg_* keyword loading between core.pgConfig and nscfg.PGConfig

* Add a plog logger to pg.Config so we can log the changes when
  they are applied deferred.

* Remove ApplyNoProc, now unused.

* Don't log the creation of already existing pg when we have no
  settings to apply there.
Resource can run in parallel, so the Mgr needs serialization
of Clean, Register and ApplyConfigs functions.
And support --rid value autocompletion.
* Remove unused listRIDs func
* Use the GET /api/cluster/status handler to fetch the
  instance.Status where the rids must be looked up.
And remove the HiddenFlagsResourceSelector unused func.
cvaroqui added 2 commits June 19, 2026 17:14
The container will be removed automatically on start anyway, so
the user does not need to fix.
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