Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pool: 'queue' admin commands not the log stack-trace on bad arguments
Motivation: Fix following stack-trace: 16 Aug 2018 11:39:05 (dcache-xfel04-08) [admin] Command failed due to a bug, please contact support@dcache.org. dmg.util.CommandPanicException: (1) Command failed: java.lang.IllegalArgumentException: Storage class not found : xfel:FXE-2018@osm at org.dcache.util.cli.AnnotatedCommandExecutor.execute(AnnotatedCommandExecutor.java:156) ~[common-cli-4.0.5.jar:4.0.5] at dmg.cells.nucleus.CellAdapter.executeCommand(CellAdapter.java:238) ~[cells-4.0.5.jar:4.0.5] at org.dcache.cells.UniversalSpringCell.executeCommand(UniversalSpringCell.java:195) ~[dcache-core-4.0.5.jar:4.0.5] at dmg.cells.nucleus.CellAdapter$1.doExecute(CellAdapter.java:104) ~[cells-4.0.5.jar:4.0.5] at org.dcache.util.cli.CommandInterpreter.command(CommandInterpreter.java:129) ~[common-cli-4.0.5.jar:4.0.5] at dmg.cells.nucleus.CellAdapter$1.command(CellAdapter.java:121) ~[cells-4.0.5.jar:4.0.5] at dmg.cells.nucleus.CellAdapter.command(CellAdapter.java:223) ~[cells-4.0.5.jar:4.0.5] at dmg.cells.nucleus.CellAdapter.executeLocalCommand(CellAdapter.java:915) ~[cells-4.0.5.jar:4.0.5] at dmg.cells.nucleus.CellAdapter.messageArrived(CellAdapter.java:855) ~[cells-4.0.5.jar:4.0.5] at dmg.cells.nucleus.CellNucleus$DeliverMessageTask.run(CellNucleus.java:1218) [cells-4.0.5.jar:4.0.5] at org.dcache.util.BoundedExecutor$Worker.run(BoundedExecutor.java:251) [dcache-common-4.0.5.jar:4.0.5] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_162] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_162] at dmg.cells.nucleus.CellNucleus.lambda$wrapLoggingContext$4(CellNucleus.java:754) [cells-4.0.5.jar:4.0.5] at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_162] Caused by: java.lang.IllegalArgumentException: Storage class not found : xfel:FXE-2018@osm at org.dcache.pool.classic.StorageClassContainer.suspendStorageClass(StorageClassContainer.java:138) ~[dcache-core-4.0.5.jar:4.0.5] at org.dcache.pool.classic.StorageClassContainer.access$400(StorageClassContainer.java:49) ~[dcache-core-4.0.5.jar:4.0.5] at org.dcache.pool.classic.StorageClassContainer$ResumeQueueCommand.call(StorageClassContainer.java:519) ~[dcache-core-4.0.5.jar:4.0.5] at org.dcache.pool.classic.StorageClassContainer$ResumeQueueCommand.call(StorageClassContainer.java:503) ~[dcache-core-4.0.5.jar:4.0.5] at org.dcache.util.cli.AnnotatedCommandExecutor.execute(AnnotatedCommandExecutor.java:145) ~[common-cli-4.0.5.jar:4.0.5] ... 14 common frames omitted Modification: Don't use a RuntimeException to report bad input, but a CommandException. This is reported back without logging a stack-trace. Result: Bad admin input for the following admin commands no longer results in a stack-trace being logged: queue activate queue activate class queue remove class queue suspend class queue resume class queue remove pnfsid Target: master Require-notes: yes Require-book: no Request: 4.2 Request: 4.1 Request: 4.0 Request: 3.2 Patch: https://rb.dcache.org/r/11112/ Acked-by: Tigran Mkrtchyan
- Loading branch information