-
Notifications
You must be signed in to change notification settings - Fork 21
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
Add Postgres volume notes #1687
base: main
Are you sure you want to change the base?
Conversation
initdb requires the volume location to be empty, otherwise it fails to create a new database. These notes are due to bsc#1230393.
Created a staging project on OBS for 7: home:defolos:BCI:Staging:SLE-15-SP7:7-1687 Build ResultsRepository
Repository
Repository
Repository
Repository
Repository
Repository
Repository
Build succeeded ✅ To run BCI-tests against this PR, use the following command: OS_VERSION=15.7 TARGET=custom BASEURL=registry.opensuse.org/home/defolos/bci/staging/sle-15-sp7/7-1687/ tox -- -n auto The following images can be pulled from the staging project:
|
Created a staging project on OBS for 5: home:defolos:BCI:Staging:SLE-15-SP5:5-1687 Build ResultsRepository
Repository
Repository
Repository
Repository
Repository
Repository
Repository
Build succeeded ✅ To run BCI-tests against this PR, use the following command: OS_VERSION=15.5 TARGET=custom BASEURL=registry.opensuse.org/home/defolos/bci/staging/sle-15-sp5/5-1687/ tox -- -n auto The following images can be pulled from the staging project:
|
Created a staging project on OBS for 6: home:defolos:BCI:Staging:SLE-15-SP6:6-1687 Build ResultsRepository
Repository
Repository
Repository
Repository
Repository
Repository
Repository
Build succeeded ✅ To run BCI-tests against this PR, use the following command: OS_VERSION=15.6 TARGET=custom BASEURL=registry.opensuse.org/home/defolos/bci/staging/sle-15-sp6/6-1687/ tox -- -n auto The following images can be pulled from the staging project:
|
Because |
Created a staging project on OBS for Tumbleweed: home:defolos:BCI:Staging:Tumbleweed:Tumbleweed-1687 Build ResultsRepository
Repository
Repository
Repository
Build succeeded ✅ To run BCI-tests against this PR, use the following command: OS_VERSION=tumbleweed TARGET=custom BASEURL=registry.opensuse.org/home/defolos/bci/staging/tumbleweed/tumbleweed-1687/ tox -- -n auto The following images can be pulled from the staging project:
|
just wondering, there's no way around this limitation? seems like easy enough to fix in initdb |
There's a check hardcoded that is over 10y old in the code that you can see here. In theory, removing this check should fix it, but I believe it is there for a reason. |
@@ -24,6 +24,10 @@ $ podman run -it --rm -p 5432:5432 -e POSTGRES_PASSWORD=my-password -v /path/to/ | |||
|
|||
PostgreSQL data directory location. | |||
|
|||
**Note 1:** `initdb` requires this location to be empty to create a new database. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
**Note 1:** `initdb` requires this location to be empty to create a new database. | |
**Note 1:** The directory must be empty for `initdb` to create a new database. |
@@ -24,6 +24,10 @@ $ podman run -it --rm -p 5432:5432 -e POSTGRES_PASSWORD=my-password -v /path/to/ | |||
|
|||
PostgreSQL data directory location. | |||
|
|||
**Note 1:** `initdb` requires this location to be empty to create a new database. | |||
|
|||
**Note 2:** If the volume points to a file system mount point, a remote folder that can't be chowned to the `postgres` user, or a location that already contains files (including `lost+found` and dotfiles), a new subdirectory must be created within the select storage method to contain the PostgreSQL data. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
**Note 2:** If the volume points to a file system mount point, a remote folder that can't be chowned to the `postgres` user, or a location that already contains files (including `lost+found` and dotfiles), a new subdirectory must be created within the select storage method to contain the PostgreSQL data. | |
**Note 2:** If the volume points either to a file system mount point, a remote folder that cannot be owned by the `postgres` user, or a location that already contains files (including `lost+found` and dotfiles), a new subdirectory for storing the PostgreSQL data must be created within the selected storage method. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
within the selected storage method sounds strange to me. Can you really create a subdir within a storage method?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Within in this case is inside, switching to inside sounds odd to me:
a new subdirectory for storing the PostgreSQL data must be created inside the selected storage method.
The issue in note 2 is the following:
- Inside the container all PSQL sees is a folder, PSQL is unaware that this is a volume and neither what is behind this volume
- PSQL can't use the current folder because it has some issue (e.g. not empty location)
- For PSQL, the solution is to mount something as in PGDATA
- For the user, one solution is to create a new sub folder in the volume they are trying to use
The idea here is to document that certain things can't be used as PGDATA, we don't really need to provide the solution, as the solution could vary per setup.
The upstream Docker Hub image uses a similar text.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dmpop does my previous message explains within?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we simply say "within the PGDATA volume"?
initdb requires the volume location to be empty, otherwise it fails to create a new database.
These notes are due to bsc#1230393.