Skip to content

Issue stratisd 3467: Support for filesystem sizes and filesystem size limits in early boot - #4065

Open
alessandralanz wants to merge 4 commits into
stratis-storage:masterfrom
alessandralanz:issue-stratisd-3467
Open

Issue stratisd 3467: Support for filesystem sizes and filesystem size limits in early boot#4065
alessandralanz wants to merge 4 commits into
stratis-storage:masterfrom
alessandralanz:issue-stratisd-3467

Conversation

@alessandralanz

Copy link
Copy Markdown
Contributor

Summary

Closes #3467

  • Add optional --size and --size-limit parameters to stratis-min filesystem create
  • Add new stratis-min filesystem set-size-limit subcommand
  • Thread size and size_limit through all JSON-RPC IPC layers: wire protocol, server handler, server dispatch, client, and CLI

Changes bring early boot JSON-RPC interface to parity with the D-Bus API for filesystem size and size limit support

Files changed

  • src/jsonrpc/interface.rs — Add size/size_limit fields to FsCreate, add FsSetSizeLimit to StratisParamType and StratisRet
  • src/jsonrpc/server/filesystem.rs: Accept size params in filesystem_create, add filesystem_set_size_limit handler
  • src/jsonrpc/server/server.rs: Route new parameters and FsSetSizeLimit to handlers
  • src/jsonrpc/client/filesystem.rs: Pass size params in filesystem_create, add filesystem_set_size_limit client function
  • src/bin/stratis-min/stratis-min.rs: Add --size/--size-limit CLI args and set-size-limit subcommand

@jbaublitz @mulkieran

@packit-as-a-service

Copy link
Copy Markdown

Congratulations! One of the builds has completed. 🍾

You can install the built RPMs by following these steps:

  • sudo dnf install -y 'dnf*-command(copr)'
  • dnf copr enable packit/stratis-storage-stratisd-4065-copr_pull
  • And now you can install the packages.

Please note that the RPMs should be used only in a testing environment.

@bmr-cymru bmr-cymru left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same basic pattern as #3336 for the JSONRPC plumbing & CLI additions.

One thing to consider: right now stratis-min filesystem set-size-limit with no --size-limit fails with the slightly mysterious:

# ./target/release/stratis-min filesystem set-size-limit p1 fs1
Error: "The requested action had no effect"

Which is the generic error string used when an RPC request is performed but changed == 0 upon return. I think it would be better to either enforce the same arguments as the regular stratis filesystem set-size-limit (which requires the limit as the 3rd positional arg), or to make the --size-limit long option required for the stratis-min filesystem set-size-limit command:

# ./target/release/stratis-min filesystem set-size-limit p1 fs1
error: the following required arguments were not provided:
  --size-limit <size_limit>

Usage: stratis-min filesystem set-size-limit --size-limit <size_limit> <pool_name> <fs_name>

For more information, try '--help'.
# ./target/release/stratis-min filesystem set-size-limit p1 fs1
error: the following required arguments were not provided:
  <size_limit>

Usage: stratis-min filesystem set-size-limit <pool_name> <fs_name> <size_limit>

For more information, try '--help'.

@mulkieran

Copy link
Copy Markdown
Member

Same basic pattern as #3336 for the JSONRPC plumbing & CLI additions.

One thing to consider: right now stratis-min filesystem set-size-limit with no --size-limit fails with the slightly mysterious:

# ./target/release/stratis-min filesystem set-size-limit p1 fs1
Error: "The requested action had no effect"

Which is the generic error string used when an RPC request is performed but changed == 0 upon return. I think it would be better to either enforce the same arguments as the regular stratis filesystem set-size-limit (which requires the limit as the 3rd positional arg), or to make the --size-limit long option required for the stratis-min filesystem set-size-limit command:

# ./target/release/stratis-min filesystem set-size-limit p1 fs1
error: the following required arguments were not provided:
  --size-limit <size_limit>

Usage: stratis-min filesystem set-size-limit --size-limit <size_limit> <pool_name> <fs_name>

For more information, try '--help'.
# ./target/release/stratis-min filesystem set-size-limit p1 fs1
error: the following required arguments were not provided:
  <size_limit>

Usage: stratis-min filesystem set-size-limit <pool_name> <fs_name> <size_limit>

For more information, try '--help'.

I think I favor the bottom option.

@mulkieran mulkieran added this to the v3.9.3 milestone Aug 11, 2026
@mulkieran mulkieran moved this to In Progress in 2026August Aug 11, 2026

@mulkieran mulkieran left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once you've settled the command-line syntax, please add tests in tests/stratis_min.rs and tests/stratisd_min.rs as appropriate.

@bmr-cymru

Copy link
Copy Markdown
Member

I think I favor the bottom option.

Agreed: I think the consistency with the regular stratis-cli command syntax is the better UX.

Command::new("set-size-limit")
.arg(Arg::new("pool_name").required(true))
.arg(Arg::new("fs_name").required(true))
.arg(Arg::new("size_limit").long("size-limit").num_args(1)),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This still isn't required or positional, so it has the same confusing behaviour as before:

# ./target/release/stratis-min filesystem set-size-limit p1 fs1
Error: "The requested action had no effect"

It would be better to enforce this as a parse error than to print the RPC error on the terminal:

# ./target/release/stratis-min filesystem set-size-limit p1 fs1
error: the following required arguments were not provided:
  <size_limit>

Usage: stratis-min filesystem set-size-limit <pool_name> <fs_name> <size_limit>

For more information, try '--help'.

@mulkieran mulkieran modified the milestones: v3.9.3, v3.10.0 Aug 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

Support for filesystem sizes and filesystem size limits in early boot

3 participants