Docker WebUI links are not filled in (`http://[IP]:[PORT:8080]/`) when the server's IPv4 address is on a VLAN sub-interface such as `br0.60`
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- Mezza giornata
- Idoneità per principianti
- 62/100
Direzione di ricerca
Start in emhttp/plugins/dynamix.docker.manager/include/DockerClient.php, at DockerUtil::host(), which reads the IPv4 address of a single interface, and at DockerTemplates::getAllInfo(), where an empty IP leaves [IP] and [PORT:n] unreplaced. Also check the strpos check that keeps a WebUI URL already containing the server address. Done when a bridge with a VLAN sub-interface address and a hand-typed URL with [PORT:n] both produce a working link.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Version: 7.3.0 (code unchanged in 7.3.4 and current master)
What happens: every container's WebUI link on the Docker tab opens the raw template, e.g. http://[IP]:[PORT:8080]/, which no browser can open. Templates where the user typed the server address by hand (http://192.168.60.10:[PORT:8080]/) are not filled in either: the port placeholder stays.
Setup that triggers it: the server's management IPv4 address lives on a VLAN sub-interface of the bridge, not on the bridge itself. Here: br0 has no IPv4 address, br0.60 has 192.168.60.10/24 (Settings → Network → VLANs, address only on the VLAN, untagged network without an address). Docker containers on bridge with published ports, on host, and on custom bridge networks are all affected.
Cause (emhttp/plugins/dynamix.docker.manager/include/DockerClient.php):
DockerUtil::port()only triesbr0,bond0,eth0,wlan0, andDockerUtil::host()then reads the IPv4 address of that one interface withip -br -4 addr show $port scope global. When the address is onbr0.60,host()returns an empty string. InDockerTemplates::getAllInfo()an empty$ipmeans the template URL is kept as is, so[IP]and[PORT:n]are never replaced.- Separately, in
getAllInfo()(line 365 inmaster):strpos($tmp['url'],$ip)!==false ? $tmp['url'] : $this->getControlURL(...). If the WebUI string already contains the server address, it is kept as is, also when it still holds a[PORT:n]placeholder. So a hand-typedhttp://<server-ip>:[PORT:8080]/never gets its port filled in, even once the address lookup works.
Minimal fix we run locally (tested on 7.3.0):
// DockerUtil::host(): fall back to a VLAN sub-interface of the management port
$ip = exec("ip -br -4 addr show $port scope global | sed -r 's/\/[0-9]+//g' | awk '{print $3;exit}'");
return $ip ?: exec("ip -br -4 addr show scope global | sed -r 's/\/[0-9]+//g' | awk '$1 ~ /^$port\\./ {print $3;exit}'");
// getAllInfo(): only skip the fill-in when no [PORT:n] placeholder is left
$tmp['url'] = $ip ? (strpos($tmp['url'],$ip)!==false && !preg_match("%\[PORT:\d+\]%",$tmp['url']) ? $tmp['url'] : $this->getControlURL($ct, $ip, $tmp['url'])) : $tmp['url'];
In 7.3.4/master the same change applies inside the cached host() (return $cached = $ip ?: …). With both changes, all WebUI links on our server are built correctly again (host, bridge with port mapping, and custom bridge networks), without recreating any container or editing any template. port() is left alone on purpose: it also drives the docker.cfg network-key rename at the top of the file.
Expected: [IP] is filled with the server's management address wherever it lives (bridge, bond, or a VLAN sub-interface of either), and [PORT:n] is always filled in.
- Lingua principale
- PHP
- Stelle
- 266
- Fork
- 116
- Merge medio
- 1g 5h
- PR unite (30g)
- 4
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di unraid/webgui
-
CPU core labels missing for Low-Power E-cores on hybrid Intel CPUs (Arrow Lake-H) — get_intel_core_types() ignores /sys/devices/cpu_lowpowerForse già presa @dgongut l’ha presa oggi. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
unraid/webgui#2785 · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
rsyslog_config: "Mirror syslog to flash" rule is appended again on every Apply — each line written to the boot device N timesForse già presa @junkerderprovinz l’ha presa 38 giorni fa. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
I maintainer di solito rispondono entro 1 giorno
-
Notification e-mails are sent without Date and Message-ID headersForse già presa @nofuturekid l’ha presa 56 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
unraid/webgui#2781 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Static asset caching misses the Connect plugin's hashed bundle: ~144 JS chunks (8.5 MB) revalidate on every page loadForse già presa @davidcoulson l’ha presa 54 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di unraid/webgui
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
sonata-project/SonataAdminBundle#8426 ·
I maintainer di solito rispondono entro 1 giorno
-
good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
erkamyaman/rust-anything#942 ·
I maintainer di solito rispondono entro 1 giorno
-
area/plugins area/tests type/enhancement when/later
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: Axios Update NeededAperta0. Needs triage 35-feedback bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno