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`
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- PHP
- スター
- 266
- フォーク
- 116
- 平均マージ
- 1日 5時間
- マージ済み PR(30日)
- 4
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
unraid/webgui のほかの issue
-
CPU core labels missing for Low-Power E-cores on hybrid Intel CPUs (Arrow Lake-H) — get_intel_core_types() ignores /sys/devices/cpu_lowpower対応中かも @dgongut が今日担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
unraid/webgui#2785 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
rsyslog_config: "Mirror syslog to flash" rule is appended again on every Apply — each line written to the boot device N times対応中かも @junkerderprovinz が 38 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
メンテナーはふだん 1 日以内に返信
-
Notification e-mails are sent without Date and Message-ID headers対応中かも @nofuturekid が 56 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
unraid/webgui#2781 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Static asset caching misses the Connect plugin's hashed bundle: ~144 JS chunks (8.5 MB) revalidate on every page load対応中かも @davidcoulson が 54 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
sonata-project/SonataAdminBundle#8426 ·
メンテナーはふだん 1 日以内に返信
-
good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
erkamyaman/rust-anything#942 ·
メンテナーはふだん 1 日以内に返信
-
area/plugins area/tests type/enhancement when/later
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
0. Needs triage 35-feedback bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信