LXC installs: announce <hostname>.local with Avahi, hub on port 80
In an LXC (lxc mode on a Proxmox node, or native mode inside an LXC), the installer now: - installs avahi-daemon (with the rlimit-nproc fix for unprivileged containers), so the container answers at <hostname>.local, and lists the web UI as a _http._tcp service - serves the hub on port 80 (CAP_NET_BIND_SERVICE for the netmon user) unless HOST_PORT is given, so http://netmon-hub.local works without a port - runs the inner install with LANG/LC_ALL=C.UTF-8 (no locale warnings from the node's LANG) and prints one summary, with the .local address When the UI is opened by a .local name, the Add probe command uses the hub's own IP for HUB_URL, since Linux probes usually can't resolve .local. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
a96ae4e825
commit
cd2deda996
9 changed files with 136 additions and 17 deletions
|
|
@ -86,3 +86,9 @@ def test_arp_neighbors_become_clients(hub):
|
|||
send(hub, a["token"], neighbors=[{"ip": "192.168.1.50", "mac": "AA:BB:CC:00:11:22"}])
|
||||
clients = hub.get("/api/clients").json()["clients"]
|
||||
assert clients[0]["key"] == "aa:bb:cc:00:11:22" and clients[0]["online"] and clients[0]["sources"] == ["arp"]
|
||||
|
||||
|
||||
def test_hub_lan_url_for_native_installs(hub, monkeypatch):
|
||||
assert hub.get("/api/probes").json()["hub_lan_url"] == "" # docker: the server address is the bridge's
|
||||
monkeypatch.setenv("INSTALL_MODE", "native")
|
||||
assert hub.get("/api/probes").json()["hub_lan_url"] == "http://testserver"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue