Doc: Add preseed filter examples - #1501
Conversation
Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
There was a problem hiding this comment.
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/preseedwith a literalincluded preseed YAML and an explanation of disk filter syntax. - Updates
/reference/indexto 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.localinstead ofstorage.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.
e2433bb to
521a44c
Compare
elijahgreenstein
left a comment
There was a problem hiding this comment.
Nice! Some comments and suggestions about wording, organization, and the title and placement of the page on the Reference landing page.
521a44c to
68a95a1
Compare
elijahgreenstein
left a comment
There was a problem hiding this comment.
A few follow-up comments and suggestions.
| 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: |
There was a problem hiding this comment.
The description says "remote" but the example has local. Should it be ceph?
Also, a further revision to tighten up the sentence:
| 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: |
There was a problem hiding this comment.
Good catch, fixed.
| | `type` | `nvme` | | | ||
| | `read_only` | `false` | | | ||
| | `mounted` | `false` | | | ||
| | `size` | `1024209543168` | Size of the disk in bytes | |
There was a problem hiding this comment.
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:
| | `size` | `1024209543168` | Size of the disk in bytes | | |
| | `size` | `1024209543168` (size of the disk in bytes | |
There was a problem hiding this comment.
or in the filter column, like 'size (in bytes)'
There was a problem hiding this comment.
Yes I have removed the column and moved the explanation to the example.
| | `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: |
There was a problem hiding this comment.
| 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: |
| ### 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: |
There was a problem hiding this comment.
| 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: |
|
great addition, thx! maybe we can also add some 'debugging' tips, like using |
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>
68a95a1 to
6ccd3d7
Compare
|
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 |
Fixes #1471.
Fixes #1301.
Creates a preseed reference page, references it and adds filter examples to how-to section.
cc @wideawakening