logging: Add sandbox CLI option#90
Conversation
|
Note: the
Alternatively, I could raise a runtime PR to pass the option now and we could land them together. I don't mind either way - thoughts @sboeuf, @bergwolf, @grahamwhaley? |
|
I thought we might add it as an optinal (that is, not mandatory) in order to not break backwards compatibility. We could then make it mandatory later once all versions support it and have filtered through and/or been deprecated. |
|
As it is used in logs only, I think optional is enough. |
|
Thanks guys. The option is currently optional so this should work for us ;) I'll raise a runtime PR to add the option when starting the kata proxy and block on this PR landing... |
|
Build failed (third-party-check pipeline) integration testing with
|
Codecov Report
@@ Coverage Diff @@
## master #90 +/- ##
==========================================
- Coverage 34.63% 34.16% -0.47%
==========================================
Files 2 2
Lines 231 240 +9
==========================================
+ Hits 80 82 +2
- Misses 141 148 +7
Partials 10 10
Continue to review full report at Codecov.
|
proxy.go
Outdated
| "name": proxyName, | ||
| "pid": os.Getpid(), | ||
| "source": "proxy", | ||
| "sandbox": sandboxID, |
There was a problem hiding this comment.
since sandboxID is optional, I think you should add it only if it's not empty, right?
There was a problem hiding this comment.
I guess that's fair :) Branch updated.
990aa7a to
6de5cad
Compare
|
Build failed (third-party-check pipeline) integration testing with
|
|
Hi @raravena80 - amusing problem - Travis is failing over here, but only for osx: The |
|
lgtm |
The version of bash provided by OSX under Travis is too old to support `typeset -A`, so install a newer version using homebrew. Signed-off-by: James O. D. Hunt <[email protected]>
For parity with other system components, Change the initial log message to show the standard "announce" message tag along with fields for each of the command-line options. Signed-off-by: James O. D. Hunt <[email protected]>
6de5cad to
fc4c79e
Compare
|
@raravena80 - I think I've fixed it by installing bash using homebrew. |
|
Build failed (third-party-check pipeline) integration testing with
|
|
@jodh-intel are you planning to add some unit tests here ? If not, let me know and I'll merge it! |
fc4c79e to
e5f334c
Compare
|
Tests added! ;) |
Added a new `-sandbox` command-line option. This is not required by the proxy itself, but is used to add a `sandbox` log field to make log analysis easier. Fixes kata-containers#87. Signed-off-by: James O. D. Hunt <[email protected]>
e5f334c to
1672418
Compare
|
Build failed (third-party-check pipeline) integration testing with
|
|
@jodh-intel good to hear. It would be interesting to find out what version of bash travis is using. This is what's on my laptop for High Sierra: |
|
@raravena80 - I don't think the version was logged but bash 4 added associative arrays ( |
Added a new
-sandboxcommand-line option. This is not required by theproxy itself, but is used to add a
sandboxlog field to make loganalysis easier.
Also changed the initial log message to show the standard "announce" message tag along with fields for each of the command-line options.
Fixes #87.
Signed-off-by: James O. D. Hunt [email protected]