Refresh instance status on IP address and mount changes#1059
Open
cvaroqui wants to merge 32 commits into
Open
Conversation
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.
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".
Example: om svc1 sync update daily
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.
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.
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.