You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "sumitagrawl (via GitHub)" <gi...@apache.org> on 2024/07/17 07:26:18 UTC
[PR] HDDS-11194. OM missing audit log for upgrade [ozone]
sumitagrawl opened a new pull request, #6958:
URL: https://github.com/apache/ozone/pull/6958
## What changes were proposed in this pull request?
Audit log is added for upgrade prepare, cancel and finalize as this was missing. Since this is user request, this also needs logged.
## What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-11194
## How was this patch tested?
- added testcase for audit log generation
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-11194. OM missing audit log for upgrade prepare, cancel and finalize [ozone]
Posted by "sumitagrawl (via GitHub)" <gi...@apache.org>.
sumitagrawl commented on code in PR #6958:
URL: https://github.com/apache/ozone/pull/6958#discussion_r1682107025
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/upgrade/OMCancelPrepareRequest.java:
##########
@@ -82,12 +89,15 @@ public OMClientResponse validateAndUpdateCache(OzoneManager ozoneManager, TermIn
LOG.info("OM {} prepare state cancelled at log {}. Returning response {}",
ozoneManager.getOMNodeId(), termIndex, omResponse);
} catch (IOException e) {
+ exception = e;
LOG.error("Cancel Prepare Request apply failed in {}. ",
ozoneManager.getOMNodeId(), e);
response = new OMPrepareResponse(
createErrorOMResponse(responseBuilder, e));
}
+ auditLog(auditLogger, buildAuditMessage(OMAction.UPGRADE_CANCEL,
+ new HashMap<>(), exception, userInfo));
Review Comment:
TermIndex will be handled as part of "HDDS-10658. Add Object ID and Update ID to OM audit log messages" when this is merged.
OMNodeId is not required as audit-log is per node itself. There is no need for same.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-11194. OM missing audit log for upgrade prepare, cancel and finalize [ozone]
Posted by "sumitagrawl (via GitHub)" <gi...@apache.org>.
sumitagrawl commented on code in PR #6958:
URL: https://github.com/apache/ozone/pull/6958#discussion_r1682107226
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/upgrade/OMFinalizeUpgradeRequest.java:
##########
@@ -103,10 +110,13 @@ public OMClientResponse validateAndUpdateCache(OzoneManager ozoneManager, TermIn
ozoneManager.getVersionManager().getMetadataLayoutVersion());
LOG.trace("Returning response: {}", response);
} catch (IOException e) {
+ exception = e;
response = new OMFinalizeUpgradeResponse(
createErrorOMResponse(responseBuilder, e), -1);
}
+ auditLog(auditLogger, buildAuditMessage(OMAction.UPGRADE_FINALIZE,
+ new HashMap<>(), exception, userInfo));
Review Comment:
TermIndex will be handled as part of "[HDDS-10658](https://issues.apache.org/jira/browse/HDDS-10658). Add Object ID and Update ID to OM audit log messages" when this is merged.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-11194. OM missing audit log for upgrade [ozone]
Posted by "devmadhuu (via GitHub)" <gi...@apache.org>.
devmadhuu commented on code in PR #6958:
URL: https://github.com/apache/ozone/pull/6958#discussion_r1680658184
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/upgrade/OMPrepareRequest.java:
##########
@@ -149,6 +157,8 @@ public OMClientResponse validateAndUpdateCache(OzoneManager ozoneManager, TermIn
}
}
+ auditLog(auditLogger, buildAuditMessage(OMAction.UPGRADE_PREPARE,
Review Comment:
Can we add `transactionLogIndex` and `OMNodeId` in auditMap as an additional info for audit message ?
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/upgrade/OMFinalizeUpgradeRequest.java:
##########
@@ -103,10 +110,13 @@ public OMClientResponse validateAndUpdateCache(OzoneManager ozoneManager, TermIn
ozoneManager.getVersionManager().getMetadataLayoutVersion());
LOG.trace("Returning response: {}", response);
} catch (IOException e) {
+ exception = e;
response = new OMFinalizeUpgradeResponse(
createErrorOMResponse(responseBuilder, e), -1);
}
+ auditLog(auditLogger, buildAuditMessage(OMAction.UPGRADE_FINALIZE,
+ new HashMap<>(), exception, userInfo));
Review Comment:
Can we add `termIndex` in auditMap as an additional info for audit message ?
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/upgrade/OMCancelPrepareRequest.java:
##########
@@ -82,12 +89,15 @@ public OMClientResponse validateAndUpdateCache(OzoneManager ozoneManager, TermIn
LOG.info("OM {} prepare state cancelled at log {}. Returning response {}",
ozoneManager.getOMNodeId(), termIndex, omResponse);
} catch (IOException e) {
+ exception = e;
LOG.error("Cancel Prepare Request apply failed in {}. ",
ozoneManager.getOMNodeId(), e);
response = new OMPrepareResponse(
createErrorOMResponse(responseBuilder, e));
}
+ auditLog(auditLogger, buildAuditMessage(OMAction.UPGRADE_CANCEL,
+ new HashMap<>(), exception, userInfo));
Review Comment:
Can we add `OMNodeId` and `termIndex` in `auditMap` as an additional info for audit message ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-11194. OM missing audit log for upgrade prepare, cancel and finalize [ozone]
Posted by "devmadhuu (via GitHub)" <gi...@apache.org>.
devmadhuu merged PR #6958:
URL: https://github.com/apache/ozone/pull/6958
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-11194. OM missing audit log for upgrade prepare, cancel and finalize [ozone]
Posted by "sumitagrawl (via GitHub)" <gi...@apache.org>.
sumitagrawl commented on code in PR #6958:
URL: https://github.com/apache/ozone/pull/6958#discussion_r1682107634
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/upgrade/OMPrepareRequest.java:
##########
@@ -149,6 +157,8 @@ public OMClientResponse validateAndUpdateCache(OzoneManager ozoneManager, TermIn
}
}
+ auditLog(auditLogger, buildAuditMessage(OMAction.UPGRADE_PREPARE,
Review Comment:
TermIndex will be handled as part of "[HDDS-10658](https://issues.apache.org/jira/browse/HDDS-10658). Add Object ID and Update ID to OM audit log messages" when this is merged implicitly.
OMNodeId is not required as audit-log is per node itself. There is no need for same.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-11194. OM missing audit log for upgrade prepare, cancel and finalize [ozone]
Posted by "devmadhuu (via GitHub)" <gi...@apache.org>.
devmadhuu commented on PR #6958:
URL: https://github.com/apache/ozone/pull/6958#issuecomment-2236327928
Thanks @sumitagrawl for the patch.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org