namespaces enhancements#1041
Open
cvaroqui wants to merge 25 commits into
Open
Conversation
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.
backward compat.
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.
The container will be removed automatically on start anyway, so the user does not need to fix.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.