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

Configurable app home directory base path #7249

Closed
DavidePrincipi opened this issue Jan 13, 2025 · 3 comments
Closed

Configurable app home directory base path #7249

DavidePrincipi opened this issue Jan 13, 2025 · 3 comments
Assignees
Labels
verified All test cases were verified successfully

Comments

@DavidePrincipi
Copy link
Member

NS8 modules (apps) are configured with the default distribution home directory base path, /home. For use cases where an alternative directory is required, the base path must be made configurable.

A configurable home directory base path is useful for placing application data on a different device if the default one is overloaded. The custom path can also be set before create-cluster is run or temporarily to place only a single app instance on an alternative disk.

Proposed solution

In the add-module action of a node, define a new node environment variable, HOME_BASEDIR, to run the underlying useradd command.

Alternative solutions

The storage requirements of an NS8 app come from persistent volumes and container images. Fine-grained bind-mounts for individual volumes can partially replace this feature.

See also

@DavidePrincipi DavidePrincipi added this to the NethServer 8.4 milestone Jan 13, 2025
@DavidePrincipi DavidePrincipi self-assigned this Jan 13, 2025
@DavidePrincipi DavidePrincipi moved this to In Progress in NethServer Jan 13, 2025
DavidePrincipi added a commit to NethServer/ns8-core that referenced this issue Jan 17, 2025
@DavidePrincipi
Copy link
Member Author

In testing 3.4.2-dev.3

Test case 1

Check the correct command usage. Read instructions at https://nethserver.github.io/ns8-core/core/filesystem/#custom-base-path-for-home-directories and configure an alternative path as new home base directory.

Test case 2

Check the failure scenarios. The command must validate the home base directory according to these rules:

  1. DIR must resolve to a filesytem path with no symlink components (validate_home_basedir).
  2. DIR must be world-readable in all its path components (check_permissions).
  3. DIR must be a device mountpoint. The device must not have other mountpoints (check_unique_mountpoint).

Ensure the exit code is non-zero if an error is found.

Note: --check can be used for failure checks.

@DavidePrincipi DavidePrincipi removed their assignment Jan 17, 2025
@DavidePrincipi DavidePrincipi added the testing Packages are available from testing repositories label Jan 17, 2025
@nethbot nethbot moved this from In Progress to Testing in NethServer Jan 17, 2025
@nrauso nrauso self-assigned this Jan 17, 2025
@nrauso
Copy link

nrauso commented Jan 20, 2025

test case 1: VERIFIED
test case 2: VERIFIED

@nrauso nrauso added the verified All test cases were verified successfully label Jan 20, 2025
@github-actions github-actions bot removed the testing Packages are available from testing repositories label Jan 20, 2025
@nethbot nethbot moved this from Testing to Verified in NethServer Jan 20, 2025
@DavidePrincipi
Copy link
Member Author

@github-project-automation github-project-automation bot moved this from Verified to Done in NethServer Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
verified All test cases were verified successfully
Projects
Status: Done
Development

No branches or pull requests

2 participants