Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: added zfs storage pool configs [WD-8615] #687

Merged
merged 1 commit into from
Mar 6, 2024

Conversation

mas-who
Copy link
Contributor

@mas-who mas-who commented Mar 4, 2024

Done

  • Added storage pool configs for zfs driver type

QA

  1. Run the LXD-UI:
    • On the demo server via the link posted by @webteam-app below. This is only available for PRs created by collaborators of the repo. Ask @mas-who or @edlerd for access.
    • With a local copy of this branch, run as described here.
  2. Perform the following QA steps:
    • Create a storage pool for zfs driver type, check that zfs pool configs can be set.
    • Edit an existing zfs stroage pool and update its configs

@webteam-app
Copy link

Demo starting at https://lxd-ui-687.demos.haus

@mas-who
Copy link
Contributor Author

mas-who commented Mar 4, 2024

Instead of just adding zfs.clone_copy, I included the other storage pool level configs for the zfs driver as well. Reason is that the config form looks really empty with only one config, If that's too much I will remove the other configs.

Copy link
Collaborator

@edlerd edlerd left a comment

Choose a reason for hiding this comment

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

Some comments below.

src/pages/storage/forms/StoragePoolFormMenu.tsx Outdated Show resolved Hide resolved
src/util/storageOptions.tsx Outdated Show resolved Hide resolved
Copy link
Collaborator

@edlerd edlerd left a comment

Choose a reason for hiding this comment

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

Did QA on a cluster backend, some comments on it below.

src/api/storage-pools.tsx Outdated Show resolved Hide resolved
@mas-who mas-who requested a review from edlerd March 5, 2024 10:22
@mas-who
Copy link
Contributor Author

mas-who commented Mar 5, 2024

tested ceph storage pools, no errors with config keys

Copy link
Collaborator

@edlerd edlerd left a comment

Choose a reason for hiding this comment

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

It seems a bit complex to have the getClusterPool
and the getMemberPool functions, that both rely on a generic getClusterAndMemberConfigs function. I think all three functions should be defined closer to each other. And then maybe we should collapse them to a single function, because we need, the memberPool and the clusterPool always together. Currently we evaluate getClusterAndMemberConfigs twice and are only ever interested into one of the two return values.

src/api/storage-pools.tsx Outdated Show resolved Hide resolved
src/api/storage-pools.tsx Show resolved Hide resolved
@mas-who
Copy link
Contributor Author

mas-who commented Mar 5, 2024

It seems a bit complex to have the getClusterPool and the getMemberPool functions, that both rely on a generic getClusterAndMemberConfigs function. I think all three functions should be defined closer to each other. And then maybe we should collapse them to a single function, because we need, the memberPool and the clusterPool always together. Currently we evaluate getClusterAndMemberConfigs twice and are only ever interested into one of the two return values.

Sure, I will consolidate the logic into a single place and try simplify the dependencies a bit 👍

src/api/storage-pools.tsx Outdated Show resolved Hide resolved
src/pages/storage/forms/StoragePoolForm.tsx Outdated Show resolved Hide resolved
Signed-off-by: Mason Hu <mason.hu@canonical.com>
Copy link
Collaborator

@edlerd edlerd left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for adding this 👍

@mas-who mas-who merged commit 2c73fee into canonical:main Mar 6, 2024
10 checks passed
github-actions bot pushed a commit that referenced this pull request Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants