sillsdev / sillsdev/languageforge-lexbox

Consider slightly different volume structure

Open
#885 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

📦 Lexbox
Dominant language
C#
Stars
9
Forks
8
Avg merge
2d 13h
Merged PRs (30d)
49

Description

While researching #884, I came across this advice in the PostgreSQL manual (emphasis mine):

Many installations create their database clusters on file systems (volumes) other than the machine's “root” volume. If you choose to do this, it is not advisable to try to use the secondary volume's topmost directory (mount point) as the data directory. Best practice is to create a directory within the mount-point directory that is owned by the PostgreSQL user, and then create the data directory within that. This avoids permissions problems, particularly for operations such as pg_upgrade, and it also ensures clean failures if the secondary volume is taken offline.

This is actually exactly the situation we've been running into. We currently mount our data volume into /var/hg/repos on hgweb, and the data volume contains the folders a, b, c and so on. Which means that we need the volume root to be mounted with owner www-data and group www-data in order to be able to create new folders, and we've had to do some initContainer tricks to make that possible. (Because by default on Linux, mount points are owned by the root user, so we have to run an initContainer after the mount to change the permissions of the volume root).

However, what if we changed it so that the volume contains one folder named repos, and is mounted onto /var/hg? Then the necessary permissions on the repos folder would be stored in the volume data itself and would not need to be re-created every time. That would go a long way towards making our permissions issues a lot less gnarly.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the volume mount and initContainer configuration for /var/hg/repos. Compare it with mounting the volume at /var/hg and storing repos in a repos subdirectory; done means the repository directory retains its permissions without recreating them through initContainer steps.

Written by the indexing model from the issue text.

Assessment

Tech stack
kubernetes, linux, postgresql
Domain
devops, infrastructure
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.