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

Block creation of system reserved Share names #2881 #2882

Conversation

phillxnet
Copy link
Member

Use/extend existing knowledge of system associated subvolumes to avoid breaking (optional) ROOT pool
import, and non-optional system unique share names.

Includes:

  • Addition of CREATE_SUBVOL_EXCLUDE list.
  • Block creation of all currently EXCLUDED subvol names, previously used only to avoid Web-UI surfacing.
  • Incidental string.format to fstrings in share.py.
  • Additional unit test to exercise added Share creation filter.

Fixes #2881

Use/extend existing knowledge of system associated
subvolumes to avoid breaking (optional) ROOT pool
import, and non-optional system unique share names.

Includes:
- Addition of CREATE_SUBVOL_EXCLUDE list.
- Block creation of all currently EXCLUDED subvol names,
previously used only to avoid Web-UI surfacing.
- Incidental string.format to fstrings in share.py.
- Additional unit test to exercise added Share creation
filter.
@phillxnet
Copy link
Member Author

N.B. this new blocking mechanism is not intended to affect imports: only Web-UI Share creation. Otherwise we would be unable to import our 'ROOT' Pool. An expectation from our past that is maintained, but no longer default.

Of all current upstream OS (openSUSE Leap/TW) subvols created by our kiwi-ng installer, we only surface /home within the Web-UI. All others are filtered out as a simplification/safety measure as they are considered for system use only. And as-from our new no-default-ROOT-Pool-import we also discourage use of the system drive entirely: easing on-boarding and further enforcing system/data separation.

@phillxnet
Copy link
Member Author

Testing

An rpm was built (Leap 15.6 X86_64 host) and installed successfully on the build host. The issue highlighted home share was rejected as intended:

attempted-data-pool-home-share-creation

On a system where the ROOT pool had not been imported. The above error is an indicating of the newly added 'fence' to avoid possible conflicts with upstream established system subvolumes.

Similarly an attempt to create a Share named var or opt was also rejected. The same system was also able to import the ROOT Pool; assuming the imported data pool did not already have clashing share names with subvol names on the ROOT pool, this should be the case. Similarly we maintain our Web-UI surfacing of the 'real' /home subvol (ROOT Pool parent) after the system pool was imported (Advanced users only).

@phillxnet
Copy link
Member Author

Link, for context, to upstreams definition of the default subvolumes:
https://en.opensuse.org/SDB:BTRFS#Default_Subvolumes

@phillxnet phillxnet merged commit eab4ed5 into rockstor:testing Aug 12, 2024
@phillxnet phillxnet deleted the 2881-Block-creation-of-system-reserved-Share-names branch August 12, 2024 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant