From 2af8b32d31477e3533763cafb8455df70bc5cb2f Mon Sep 17 00:00:00 2001 From: alena Date: Thu, 31 Mar 2011 15:19:51 -0700 Subject: [PATCH] bug 9245: save ownerAccountId (instead of callerAccountId) to account_id field in async_job table. We already save caller info to user_id field status 9245: resolved fixed --- server/src/com/cloud/api/ApiServer.java | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/server/src/com/cloud/api/ApiServer.java b/server/src/com/cloud/api/ApiServer.java index 52ed597c4c8..f8ce0a295f1 100755 --- a/server/src/com/cloud/api/ApiServer.java +++ b/server/src/com/cloud/api/ApiServer.java @@ -408,14 +408,8 @@ public class ApiServer implements HttpRequestHandler { job.setInstanceId((objectId == null) ? asyncCmd.getInstanceId() : objectId); job.setInstanceType(asyncCmd.getInstanceType()); job.setUserId(userId); - if (account != null) { - job.setAccountId(ctx.getCaller().getId()); - } else { - // Just have SYSTEM own the job for now. Users won't be able to see this job, - // but in an admin case (like domain admin) they won't be able to see it anyway - // so no loss of service. - job.setAccountId(1L); - } + job.setAccountId(asyncCmd.getEntityOwnerId()); + job.setCmd(cmdObj.getClass().getName()); job.setCmdInfo(ApiGsonHelper.getBuilder().create().toJson(params));