fix(updater): remove log redirection from helper to avoid nonexistent dir error

This commit is contained in:
2026-02-22 15:22:43 +01:00
parent 94d0b989d0
commit e0aa51bac3
5 changed files with 60 additions and 52 deletions

View File

@@ -310,8 +310,7 @@ def trigger_update(config: Any, db_path: str) -> dict:
"sleep 3 && "
"docker compose -p netbirdmsp-appliance "
f"-f {host_source_dir}/docker-compose.yml "
"up --force-recreate --no-deps -d netbird-msp-appliance "
f">> {host_source_dir}/app/backups/updater.log 2>&1"
"up --force-recreate --no-deps -d netbird-msp-appliance"
),
]
try:

8
containers.txt Normal file
View File

@@ -0,0 +1,8 @@
msp-updater Exited (2) 11 seconds ago netbirdmsp-appliance-netbird-msp-appliance:latest 15 seconds ago
netbird-msp-appliance Up 6 minutes (healthy) 07c60529cf9f 6 minutes ago
netbird-kunde1-caddy Up 2 hours caddy:2-alpine 3 hours ago
netbird-kunde1-signal Up 2 hours netbirdio/signal:latest 3 hours ago
netbird-kunde1-dashboard Up 2 hours netbirdio/dashboard:latest 3 hours ago
netbird-kunde1-relay Up 2 hours netbirdio/relay:latest 3 hours ago
netbird-kunde1-management Up 2 hours netbirdio/management:latest 3 hours ago
docker-socket-proxy Up 2 hours tecnativa/docker-socket-proxy:latest 3 days ago

View File

@@ -1,50 +1,40 @@
INFO: 127.0.0.1:35822 - "GET /api/health HTTP/1.1" 200 OK
INFO: 127.0.0.1:33932 - "GET /api/health HTTP/1.1" 200 OK
INFO: 127.0.0.1:50284 - "GET /api/health HTTP/1.1" 200 OK
INFO: 172.18.0.1:49612 - "GET / HTTP/1.1" 200 OK
INFO: 172.18.0.1:49612 - "GET /css/styles.css HTTP/1.1" 304 Not Modified
INFO: 172.18.0.1:49610 - "GET /js/i18n.js HTTP/1.1" 304 Not Modified
INFO: 172.18.0.1:49632 - "GET /js/app.js HTTP/1.1" 200 OK
INFO: 172.18.0.1:49632 - "GET /lang/en.json HTTP/1.1" 200 OK
INFO: 172.18.0.1:49632 - "GET /favicon.ico HTTP/1.1" 404 Not Found
INFO: 172.18.0.1:49610 - "GET /lang/de.json HTTP/1.1" 200 OK
INFO: 172.18.0.1:49610 - "GET /api/settings/branding HTTP/1.1" 200 OK
INFO: 172.18.0.1:49610 - "GET /api/auth/azure/config HTTP/1.1" 200 OK
INFO: 127.0.0.1:59642 - "GET /api/health HTTP/1.1" 200 OK
2026-02-22 13:56:39,498 [WARNING] passlib.handlers.bcrypt: (trapped) error reading bcrypt version
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/passlib/handlers/bcrypt.py", line 620, in _load_backend_mixin
version = _bcrypt.__about__.__version__
^^^^^^^^^^^^^^^^^
AttributeError: module 'bcrypt' has no attribute '__about__'
2026-02-22 13:56:39,929 [INFO] app.routers.auth: User admin logged in (provider: local).
INFO: 172.18.0.1:36450 - "POST /api/auth/login HTTP/1.1" 200 OK
INFO: 172.18.0.1:36462 - "GET /api/customers?page=1&per_page=25 HTTP/1.1" 200 OK
INFO: 172.18.0.1:36450 - "GET /api/monitoring/status HTTP/1.1" 200 OK
INFO: 127.0.0.1:54154 - "GET /api/health HTTP/1.1" 200 OK
INFO: 172.18.0.1:54490 - "GET /api/settings/system HTTP/1.1" 200 OK
INFO: 172.18.0.1:54490 - "GET /api/auth/mfa/status HTTP/1.1" 200 OK
2026-02-22 13:57:10,815 [INFO] httpx: HTTP Request: GET https://git.0x26.ch/api/v1/repos/BurgerGames/NetBirdMSP-Appliance/branches/unstable "HTTP/1.1 200 OK"
2026-02-22 13:57:10,822 [INFO] httpx: HTTP Request: GET https://git.0x26.ch/api/v1/repos/BurgerGames/NetBirdMSP-Appliance/tags?limit=1 "HTTP/1.1 200 OK"
INFO: 172.18.0.1:57512 - "GET /api/settings/version HTTP/1.1" 200 OK
INFO: 127.0.0.1:52478 - "GET /api/health HTTP/1.1" 200 OK
INFO: 127.0.0.1:47310 - "GET /api/health HTTP/1.1" 200 OK
INFO: 127.0.0.1:47530 - "GET /api/health HTTP/1.1" 200 OK
INFO: 127.0.0.1:41918 - "GET /api/health HTTP/1.1" 200 OK
INFO: 127.0.0.1:45108 - "GET /api/health HTTP/1.1" 200 OK
2026-02-22 13:59:53,200 [INFO] app.services.update_service: Database backed up to /app/backups/netbird_msp_20260222_135953.db
2026-02-22 13:59:54,630 [INFO] app.services.update_service: git pull succeeded: Already up to date.
2026-02-22 13:59:54,740 [INFO] app.services.update_service: Rebuilding with GIT_TAG=alpha-1.4 GIT_COMMIT=ef691a4 GIT_BRANCH=unstable
2026-02-22 13:59:54,741 [INFO] app.services.update_service: Phase A: building new image …
2026-02-22 14:03:51,162 [INFO] app.services.update_service: Phase A complete — image built successfully.
2026-02-22 14:03:51,242 [INFO] app.services.update_service: Host source directory: /home/sascha/NetBirdMSP-Appliance
2026-02-22 14:03:52,032 [INFO] app.services.update_service: Phase B: updater container started — this container will restart in ~5s.
2026-02-22 14:03:52,033 [INFO] app.routers.settings: Update triggered by admin.
INFO: 172.18.0.1:53362 - "POST /api/settings/update HTTP/1.1" 200 OK
INFO: 172.18.0.1:35312 - "POST /api/settings/update HTTP/1.1" 401 Unauthorized
INFO: 127.0.0.1:35534 - "GET /api/health HTTP/1.1" 200 OK
2026-02-22 14:04:22,366 [INFO] httpx: HTTP Request: GET https://git.0x26.ch/api/v1/repos/BurgerGames/NetBirdMSP-Appliance/branches/unstable "HTTP/1.1 200 OK"
2026-02-22 14:04:22,376 [INFO] httpx: HTTP Request: GET https://git.0x26.ch/api/v1/repos/BurgerGames/NetBirdMSP-Appliance/tags?limit=1 "HTTP/1.1 200 OK"
INFO: 172.18.0.1:53602 - "GET /api/settings/version HTTP/1.1" 200 OK
INFO: 127.0.0.1:51374 - "GET /api/health HTTP/1.1" 200 OK
INFO: 127.0.0.1:48640 - "GET /api/health HTTP/1.1" 200 OK
INFO: Application startup complete.
INFO: Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
INFO: 127.0.0.1:60204 - "GET /api/health HTTP/1.1" 200 OK
INFO: 127.0.0.1:37702 - "GET /api/health HTTP/1.1" 200 OK
INFO: 127.0.0.1:34872 - "GET /api/health HTTP/1.1" 200 OK
INFO: 127.0.0.1:49808 - "GET /api/health HTTP/1.1" 200 OK
2026-02-22 14:16:10,300 [INFO] httpx: HTTP Request: GET https://git.0x26.ch/api/v1/repos/BurgerGames/NetBirdMSP-Appliance/branches/unstable "HTTP/1.1 200 OK"
2026-02-22 14:16:10,306 [INFO] httpx: HTTP Request: GET https://git.0x26.ch/api/v1/repos/BurgerGames/NetBirdMSP-Appliance/tags?limit=1 "HTTP/1.1 200 OK"
INFO: 172.18.0.1:53698 - "GET /api/settings/version HTTP/1.1" 200 OK
2026-02-22 14:16:13,790 [INFO] httpx: HTTP Request: GET https://git.0x26.ch/api/v1/repos/BurgerGames/NetBirdMSP-Appliance/branches/unstable "HTTP/1.1 200 OK"
2026-02-22 14:16:13,796 [INFO] httpx: HTTP Request: GET https://git.0x26.ch/api/v1/repos/BurgerGames/NetBirdMSP-Appliance/tags?limit=1 "HTTP/1.1 200 OK"
INFO: 172.18.0.1:53698 - "GET /api/settings/version HTTP/1.1" 200 OK
INFO: 127.0.0.1:55164 - "GET /api/health HTTP/1.1" 200 OK
INFO: 172.18.0.1:55590 - "GET / HTTP/1.1" 200 OK
INFO: 172.18.0.1:55590 - "GET /js/app.js HTTP/1.1" 304 Not Modified
INFO: 172.18.0.1:55590 - "GET /lang/en.json HTTP/1.1" 304 Not Modified
INFO: 172.18.0.1:55590 - "GET /lang/de.json HTTP/1.1" 304 Not Modified
INFO: 172.18.0.1:55590 - "GET /favicon.ico HTTP/1.1" 404 Not Found
INFO: 172.18.0.1:55590 - "GET /api/settings/branding HTTP/1.1" 200 OK
INFO: 172.18.0.1:55590 - "GET /api/auth/azure/config HTTP/1.1" 200 OK
INFO: 172.18.0.1:55590 - "GET /api/auth/me HTTP/1.1" 200 OK
INFO: 172.18.0.1:55590 - "GET /api/monitoring/status HTTP/1.1" 200 OK
INFO: 172.18.0.1:55588 - "GET /api/customers?page=1&per_page=25 HTTP/1.1" 200 OK
INFO: 172.18.0.1:37544 - "GET /api/settings/system HTTP/1.1" 200 OK
INFO: 172.18.0.1:37544 - "GET /api/auth/mfa/status HTTP/1.1" 200 OK
2026-02-22 14:16:58,896 [INFO] httpx: HTTP Request: GET https://git.0x26.ch/api/v1/repos/BurgerGames/NetBirdMSP-Appliance/branches/unstable "HTTP/1.1 200 OK"
2026-02-22 14:16:58,906 [INFO] httpx: HTTP Request: GET https://git.0x26.ch/api/v1/repos/BurgerGames/NetBirdMSP-Appliance/tags?limit=1 "HTTP/1.1 200 OK"
INFO: 172.18.0.1:37552 - "GET /api/settings/version HTTP/1.1" 200 OK
INFO: 127.0.0.1:57972 - "GET /api/health HTTP/1.1" 200 OK
INFO: 127.0.0.1:59030 - "GET /api/health HTTP/1.1" 200 OK
2026-02-22 14:17:44,793 [INFO] app.services.update_service: Database backed up to /app/backups/netbird_msp_20260222_141744.db
2026-02-22 14:17:45,142 [INFO] app.services.update_service: git pull succeeded: Already up to date.
2026-02-22 14:17:45,160 [INFO] app.services.update_service: Rebuilding with GIT_TAG=alpha-1.5 GIT_COMMIT=94d0b98 GIT_BRANCH=unstable
2026-02-22 14:17:45,160 [INFO] app.services.update_service: Phase A: building new image …
2026-02-22 14:20:39,486 [INFO] app.services.update_service: Phase A complete — image built successfully.
2026-02-22 14:20:39,507 [INFO] app.services.update_service: Host source directory: /home/sascha/NetBirdMSP-Appliance
2026-02-22 14:20:40,068 [INFO] app.services.update_service: Phase B: updater container started — this container will restart in ~5s.
2026-02-22 14:20:40,069 [INFO] app.routers.settings: Update triggered by admin.
INFO: 172.18.0.1:51826 - "POST /api/settings/update HTTP/1.1" 200 OK
INFO: 127.0.0.1:36054 - "GET /api/health HTTP/1.1" 200 OK

10
out.txt Normal file
View File

@@ -0,0 +1,10 @@
[unstable 94d0b98] alpha-1.5: trigger update
remote:
remote: Create a new pull request for 'unstable':
remote: https://git.0x26.ch/BurgerGames/NetBirdMSP-Appliance/pulls/new/unstable
remote:
remote: .. Processing 2 references
remote: Processed 2 references in total
To https://git.0x26.ch/BurgerGames/NetBirdMSP-Appliance.git
2780b06..94d0b98 unstable -> unstable
* [new tag] alpha-1.5 -> alpha-1.5

1
update_helper.txt Normal file
View File

@@ -0,0 +1 @@
sh: 1: cannot create /home/sascha/NetBirdMSP-Appliance/app/backups/updater.log: Directory nonexistent