From eca82e93af1b8f8bdc22d8abbe505f420e8464e6 Mon Sep 17 00:00:00 2001 From: Martin Mattel Date: Tue, 14 Jul 2026 18:07:27 +0200 Subject: [PATCH] new cli command --- .../maintenance/commands/changed-cli.adoc | 9 ++--- .../commands/clean-corrupt-public-shares.adoc | 33 +++++++++++++++++++ .../pages/maintenance/commands/commands.adoc | 4 +++ .../partials/maintenance/ocis-shares-cli.adoc | 9 ++--- 4 files changed, 45 insertions(+), 10 deletions(-) create mode 100644 modules/admin/pages/maintenance/commands/clean-corrupt-public-shares.adoc diff --git a/modules/admin/pages/maintenance/commands/changed-cli.adoc b/modules/admin/pages/maintenance/commands/changed-cli.adoc index d74ecf1d6..d9f346b1e 100644 --- a/modules/admin/pages/maintenance/commands/changed-cli.adoc +++ b/modules/admin/pages/maintenance/commands/changed-cli.adoc @@ -1,6 +1,6 @@ = Changed or Added CLI Commands :toc: right -:description: This page contains a list with added, changed or removed CLI commands between Infinite Scale version 7.3.0 and 8.0.0. +:description: This page contains a list with added, changed or removed CLI commands between Infinite Scale version 8.0.0 and 8.1.0. :page-aliases: ROOT:maintenance/b-r/changed-cli.adoc == Introduction @@ -13,8 +13,5 @@ See the link for a detailed description of the respective CLI command if available. -* xref:maintenance/commands/commands.adoc#move-stuck-uploads[Move Stuck Uploads] + -This CLI command has been added to remedy the issue when Infinite Scale metadata may become stuck in some cases of saturated disk usage. - -* xref:maintenance/commands/commands.adoc#cleanup-orphaned-grants[Cleanup Orphaned Grants] + -This CLI command has been added to cleanup orphaned grants when a share has been deleted but the removal process is not completed successfully. +* xref:maintenance/commands/commands.adoc#clean-corrupt-public-shares[Clean Corrupt Public Shares] + +This CLI command has been added to detect and remove corrupt public share entries. diff --git a/modules/admin/pages/maintenance/commands/clean-corrupt-public-shares.adoc b/modules/admin/pages/maintenance/commands/clean-corrupt-public-shares.adoc new file mode 100644 index 000000000..f91508f09 --- /dev/null +++ b/modules/admin/pages/maintenance/commands/clean-corrupt-public-shares.adoc @@ -0,0 +1,33 @@ += Clean Corrupt Public Shares +:toc: right + +Detect and optionally delete storage grants that have no corresponding share-manager entry. + +include::partial$/maintenance/ocis-shares-cli.adoc[] + +== Command Details + +If there is a single public-share entry with a corrupt `resource_id`, the public-share manager will be unable to read this public-share or any others from memory. + +The following command fixes the problem of corrupt public shares. + +.Usage: + +[source,bash] +---- +ocis shares -h clean-corrupt-public-shares +NAME: + ocis shares clean-corrupt-public-shares - Remove corrupt public-share entries (nil resource_id) that crash ListPublicShares. + +USAGE: + ocis shares clean-corrupt-public-shares [command options] + +OPTIONS: + --dry-run Only report corrupt entries, do not modify anything (default: true) + --verbose, -v Verbose logging enabled (default: false) + --help, -h show help +---- + +.Notes: + +- `--dry-run` defaults to `true` (no deletions). Set to `false` to remove corrupt public shares. diff --git a/modules/admin/pages/maintenance/commands/commands.adoc b/modules/admin/pages/maintenance/commands/commands.adoc index 9828e3d2d..e8cf5d9c9 100644 --- a/modules/admin/pages/maintenance/commands/commands.adoc +++ b/modules/admin/pages/maintenance/commands/commands.adoc @@ -72,6 +72,10 @@ Compared to offline commands that can be issued when Infinite Scale is shut down App Tokens are used to authenticate 3rd party access via https like when using curl (apps) to access an API endpoint. These apps need to authenticate themselves, as no logged in user authenticates the request. To be able to use an app token, one must first create a token via the cli. For details see the description in the xref:{s-path}/auth-app.adoc[auth-app] service. +=== Clean Corrupt Public Shares + +In rare cases, information relating to a public share can become corrupted, which can prevent all other public shares from being read. Use the following xref:maintenance/commands/clean-corrupt-public-shares.adoc[CLI command] to identify and remove them. + === Cleanup Orphaned Grants Detect and, if desired, delete storage grants that have no corresponding share-manager entry. This can occur when a share is deleted, but the removal process is not completed successfully. Use the following xref:maintenance/commands/cleanup-orphaned-grants.adoc[CLI command] to cleanup those orphaned share grants. diff --git a/modules/admin/partials/maintenance/ocis-shares-cli.adoc b/modules/admin/partials/maintenance/ocis-shares-cli.adoc index 7f41b813d..795bd15e8 100644 --- a/modules/admin/partials/maintenance/ocis-shares-cli.adoc +++ b/modules/admin/partials/maintenance/ocis-shares-cli.adoc @@ -15,10 +15,11 @@ CATEGORY: maintenance COMMANDS: - cleanup Clean up stale entries in the share manager. - clean-orphaned-grants Detect and clean orphaned share-manager grants. - move-stuck-upload-blobs Move stuck upload blobs to the jsoncs3 share-manager metadata - help, h Shows a list of commands or help for one command + cleanup Clean up stale entries in the share manager. + clean-orphaned-grants Detect and clean orphaned share-manager grants. + move-stuck-upload-blobs Move stuck upload blobs to the jsoncs3 share-manager metadata + clean-corrupt-public-shares Remove corrupt public-share entries (nil resource_id) that crash ListPublicShares. + help, h Shows a list of commands or help for one command OPTIONS: --help, -h show help