[
https://issues.apache.org/jira/browse/HDDS-7345?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17627349#comment-17627349
]
Hemant Kumar commented on HDDS-7345:
------------------------------------
**Shell case:
***Success scenario: Console log gets printed when verbose is passed in the
request otherwise there is no response.
****Without verbose:
```
bash-4.2$ ozone sh snapshot create vol1/bucket1 snap3
```
****With verbose:
```
bash-4.2$ ozone sh --verbose snapshot create vol1/bucket1 #snap3
Volume Name : vol1
Bucket Name : bucket1
created snapshot 'vol1/bucket1 s20221101-214136.659'.
```
***Failure scenario:
****Without verbose: Console log prints with ResultCode and exception message.
```
bash-4.2$ ozone sh snapshot create vol1/bucket1 snap3
FILE_ALREADY_EXISTS Snapshot already exists
```
****With verbose: Console log prints with ResultCode and exception stack trace.
```
bash-4.2$ ozone sh --verbose snapshot create vol1/bucket1 snap3
Volume Name : vol1
Bucket Name : bucket1
FILE_ALREADY_EXISTS org.apache.hadoop.ozone.om.exceptions.OMException: Snapshot
already exists
at
org.apache.hadoop.ozone.om.protocolPB.OzoneManagerProtocolClientSideTranslatorPB.handleError(OzoneManagerProtocolClientSideTranslatorPB.java:700)
at
org.apache.hadoop.ozone.om.protocolPB.OzoneManagerProtocolClientSideTranslatorPB.createSnapshot(OzoneManagerProtocolClientSideTranslatorPB.java:1113)
at
org.apache.hadoop.ozone.client.rpc.RpcClient.createSnapshot(RpcClient.java:930)
at
org.apache.hadoop.ozone.client.ObjectStore.createSnapshot(ObjectStore.java:548)
at
org.apache.hadoop.ozone.shell.snapshot.CreateSnapshotHandler.execute(CreateSnapshotHandler.java:57)
at org.apache.hadoop.ozone.shell.Handler.call(Handler.java:98)
at org.apache.hadoop.ozone.shell.Handler.call(Handler.java:44)
at picocli.CommandLine.executeUserObject(CommandLine.java:1953)
at picocli.CommandLine.access$1300(CommandLine.java:145)
at
picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2352)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2346)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2311)
at
picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179)
at picocli.CommandLine.execute(CommandLine.java:2078)
at org.apache.hadoop.hdds.cli.GenericCli.execute(GenericCli.java:100)
at
org.apache.hadoop.ozone.shell.OzoneShell.lambda$execute$0(OzoneShell.java:54)
at
org.apache.hadoop.hdds.tracing.TracingUtil.executeInNewSpan(TracingUtil.java:162)
at org.apache.hadoop.ozone.shell.OzoneShell.execute(OzoneShell.java:53)
at org.apache.hadoop.hdds.cli.GenericCli.run(GenericCli.java:91)
at org.apache.hadoop.ozone.shell.OzoneShell.main(OzoneShell.java:47)
```
**Application logs:
Success and failure logs get added to application log:
https://github.com/apache/ozone/blob/HDDS-6517-Snapshot/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/snapshot/OMSnapshotCreateRequest.java#L166,L170
> [snapshot] No log message on create snapshot
> --------------------------------------------
>
> Key: HDDS-7345
> URL: https://issues.apache.org/jira/browse/HDDS-7345
> Project: Apache Ozone
> Issue Type: Bug
> Components: Ozone Manager
> Affects Versions: 1.3.0
> Environment: docker-compose on HDDS-6517-Snapshot branch with hash *
> 6eb19a771
> Reporter: Soumitra Sulav
> Assignee: Hemant Kumar
> Priority: Critical
> Labels: ozone-snapshot
>
> Currently no log is observed while running create snapshot.
> Whether the command was a success or not.
> We must have logger added.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]