Commit 6fa6842
Paul C
v24.57.19: terminal tabs route to the right node (2nd tab no longer hijacks the 1st's host)
THE actual cause of "open one container terminal, then a different-type
one in the same window runs the wrong runtime" (pct enter on a native
LXC -> "vmid type check failed - got gateway"; lxc-attach on a Proxmox
LXC -> "Failed to get init pid"). Closing the window and reopening fresh
worked, which was the tell.
The pop-out terminal (console.html) passes its node list as a STATIC
snapshot taken at mount. console.html synthesizes a node for the INITIAL
tab's node_id when it isn't in that snapshot (so tab 1 always routes
right -- hence "fresh window is fine"), but addTab() for every later tab
did nodeById(o.nodeId) || selfNode() -- and selfNode() falls back to
nodes[0]. So a 2nd tab whose node wasn't in the frozen snapshot silently
routed to the 1st tab's / self node and ran that host's runtime against
the wrong container.
Fix: resolveNode() in terminal-console.js -- an explicit nodeId is never
downgraded to selfNode()/nodes[0]; if it isn't resolvable it's honoured
as a remote node by id (routes to /ws/remote-console/<id>), the same
synthetic-node treatment console.html already gave tab 1. Used by
addTab, the initial-tab build, and descriptorKey (so dedup stays
consistent). The inline terminal (function-based, always-current node
list) resolves normally -- no behaviour change there.
Completes the v24.57.17 pct-enter backend fix: routing now lands a
Proxmox container on its PVE host (is_proxmox -> pct enter) and a native
LXC on its host (lxc-attach), instead of both inheriting tab 1's host.1 parent efb83a3 commit 6fa6842
3 files changed
Lines changed: 25 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
137 | 154 | | |
138 | 155 | | |
139 | 156 | | |
| |||
867 | 884 | | |
868 | 885 | | |
869 | 886 | | |
870 | | - | |
| 887 | + | |
871 | 888 | | |
872 | 889 | | |
873 | 890 | | |
| |||
888 | 905 | | |
889 | 906 | | |
890 | 907 | | |
891 | | - | |
892 | | - | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
893 | 912 | | |
894 | 913 | | |
895 | 914 | | |
| |||
924 | 943 | | |
925 | 944 | | |
926 | 945 | | |
927 | | - | |
| 946 | + | |
928 | 947 | | |
929 | 948 | | |
930 | 949 | | |
| |||
0 commit comments