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

Support os.persistentStatePaths in Harvester configuration #459

Merged
merged 1 commit into from
Apr 13, 2023

Conversation

futuretea
Copy link
Contributor

@futuretea futuretea commented Mar 22, 2023

Problem:

Currently, Harvester OS does not support custom paths for persistent storage or read-write paths. This means that any changes made to files not in default persistentStatePaths will be lost upon reboot.

Solution:

To address this issue, this pull request adds a new options to the Harvester OS configuration in Harvester config.

The os.persistentStatePaths option allows users to configure custom paths where modifications made to files will persist across reboots. This means that any changes made to files in these paths will not be lost upon reboot.

an config example for install rook-ceph in Harvester

os:
  persistentStatePaths:
    - /var/lib/rook
  modules:
    - rbd
    - nbd

Without this PR, users can achieve the same effect by modifying /oem/90_custom.yaml and then rebootting. This PR allows users to define the desired os layout at installation time.

Related Issue:
harvester/harvester#3688

Note
Please ensure that any custom paths added using these options are valid and secure, and that any modifications made to the OS are done with caution and understanding of the potential risks.

Test plan:

Refer to harvester/harvester#3566

Signed-off-by: futuretea <Hang.Yu@suse.com>
@futuretea futuretea changed the title Support os.persistentStatePaths in Harvester configuration Support os.persistentStatePaths and os.rwPaths in Harvester configuration Apr 10, 2023
@futuretea futuretea marked this pull request as draft April 10, 2023 04:44
@futuretea futuretea marked this pull request as ready for review April 10, 2023 05:39
@futuretea
Copy link
Contributor Author

futuretea commented Apr 10, 2023

@bk201 I've added a commit, added an os.rwPaths option to allow changes to the RW_PATHS configuration, and the PR documentation has been updated. CC @guangbochen

@futuretea futuretea requested a review from bk201 April 10, 2023 05:42
@futuretea
Copy link
Contributor Author

futuretea commented Apr 10, 2023

@bk201 @guangbochen convert this PR to draft, try to add after-install-chroot in

@futuretea futuretea changed the title Support os.persistentStatePaths and os.rwPaths in Harvester configuration Support os.persistentStatePaths in Harvester configuration Apr 11, 2023
@futuretea futuretea marked this pull request as ready for review April 11, 2023 09:12
Copy link
Member

@bk201 bk201 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@Vicente-Cheng Vicente-Cheng left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Contributor

@guangbochen guangbochen 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.

@guangbochen guangbochen merged commit f1bdcd2 into harvester:master Apr 13, 2023
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.

5 participants