Merge pull request #10795 from ioito/automated-cherry-pick-of-#10793-upstream-release-3.7

Automated cherry pick of #10793: avoid log loss when token expired fix #10738
This commit is contained in:
Zexi Li
2021-04-19 11:26:24 +08:00
committed by GitHub
+1 -1
View File
@@ -161,7 +161,7 @@ func addLog(model IObject, action string, iNotes interface{}, userCred mcclient.
logentry.Add(jsonutils.NewString(notes), "notes")
logclientWorkerMan.Run(func() {
s := DefaultSessionGenerator(context.Background(), userCred, "", "")
s := DefaultSessionGenerator(context.Background(), auth.AdminCredential(), "", "")
_, err := api.Create(s, logentry)
if err != nil {
log.Errorf("create action log %s failed %s", logentry, err)