Skip to content

Doc: Add preseed filter examples - #1501

Open
roosterfish wants to merge 4 commits into
canonical:mainfrom
roosterfish:find_examples
Open

Doc: Add preseed filter examples#1501
roosterfish wants to merge 4 commits into
canonical:mainfrom
roosterfish:find_examples

Conversation

@roosterfish

@roosterfish roosterfish commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Fixes #1471.
Fixes #1301.

Creates a preseed reference page, references it and adds filter examples to how-to section.

cc @wideawakening

Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
@github-actions github-actions Bot added the Documentation Documentation needs updating label Aug 13, 2026
@roosterfish
roosterfish marked this pull request as ready for review August 13, 2026 15:48
@roosterfish
roosterfish requested review from elijahgreenstein and a lite review from Copilot and removed request for Copilot August 13, 2026 15:48

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds a dedicated preseed reference page to the MicroCloud documentation, links it from the reference index, and updates how-to guides to point readers at the new reference while adding storage-disk filter examples.

Changes:

  • Introduces /reference/preseed with a literalincluded preseed YAML and an explanation of disk filter syntax.
  • Updates /reference/index to include the new preseed reference section.
  • Adjusts initialization/joining how-tos to link to the full preseed reference and adds storage filter examples to initialization.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
doc/reference/preseed.yaml New reference YAML example used by the preseed docs (literalinclude).
doc/reference/preseed.md New preseed reference page, including disk filter reference and constraints.
doc/reference/index.md Adds a “Preseed” section linking to the new reference page.
doc/how-to/member_add.md Replaces embedded YAML syntax block with a link to the new preseed reference.
doc/how-to/initialize.md Replaces embedded YAML syntax block with a link and adds storage filter examples.
Suppressed comments (2)

doc/reference/preseed.md:65

  • The current wording says string values "must not" be quoted, but the filter implementation supports quotes (and other docs/examples in this PR use quotes). Consider relaxing this to describe when quoting is required instead of forbidding it.
* Filters are checked in order of appearance
* String values must not be in quotes unless the string contains a space
* Single quotes are fine, but double quotes must be escaped

doc/how-to/initialize.md:259

  • This snippet is intended to configure remote (Ceph) storage filters, but it uses storage.local instead of storage.ceph. That would make the example configure local storage filtering instead of Ceph.
storage:
  local:
    - find: size > 1TiB && model == "<vendor2>"
      find_min: 6
      find_max: 8

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread doc/reference/preseed.md Outdated
Comment thread doc/reference/index.md Outdated
Comment thread doc/how-to/initialize.md Outdated

@elijahgreenstein elijahgreenstein left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice! Some comments and suggestions about wording, organization, and the title and placement of the page on the Reference landing page.

Comment thread doc/how-to/initialize.md Outdated
Comment thread doc/how-to/initialize.md Outdated
Comment thread doc/how-to/initialize.md Outdated
Comment thread doc/reference/preseed.md Outdated
Comment thread doc/reference/preseed.md Outdated
Comment thread doc/reference/preseed.md Outdated
Comment thread doc/reference/preseed.md Outdated
Comment thread doc/reference/preseed.md Outdated
Comment thread doc/reference/preseed.md Outdated
Comment thread doc/reference/preseed.md Outdated

@elijahgreenstein elijahgreenstein left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

A few follow-up comments and suggestions.

Comment thread doc/how-to/initialize.md Outdated
Comment on lines +250 to +254
As another example, you can use filters to use all disks with size greater than 1TiB, model description `<vendor2>` for remote (Ceph) storage, and ensure there are at least six disks (maximum eight) selected across all members:

```yaml
storage:
local:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The description says "remote" but the example has local. Should it be ceph?

Also, a further revision to tighten up the sentence:

Suggested change
As another example, you can use filters to use all disks with size greater than 1TiB, model description `<vendor2>` for remote (Ceph) storage, and ensure there are at least six disks (maximum eight) selected across all members:
```yaml
storage:
local:
As another example, you can filter for remote (Ceph) storage disks with size greater than 1TiB and model description `<vendor2>`, and ensure there are at least six disks (maximum eight) selected across all members:
```yaml
storage:
local:

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good catch, fixed.

Comment thread doc/reference/preseed.md Outdated
| `type` | `nvme` | |
| `read_only` | `false` | |
| `mounted` | `false` | |
| `size` | `1024209543168` | Size of the disk in bytes |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Since there's only this one entry in the explanation column, maybe you can remove that entire column and add "size of the disk in bytes" next to the example:

Suggested change
| `size` | `1024209543168` | Size of the disk in bytes |
| `size` | `1024209543168` (size of the disk in bytes |

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.

or in the filter column, like 'size (in bytes)'

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes I have removed the column and moved the explanation to the example.

Comment thread doc/reference/preseed.md Outdated
| `used_by` | `bcache` | |
```

When using the `size` filter, its value can be compared against a user defined number using byte suffixes in both units 1000 and 1024:

@elijahgreenstein elijahgreenstein Aug 14, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
When using the `size` filter, its value can be compared against a user defined number using byte suffixes in both units 1000 and 1024:
When using the `size` filter, its value can be compared against a user-defined number using byte suffixes in either units of 1000 or 1024:

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

Comment thread doc/reference/preseed.md Outdated
### Limit filtered disks

In addition to finding disks by filter, the minimum and maximum number of disks can also be specified.
For this, the `find_min` and `find_max` settings can be added to the respective section:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
For this, the `find_min` and `find_max` settings can be added to the respective section:
For this, the `find_min` and `find_max` settings can be added to the relevant section:

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

@wideawakening

Copy link
Copy Markdown
Member

great addition, thx!

maybe we can also add some 'debugging' tips, like using sudo microceph disk list --json or lxc query /1.0/resources | jq .

Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
@roosterfish

Copy link
Copy Markdown
Contributor Author

Thanks for your reviews @elijahgreenstein @wideawakening. I have addressed the remaining set of comments and added an additional note in the how-to mentioning the use of lxc query to find the actual filter values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation Documentation needs updating

Projects

None yet

Development

Successfully merging this pull request may close these issues.

doc: clarify pressed find clause is accross whole cluster, not node The preseed example in the document for adding members is a bit confusing

4 participants