Repository navigation
NodeFlow 2.0.1 - #14
Merged
Merged
Conversation
The route editor sends sticky_mode "none" for a pool route with one plain server and uses the legacy single-target payload (servers: []). The flat path (resolveStickyMode) only accepted source/source_table/leastconn/ roundrobin, so creating such a route failed with "sticky_mode must be source, source_table, leastconn or roundrobin". A servers[] payload with a single plain server is folded into the same path and failed the same way. Treat "none" on the flat path as the legacy "no stickiness" value (roundrobin, as in the 000052 backfill), so it is stored and rendered byte-identically to the same route saved without sticky_mode.
- custom_fragment: apply the 512-byte line limit to the directive without indentation. Stored fragments are indented by four spaces and the renderer re-validates them, so a 509-512 byte directive was accepted on save and then failed the whole node config with invalid_route_set. - nodes: reject names longer than 200 characters (nodes.name CHECK) in POST/PUT /api/v1/nodes and bootstrap validation instead of failing with a 500 / at the create_node job stage; cap the node name inputs at 200.
The editor accepted values that validateRoute rejects with a 400 on save: - IPv4 with leading zeros (01.2.3.4) and malformed IPv6 (1:::2, 1::2::3, :::, 7 groups) in listener IP, server host, preferred IP, per-IP weights and accept_proxy_from; parse IPv6 like Go net.ParseIP. - host names whose last label is numeric or 0x-hex (backend.1, host.0x1f). - accept_proxy_from x.x.x.x/0 other than 0.0.0.0/0 or ::/0, and IPv4-mapped IPv6 prefixes (::ffff:0:0/96). - the same per-IP weight address in two IPv6 spellings. - failover with a DNS-pool reserve (or a preferred IP) plus other reserves. - server names colliding with DNS-pool slot names (<pool>_<N>). - expert-layer balance/hash-type/server/server-template/default-server on a DNS-pool route. - control characters (tab) in the route name. The 512-byte expert line limit now counts the directive without its indentation, matching the backend.
POST /api/v1/agent-releases rejects versions outside
^[0-9A-Za-z][0-9A-Za-z._+-]{0,63}$ with 'invalid release version or
platform' only after the whole binary was uploaded; validate the version
field up front with the same pattern.
frontend/tests/routeMatrix.ts builds route editor drafts over every control (SNI/fallback, listener, accept PROXY, 1/2+/DNS-pool/unix servers, pool/failover layouts, distribution, algorithms with tuning, health check, PROXY v1/v2, slowstart, quota, bandwidth, expert layer), boundary values and stored routes from every schema era, keeps only drafts the editor accepts and serialises their routePayload() output to internal/panel/testdata/ui_route_payloads.json.gz. The npm test fails when the fixture is stale (UPDATE_UI_FIXTURES=1 npm test regenerates it). TestUIRoutePayloadsPassBackendValidation feeds every payload through validateRoute and the renderer and checks that an existing route saved unchanged renders byte-for-byte identically. The flat sticky_mode none rejection is skipped as known (fixed in fix-sticky).
Small nodes fill their disks with /var/log/haproxy.log (rsyslog writes every TCP connection). Add a node setting «Логи соединений HAProxy», stored as nodes.metadata.haproxy_logs (absent = on, no migration). - Renderer: with the setting off, drop the global 'log' targets, 'log global', 'option tcplog', 'option dontlognull' and the per-frontend 'option tcplog'. Default output is byte-identical (golden files unchanged); off renders as v21 and records haproxy_logs=false in the revision metadata. - API: node responses carry haproxy_logs; POST/PUT /api/v1/nodes accept a boolean haproxy_logs (or metadata.haproxy_logs) and reject other types. An update whose metadata omits the key keeps the stored value. - Toggling publishes a new route revision in the same transaction, so the Agent applies it with a graceful reload. - UI: switch in the node settings dialog.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
NodeFlow 2.0.1
Panel 2.0.1 · Node Agent 2.0.1 · HAProxy renderer v21
Исправительный релиз поверх 2.0.0 и одна новая настройка ноды. Миграций базы данных нет, существующие маршруты и ноды рендерятся байт в байт как в 2.0.0.
Новое
haproxy_logsу ноды, хранится вnodes.metadata). По умолчанию включено — конфиг не меняется. Выключено: изhaproxy.cfgэтой ноды убираютсяlog /dev/log …вglobal,log global,option tcplogиoption dontlognullвdefaultsиoption tcplogу frontend'ов, поэтому rsyslog больше не пишет каждое соединение в/var/log/haproxy.log. Нужно для нод с маленьким диском. Сообщения HAProxy о запуске и ошибках конфигурации по-прежнему попадают в journal. Переключение публикует новую ревизию конфига ноды, Agent применяет её обычным reload без разрыва соединений. Клиенты API, которые не передают поле, не сбрасывают сохранённое значение.Исправления
sticky_mode must be source, source_table, leastconn or roundrobin. Редактор отправляетsticky_mode: noneдля одиночного сервера (и для одного домена в режиме DNS-пула), а проверка одиночных маршрутов не принималаnone. Теперьnoneпринимается и означает «без закрепления», как у маршрутов с несколькими серверами. Если открыть и сохранить существующий маршрут из одного сервера с закреплением клиента, из его backend исчезнут строкиbalance/stick: для одного сервера они ничего не меняли.01.2.3.4) и некорректные IPv6 (1:::2,:::) в адресе прослушивания, адресах серверов, основном IP, весах IP и доверенных адресах PROXY;backend.1,host.0x1f) в SNI и адресах серверов;10.0.0.0/0(разрешены только0.0.0.0/0и::/0) и::ffff:0:0/96;xиx_1);balance,server,default-server,hash-type,server-templateв ручных директивах backend при DNS-пуле;invalid_route_set, 422). Лимит длины строки теперь считается без отступа, ранее рендерившиеся конфиги не меняются.Обновление с 2.0.0
Panel. Повторно запустите установщик:
curl -fsSL https://raw.githubusercontent.com/NodeFlow-dev/nodeflow/main/install.sh | sudo shВручную: в
/opt/nodeflow/.envукажитеNODEFLOW_VERSION=2.0.1и выполнитеdocker compose pull && docker compose up -d. Миграций нет, откат — вернутьNODEFLOW_VERSION=2.0.0.Node Agent. «Настройки → Node Agent» → «Обновить до 2.0.1». Код Agent не менялся (обновление выравнивает версию). Переключатель логов работает и с Agent 2.0.0.
Обновляетесь с 1.0.x — сначала прочитайте заметки к релизу 2.0.0: там однократный drop-in systemd для pipe-буферов ядра.
Файлы релиза
NodeFlow-Panel-2.0.1-Agent-2.0.1-install-kit.tar.gz— install kit.nodeflow-node-agent-2.0.1-linux-amd64,nodeflow-node-agent-2.0.1-linux-arm64— бинарники Node Agent.Panel поставляется образом
ghcr.io/nodeflow-dev/nodeflow-panel:2.0.1(linux/amd64 и linux/arm64). SHA-256 каждого файла — полеdigestв API релиза;install.shиinstall-node.shсверяют его сами.