Skip to content

Commit d83c7ec

Browse files
authored
Merge pull request #1185 from mulkieran/issue-stratisd-3796
Supporting starting a pool without its cache
2 parents c5af8b8 + 0ecac58 commit d83c7ec

4 files changed

Lines changed: 15 additions & 2 deletions

File tree

docs/stratis.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ pool create [--key-desc <key_desc>] [--clevis <(nbde|tang|tpm2)> [--tang-url <ta
4343
pool stop <(--uuid <uuid> |--name <name>)>::
4444
Stop a pool, specifying the pool by its UUID or by its name. Tear down
4545
the storage stack but leave all metadata intact.
46-
pool start [--keyfile-path KEYFILE_PATH | --capture-key] --unlock-method <(any | clevis | keyring)> <(--uuid <uuid> |--name <name>)>::
46+
pool start [--remove-cache] [--keyfile-path KEYFILE_PATH | --capture-key] --unlock-method <(any | clevis | keyring)> <(--uuid <uuid> |--name <name>)>::
4747
Start a pool, specifying the pool by its UUID or by its name. Use the
4848
--unlock-method option to specify a method of unlocking the pool if it
4949
is encrypted. If an unlock method of any is specified the pool will be
@@ -54,7 +54,9 @@ pool start [--keyfile-path KEYFILE_PATH | --capture-key] --unlock-method <(any |
5454
option is required if --keyfile-path or --capture-key is used. If the
5555
value is any, the specified passphrase will be tried for all keyslots;
5656
otherwise the specified passphrase will be tried only for the keyslot
57-
corresponding to the specified method.
57+
corresponding to the specified method. If --remove-cache is specified,
58+
the pool's cache, if there is one, will not be set up and the Stratis
59+
metadata on each of the pool's cache devices, if any, will be removed.
5860
pool list [--stopped] [(--uuid <uuid> |--name <name>)]::
5961
List pools. If the --stopped option is used, list only stopped pools.
6062
Otherwise, list only started pools. If a UUID or name is specified, print

src/stratis_cli/_actions/_introspect.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
<arg name="id_type" type="s" direction="in" />
5353
<arg name="unlock_method" type="(b(bu))" direction="in" />
5454
<arg name="key_fd" type="(bh)" direction="in" />
55+
<arg name="remove_cache" type="b" direction="in" />
5556
<arg name="result" type="(b(oaoao))" direction="out" />
5657
<arg name="return_code" type="q" direction="out" />
5758
<arg name="return_string" type="s" direction="out" />

src/stratis_cli/_actions/_pool.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,7 @@ def start_pool(namespace):
342342
| {
343343
"unlock_method": unlock_method,
344344
"key_fd": key_fd_arg,
345+
"remove_cache": namespace.remove_cache,
345346
},
346347
)
347348

src/stratis_cli/_parser/_pool.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,15 @@ def verify(self, namespace, parser):
262262
"start",
263263
{
264264
"help": "Start a pool.",
265+
"args": [
266+
(
267+
"--remove-cache",
268+
{
269+
"action": "store_true",
270+
"help": "While starting the pool, remove its cache",
271+
},
272+
)
273+
],
265274
"groups": [
266275
(
267276
"Pool Identifier",

0 commit comments

Comments
 (0)