Optimize keyword handling and driver manifest caching#989
Open
cvaroqui wants to merge 9 commits intoopensvc:mainfrom
Open
Optimize keyword handling and driver manifest caching#989cvaroqui wants to merge 9 commits intoopensvc:mainfrom
cvaroqui wants to merge 9 commits intoopensvc:mainfrom
Conversation
The keyword.Keyword struct is big and complex (contains list of types, ...) so using the concrete type in func prototypes caused lots of allocations and resulted in partial copies. Use pointers to stop copying, as kw definition are immutable anyway. Save cpu time.
* Cache the manifests to avoid rebuilding the kw lists * Add a DriverID() driver.ID func to the resource.Driver intf * Use DriverID() as the manifest cache key * Use directly DriverID() instead of Manifest().DriverID() in a lot of codepaths (lighter, lockless response)
Triggered by a corner case where topology is flex but object.Status.Flex is nil.
Which blocked the CI on: Go build and test: drivers/resappforking/main_test.go#L242 method T.DriverID already declared at drivers/resappforking/manifest.go:35:13
The "lxc info <name>" command exits when no error and empty output when the container is down and defined. The abort routine did not test the output length so reported the container up on peer when actually not.
Encap nodes don't orchestrate ha start, so no need to freeze.
Actions with a --rid, --tag, --subset, --to resource selector ended up with a wrong dispatch ... the encap node trying to execute the action on a non-relevant rid. Fix, no longer pass --rid, --tag, subset and --to unchanged to the encap node, but use only --rid <selected encap resources> whatever the flags used to do this selection. With app#h3 a non-encap resource, * Before: $ om c13lxc1 instance start --rid app#h3 14:38:39.588 INF c13lxc1: >>> do start [/tmp/om2 c13lxc1 instance start --rid app#h3] (origin user, sid 1e412b62-2d78-447f-8143-93f6458fd628) 14:38:39.809 INF c13lxc1: /usr/bin/lxc-attach -n c13lxc1 -P /srv/opensvc/containers/c13lxc1.root.vol/base --clear-env -v OSVC_SESSION_ID=1e412b62-2d78-447f-8143-93f6458fd628 -v OSVC_ACTION_ORIGIN=user -- /usr/bin/om c13lxc1 instance start --rid app#h3 14:38:39.860 ERR c13lxc1: container#1: exit status 1 14:38:40.247 INF c13lxc1: <<< done start [/tmp/om2 c13lxc1 instance start --rid app#h3] in 659.243843ms, instance status is now up, with warnings Error: c13lxc1: container#1: exit status 1 * After: $ om c13lxc1 instance start --rid app#h3 14:38:33.694 INF c13lxc1: >>> do start [/tmp/om c13lxc1 instance start --rid app#h3] (origin user, sid 524d98df-11a8-47eb-ac6c-39c784da6c1c) 14:38:33.889 INF c13lxc1: app#h3: already up 14:38:34.265 INF c13lxc1: <<< done start [/tmp/om c13lxc1 instance start --rid app#h3] in 570.61042ms, instance status is now up, with warnings
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.