Adding logging to keymanager and cluster store object create.#2422
Adding logging to keymanager and cluster store object create.#2422dperny merged 1 commit intomoby:masterfrom
Conversation
|
Please sign your commits following these rules: $ git clone -b "cleanups" git@github.com:anshulpundir/swarmkit.git somewhere
$ cd somewhere
$ git commit --amend -s --no-edit
$ git push -fAmending updates the existing PR. You DO NOT need to open a new one. |
b2709c9 to
4939b57
Compare
manager/manager.go
Outdated
| rootCA)) | ||
|
|
||
| if err != nil { | ||
| log.G(ctx).WithError(err).Errorf("Error creating cluster object") |
There was a problem hiding this comment.
let's make sure that this error contains the cluster id. Is there any other info we can log here?
There was a problem hiding this comment.
Which cluster id do you want to log ? The one that already exists ? A cluster object may not always exist.
Codecov Report
@@ Coverage Diff @@
## master #2422 +/- ##
==========================================
- Coverage 63.89% 60.56% -3.34%
==========================================
Files 64 128 +64
Lines 11788 26409 +14621
==========================================
+ Hits 7532 15994 +8462
- Misses 3649 9009 +5360
- Partials 607 1406 +799 |
manager/manager.go
Outdated
| unlockKeys, | ||
| rootCA)) | ||
|
|
||
| if err != nil { |
There was a problem hiding this comment.
Make this if err != nil && err != store.ErrExist.
On most leadership changes the object will already exist.
Signed-off-by: Anshul Pundir <anshul.pundir@docker.com>
4939b57 to
02e0c80
Compare
We recently saw an issue where the cluster object was not found in the store during keymanager init. Adding some minor debug info. Probably not super helpful, but suggestions welcome.
cc @nishanttotla
Signed-off-by: Anshul Pundir anshul.pundir@docker.com