[PR #9674] [MERGED] Fix AdventureLog installation failure: missing postgis extension permissions #8191

Closed
opened 2026-02-26 16:32:05 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/community-scripts/ProxmoxVE/pull/9674
Author: @Copilot
Created: 12/5/2025
Status: Merged
Merged: 12/5/2025
Merged by: @michelroegl-brunner

Base: mainHead: copilot/fix-adventurelog-installation-issue


📝 Commits (2)

  • c7b87bd Initial plan
  • 3571fc7 Add PG_DB_EXTENSIONS="postgis" to fix installation error

📊 Changes

2 files changed (+5 additions, -1 deletions)

View changed files

📝 ct/adventurelog.sh (+4 -0)
📝 install/adventurelog-install.sh (+1 -1)

📄 Description

✍️ Description

AdventureLog installation fails during Django migrations with ProgrammingError: keine Berechtigung, um Erweiterung »postgis« zu erzeugen (no permission to create extension 'postgis'). Django attempts to create the extension as non-superuser adventurelog_user, which lacks privileges.

Changes

install/adventurelog-install.sh

  • Added PG_DB_EXTENSIONS="postgis" to setup_postgresql_db call, ensuring extension creation by postgres superuser during initial database setup

ct/adventurelog.sh

  • Added extension check in update_script() before migrations, protecting against update failures on installations created before this fix
# Before
PG_DB_NAME="adventurelog_db" PG_DB_USER="adventurelog_user" setup_postgresql_db

# After
PG_DB_NAME="adventurelog_db" PG_DB_USER="adventurelog_user" PG_DB_EXTENSIONS="postgis" setup_postgresql_db

Link: Per agent instructions in issue

Prerequisites (X in brackets)

  • Self-review completed – Code follows project standards.
  • Tested thoroughly – Changes work as expected.
  • No security risks – No hardcoded secrets, unnecessary privilege escalations, or permission issues.

🛠️ Type of Change (X in brackets)

  • 🐞 Bug fix – Resolves an issue without breaking functionality.
  • New feature – Adds new, non-breaking functionality.
  • 💥 Breaking change – Alters existing functionality in a way that may require updates.
  • 🆕 New script – A fully functional and tested script or script set.
  • 🌍 Website update – Changes to website-related JSON files or metadata.
  • 🔧 Refactoring / Code Cleanup – Improves readability or maintainability without changing functionality.
  • 📝 Documentation update – Changes to README, AppName.md, CONTRIBUTING.md, or other docs.
Original prompt

This section details on the original issue you should resolve

<issue_title>Adventurelog can't install with default settings</issue_title>
<issue_description>### Have you read and understood the above guidelines?

yes

🔎 Did you run the script with verbose mode enabled?

Yes, verbose mode was enabled and the output is included below

📜 What is the name of the script you are using?

adventurelog

📂 What was the exact command used to execute the script?

bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/adventurelog.sh)"

⚙️ What settings are you using?

  • Default Settings
  • Advanced Settings

🖥️ Which Linux distribution are you using?

Debian 13

📈 Which Proxmox version are you on?

PVE Version 9.1.2 (Kernel: 6.17.2-2-pve)

📝 Provide a clear and concise description of the issue.

⚙️ Using Default Settings on node pve
💡 PVE Version 9.1.2 (Kernel: 6.17.2-2-pve)
🆔 Container ID: 139
🖥️ Operating System: debian (13)
📦 Container Type: Unprivileged
💾 Disk Size: 7 GB
🧠 CPU Cores: 2
🛠️ RAM Size: 2048 MiB
🚀 Creating a AdventureLog LXC using the above default settings

✔️ Storage local (Free: 66,9GB Used: 24,8GB) [Template]
✔️ Storage local-lvm (Free: 1,2TB Used: 409,6GB) [Container]
✔️ Storage 'local-lvm' (lvmthin) validated
✔️ Template storage 'local' validated
✔️ Cluster is quorate
✔️ Template search completed
✔️ Template debian-13-standard_13.1-2_amd64.tar.zst [online]
✔️ LXC Container 139 was successfully created.
✔️ Started LXC Container
✔️ Network in LXC is reachable (ping)
✔️ Customized LXC Container
✔️ Set up Container OS
✔️ Network Connected: 192.168.176.154
✔️ IPv4 Internet Connected
✖️ IPv6 Internet Not Connected
✔️ Git DNS: github.com:(✔️ ) raw.githubusercontent.com:(✔️ ) api.github.com:(✔️ ) git.community-scripts.org:(✔️ )
✔️ Updated Container OS
✔️ Installed Dependencies
✔️ Python 3.13 installed
✔️ Setup uv 0.9.15
✔️ Setup Node.js 22
✔️ Installed Node.js modules: pnpm@latest
✔️ Setup PostgreSQL 17
✔️ Set up PostgreSQL Database
✔️ Deployed: adventurelog (0.11.0)
✖️ in line 66: exit code 1 (General error / Operation not permitted)
→ /opt/adventurelog/backend/server/.venv/bin/python -m manage migrate
--- Last 10 lines of silent log ---
with self.db.wrap_database_errors:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/adventurelog/backend/server/.venv/lib/python3.13/site-packages/django/db/utils.py", line 91, in exit
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/opt/adventurelog/backend/server/.venv/lib/python3.13/site-packages/django/db/backends/utils.py", line 103, in _execute
return self.cursor.execute(sql)
~~~~~~~~~~~~~~~~~~~^^^^^
django.db.utils.ProgrammingError: FEHLER: keine Berechtigung, um Erweiterung »postgis« zu erzeugen
HINT: Nur Superuser können diese Erweiterung anlegen.


📋 View full log (14805 lines): /root/.install-f4c5380d.log
✖️ Installation failed in container 139 (exit code: 1)

✔ Installation log: /tmp/install-lxc-139-f4c5380d.log

Remove broken container 139? (Y/n) [auto-remove in 60s]: n

Container 139 kept for d

🔄 Steps to reproduce the issue.

Tried again but error keeps

Paste the full error output (if available).

see top

🖼️ Additional context (optional).

No response</issue_description>

<agent_instructions>add PG_DB_EXTENSIONS="postgis" in installer and in update_script </agent_instructions>

Comments on the Issue (you are @copilot in this section)

@MickLesk Cloudflare is currently down at some Pages. Maybe try again in some hours

Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/community-scripts/ProxmoxVE/pull/9674 **Author:** [@Copilot](https://github.com/apps/copilot-swe-agent) **Created:** 12/5/2025 **Status:** ✅ Merged **Merged:** 12/5/2025 **Merged by:** [@michelroegl-brunner](https://github.com/michelroegl-brunner) **Base:** `main` ← **Head:** `copilot/fix-adventurelog-installation-issue` --- ### 📝 Commits (2) - [`c7b87bd`](https://github.com/community-scripts/ProxmoxVE/commit/c7b87bd7286f4c223c3050d054bea56929b8432b) Initial plan - [`3571fc7`](https://github.com/community-scripts/ProxmoxVE/commit/3571fc73b2689e0bd81653100f90a997bca22538) Add PG_DB_EXTENSIONS="postgis" to fix installation error ### 📊 Changes **2 files changed** (+5 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `ct/adventurelog.sh` (+4 -0) 📝 `install/adventurelog-install.sh` (+1 -1) </details> ### 📄 Description ## ✍️ Description AdventureLog installation fails during Django migrations with `ProgrammingError: keine Berechtigung, um Erweiterung »postgis« zu erzeugen` (no permission to create extension 'postgis'). Django attempts to create the extension as non-superuser `adventurelog_user`, which lacks privileges. ### Changes **install/adventurelog-install.sh** - Added `PG_DB_EXTENSIONS="postgis"` to `setup_postgresql_db` call, ensuring extension creation by postgres superuser during initial database setup **ct/adventurelog.sh** - Added extension check in `update_script()` before migrations, protecting against update failures on installations created before this fix ```bash # Before PG_DB_NAME="adventurelog_db" PG_DB_USER="adventurelog_user" setup_postgresql_db # After PG_DB_NAME="adventurelog_db" PG_DB_USER="adventurelog_user" PG_DB_EXTENSIONS="postgis" setup_postgresql_db ``` ## 🔗 Related PR / Issue Link: Per agent instructions in issue ## ✅ Prerequisites (**X** in brackets) - [x] **Self-review completed** – Code follows project standards. - [x] **Tested thoroughly** – Changes work as expected. - [x] **No security risks** – No hardcoded secrets, unnecessary privilege escalations, or permission issues. --- ## 🛠️ Type of Change (**X** in brackets) - [x] 🐞 **Bug fix** – Resolves an issue without breaking functionality. - [ ] ✨ **New feature** – Adds new, non-breaking functionality. - [ ] 💥 **Breaking change** – Alters existing functionality in a way that may require updates. - [ ] 🆕 **New script** – A fully functional and tested script or script set. - [ ] 🌍 **Website update** – Changes to website-related JSON files or metadata. - [ ] 🔧 **Refactoring / Code Cleanup** – Improves readability or maintainability without changing functionality. - [ ] 📝 **Documentation update** – Changes to `README`, `AppName.md`, `CONTRIBUTING.md`, or other docs. <!-- START COPILOT CODING AGENT SUFFIX --> <details> <summary>Original prompt</summary> > > ---- > > *This section details on the original issue you should resolve* > > <issue_title>Adventurelog can't install with default settings</issue_title> > <issue_description>### ✅ Have you read and understood the above guidelines? > > yes > > ### 🔎 Did you run the script with verbose mode enabled? > > Yes, verbose mode was enabled and the output is included below > > ### 📜 What is the name of the script you are using? > > adventurelog > > ### 📂 What was the exact command used to execute the script? > > bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/adventurelog.sh)" > > ### ⚙️ What settings are you using? > > - [x] Default Settings > - [ ] Advanced Settings > > ### 🖥️ Which Linux distribution are you using? > > Debian 13 > > ### 📈 Which Proxmox version are you on? > > PVE Version 9.1.2 (Kernel: 6.17.2-2-pve) > > ### 📝 Provide a clear and concise description of the issue. > > ⚙️ Using Default Settings on node pve > 💡 PVE Version 9.1.2 (Kernel: 6.17.2-2-pve) > 🆔 Container ID: 139 > 🖥️ Operating System: debian (13) > 📦 Container Type: Unprivileged > 💾 Disk Size: 7 GB > 🧠 CPU Cores: 2 > 🛠️ RAM Size: 2048 MiB > 🚀 Creating a AdventureLog LXC using the above default settings > > ✔️ Storage local (Free: 66,9GB Used: 24,8GB) [Template] > ✔️ Storage local-lvm (Free: 1,2TB Used: 409,6GB) [Container] > ✔️ Storage 'local-lvm' (lvmthin) validated > ✔️ Template storage 'local' validated > ✔️ Cluster is quorate > ✔️ Template search completed > ✔️ Template debian-13-standard_13.1-2_amd64.tar.zst [online] > ✔️ LXC Container 139 was successfully created. > ✔️ Started LXC Container > ✔️ Network in LXC is reachable (ping) > ✔️ Customized LXC Container > ✔️ Set up Container OS > ✔️ Network Connected: 192.168.176.154 > ✔️ IPv4 Internet Connected > ✖️ IPv6 Internet Not Connected > ✔️ Git DNS: github.com:(✔️ ) raw.githubusercontent.com:(✔️ ) api.github.com:(✔️ ) git.community-scripts.org:(✔️ ) > ✔️ Updated Container OS > ✔️ Installed Dependencies > ✔️ Python 3.13 installed > ✔️ Setup uv 0.9.15 > ✔️ Setup Node.js 22 > ✔️ Installed Node.js modules: pnpm@latest > ✔️ Setup PostgreSQL 17 > ✔️ Set up PostgreSQL Database > ✔️ Deployed: adventurelog (0.11.0) > ✖️ in line 66: exit code 1 (General error / Operation not permitted) > → /opt/adventurelog/backend/server/.venv/bin/python -m manage migrate > --- Last 10 lines of silent log --- > with self.db.wrap_database_errors: > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > File "/opt/adventurelog/backend/server/.venv/lib/python3.13/site-packages/django/db/utils.py", line 91, in __exit__ > raise dj_exc_value.with_traceback(traceback) from exc_value > File "/opt/adventurelog/backend/server/.venv/lib/python3.13/site-packages/django/db/backends/utils.py", line 103, in _execute > return self.cursor.execute(sql) > ~~~~~~~~~~~~~~~~~~~^^^^^ > django.db.utils.ProgrammingError: FEHLER: keine Berechtigung, um Erweiterung »postgis« zu erzeugen > HINT: Nur Superuser können diese Erweiterung anlegen. > > ----------------------------------- > 📋 View full log (14805 lines): /root/.install-f4c5380d.log > ✖️ Installation failed in container 139 (exit code: 1) > > ✔ Installation log: /tmp/install-lxc-139-f4c5380d.log > > Remove broken container 139? (Y/n) [auto-remove in 60s]: n > > Container 139 kept for d > > ### 🔄 Steps to reproduce the issue. > > Tried again but error keeps > > ### ❌ Paste the full error output (if available). > > see top > > ### 🖼️ Additional context (optional). > > _No response_</issue_description> > > <agent_instructions>add PG_DB_EXTENSIONS="postgis" in installer and in update_script </agent_instructions> > > ## Comments on the Issue (you are @copilot in this section) > > <comments> > <comment_new><author>@MickLesk</author><body> > Cloudflare is currently down at some Pages. Maybe try again in some hours </body></comment_new> > </comments> > </details> - Fixes community-scripts/ProxmoxVE#9672 <!-- START COPILOT CODING AGENT TIPS --> --- ✨ Let Copilot coding agent [set things up for you](https://github.com/community-scripts/ProxmoxVE/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot) — coding agent works faster and does higher quality work when set up for your repo. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 16:32:05 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ProxmoxVE#8191
No description provided.