Skip to content

Commit d50cb85

Browse files
authored
Merge pull request #1097 from LibreQoE/fix_207
changes
2 parents 22614c8 + 1bf4f62 commit d50cb85

14 files changed

Lines changed: 150 additions & 9 deletions

docs-es/v2.0/configuration-advanced-es.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,17 @@ Si el modo integración está habilitado, los ciclos de refresco suelen ser due
7373
- Use edición manual/WebUI para ajustes operativos temporales.
7474
- Mantenga cambios permanentes en el sistema de integración, overrides de integración o flujo externo declarado.
7575

76+
### Modo de compilación de topología para archivos DIY/manuales
77+
78+
Para despliegues DIY/manuales que mantienen `network.json` y `ShapedDevices.csv`, use un modo que conserve jerarquía cuando los circuitos deban moldearse bajo los nombres `Parent Node` de `network.json`:
79+
80+
```toml
81+
[topology]
82+
compile_mode = "full"
83+
```
84+
85+
Use `compile_mode = "flat"` solo cuando la jerarquía no forme parte del plan de shaping. En modo flat, LibreQoS asigna los circuitos a colas generadas por CPU, como `Generated_PN_1`; el `Parent Node` original queda como referencia lógica, pero el padre efectivo de shaping en `shaping_inputs.json` será una cola generada con `resolution_source: "flat_bucket"`.
86+
7687
### Overrides en runtime (`lqos_overrides.json`)
7788

7889
LibreQoS también permite ajustes de runtime mediante `lqos_overrides.json` en el `lqos_directory`.

docs-es/v2.0/operating-modes-es.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ Comportamiento clave:
2626
- Su flujo externo es donde deben hacerse los cambios permanentes.
2727
- Las ediciones por WebUI son válidas para cambios operativos rápidos.
2828
- Mantenga los cambios de largo plazo en sus scripts o automatización.
29+
- Use `topology.compile_mode = "full"` cuando los valores `Parent Node` de `ShapedDevices.csv` deban moldear bajo la jerarquía nombrada en `network.json`.
30+
- Use `flat` solo cuando las colas generadas por CPU, como `Generated_PN_1`, sean la topología de colas deseada.
2931

3032
## Modo archivos manuales
3133

@@ -35,6 +37,8 @@ Comportamiento clave:
3537
- Es más adecuado para redes pequeñas, pilotos cortos o soluciones temporales.
3638
- La WebUI le ayuda a validar lo que LibreQoS está usando.
3739
- Requiere disciplina manual porque no hay un sistema superior que mantenga esos archivos sincronizados.
40+
- Use `topology.compile_mode = "full"` cuando el shaping por padres superiores, AP o Sitio deba seguir `network.json`.
41+
- Si `shaping_inputs.json` muestra `resolution_source: "flat_bucket"`, LibreQoS está en modo flat y los circuitos mostrarán colas padre generadas en vez de los nombres de `network.json`.
3842

3943
## Lista de verificación de modo (antes de producción)
4044

docs-es/v2.0/quickstart-es.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,10 @@ Elija esta opción solo si otro proceso interno ya escribe archivos compatibles
107107
Haga esto ahora:
108108
1. Configure el comportamiento compartido de topología en `Integration - Common`.
109109
2. Publique `network.json` y `ShapedDevices.csv` desde su propio proceso.
110-
3. Recargue o espere al scheduler para que LibreQoS valide y use esos archivos.
110+
3. Use `topology.compile_mode = "full"` si los circuitos deben moldearse bajo la jerarquía nombrada por `Parent Node` en `network.json`.
111+
4. Recargue o espere al scheduler para que LibreQoS valide y use esos archivos.
112+
113+
No use `topology.compile_mode = "flat"` si espera que los valores `Parent Node` de `ShapedDevices.csv` creen colas superiores de shaping. En modo flat, LibreQoS asigna intencionalmente los circuitos a colas generadas por CPU, como `Generated_PN_1`.
111114

112115
Siguiente:
113116
- [Modos de operación y fuente de verdad](operating-modes-es.md)
@@ -120,8 +123,11 @@ Elija esta opción solo si quiere que LibreQoS mantenga directamente esos archiv
120123
Haga esto ahora:
121124
1. Construya `network.json`.
122125
2. Construya `ShapedDevices.csv`.
123-
3. Manténgalos con los editores de WebUI o con su flujo basado en archivos.
124-
4. Confirme que el scheduler acepta los datos y que aparece la topología esperada.
126+
3. Configure `topology.compile_mode = "full"` si la columna `Parent Node` debe moldear bajo los nodos nombrados en `network.json`.
127+
4. Manténgalos con los editores de WebUI o con su flujo basado en archivos.
128+
5. Confirme que el scheduler acepta los datos y que aparece la topología esperada.
129+
130+
Use `flat` solo cuando quiera colas generadas por CPU en vez de colas padre basadas en jerarquía.
125131

126132
Siguiente:
127133
- [Referencia avanzada de configuración](configuration-advanced-es.md)

docs-es/v2.0/troubleshooting-es.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,25 @@ journalctl -u lqosd --since "10 minutes ago"
216216

217217
Si sigue en blanco con tráfico normal, recolecte logs y abra issue.
218218

219+
### Los circuitos muestran Generated_PN en vez de nombres de network.json
220+
221+
Si un despliegue DIY/manual usa `network.json` y `ShapedDevices.csv`, pero la página de Circuitos muestra padres como `Generated_PN_1`, revise las entradas de shaping runtime:
222+
223+
```bash
224+
jq '.circuits[] | {circuit_id, logical_parent_node_name, effective_parent_node_name, resolution_source}' /opt/libreqos/state/shaping/shaping_inputs.json
225+
```
226+
227+
Si `resolution_source` es `flat_bucket`, LibreQoS está en modo de topología flat. Ese modo asigna intencionalmente los circuitos a colas generadas por CPU en vez de moldearlos bajo la jerarquía nombrada por `Parent Node`.
228+
229+
Para moldear circuitos bajo los nombres de nodo de `network.json`, configure:
230+
231+
```toml
232+
[topology]
233+
compile_mode = "full"
234+
```
235+
236+
Después recargue o espere al scheduler para regenerar `network.effective.json` y `shaping_inputs.json`.
237+
219238
### Colisión de promoción de nodo virtual (`network.json`)
220239

221240
Si `LibreQoS.py` falla con `Virtual node promotion collision: 'AP_A' already exists at this level.`, hay un nodo con `"virtual": true` cuyos hijos colisionan por nombre al promoverse.

docs/v2.0/configuration-advanced.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,17 @@ If built-in integration mode is enabled, the integration and topology compiler o
8888
- Use WebUI/manual edits for short operational adjustments only.
8989
- Put permanent changes in your integration system, integration overrides, or declared external source of truth workflow.
9090

91+
#### Topology compile mode for DIY/manual files
92+
93+
For DIY/manual deployments that maintain `network.json` and `ShapedDevices.csv`, use a hierarchy-preserving mode when circuits should shape under the `Parent Node` names from `network.json`:
94+
95+
```toml
96+
[topology]
97+
compile_mode = "full"
98+
```
99+
100+
Use `compile_mode = "flat"` only when hierarchy is not part of the shaping plan. In flat mode, LibreQoS assigns circuits to generated CPU bucket queues such as `Generated_PN_1`; the original `Parent Node` remains a logical reference, but the effective shaping parent in `shaping_inputs.json` will be a generated bucket with `resolution_source: "flat_bucket"`.
101+
91102
#### Static queue visibility policy
92103

93104
Current builds separate logical topology from queue-visible topology.

docs/v2.0/operating-modes.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ Key behavior:
4343
- Your external workflow is where permanent changes belong.
4444
- WebUI edits are fine for quick operational changes.
4545
- Keep your long-term changes in your own scripts or automation.
46+
- Use `topology.compile_mode = "full"` when the `Parent Node` values in `ShapedDevices.csv` should shape under the named hierarchy in `network.json`.
47+
- Use `flat` only when generated CPU bucket queues such as `Generated_PN_1` are the intended queue layout.
4648

4749
## Manual Files Mode
4850

@@ -52,6 +54,8 @@ Key behavior:
5254
- Best fit for small networks, short pilots, or temporary workarounds.
5355
- WebUI helps you validate what LibreQoS is using.
5456
- Manual discipline matters because there is no upstream system keeping those files in sync for you.
57+
- Use `topology.compile_mode = "full"` when top-level or AP/Site parent shaping should follow `network.json`.
58+
- If `shaping_inputs.json` shows `resolution_source: "flat_bucket"`, LibreQoS is in flat mode and circuits will show generated parent queues instead of the names from `network.json`.
5559

5660
## Mode Declaration Checklist (Before Go-Live)
5761

docs/v2.0/quickstart.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,10 @@ Choose this only if another internal process already writes LibreQoS-compatible
102102
Do this now:
103103
1. Configure shared topology behavior under `Integration - Common`.
104104
2. Publish `network.json` and `ShapedDevices.csv` from your own process.
105-
3. Reload or wait for the scheduler so LibreQoS can validate and use those files.
105+
3. Use `topology.compile_mode = "full"` if circuits should shape under the named `Parent Node` hierarchy from `network.json`.
106+
4. Reload or wait for the scheduler so LibreQoS can validate and use those files.
107+
108+
Do not use `topology.compile_mode = "flat"` when you expect `Parent Node` values from `ShapedDevices.csv` to create top-level shaping queues. In flat mode, LibreQoS intentionally assigns circuits to generated CPU bucket queues such as `Generated_PN_1`.
106109

107110
Next:
108111
- [Operating Modes and Source of Truth](operating-modes.md)
@@ -115,8 +118,11 @@ Choose this only if you intentionally want LibreQoS to own the files directly.
115118
Do this now:
116119
1. Build `network.json`.
117120
2. Build `ShapedDevices.csv`.
118-
3. Use the WebUI editors or file-based workflow to maintain them.
119-
4. Confirm the scheduler accepts the data and the expected topology appears.
121+
3. Set `topology.compile_mode = "full"` if the `Parent Node` column should shape under the named nodes in `network.json`.
122+
4. Use the WebUI editors or file-based workflow to maintain them.
123+
5. Confirm the scheduler accepts the data and the expected topology appears.
124+
125+
Use `flat` only when you want generated CPU bucket queues instead of hierarchy-based parent queues.
120126

121127
Next:
122128
- [Advanced Configuration Reference](configuration-advanced.md)

docs/v2.0/topology-data-flow.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,15 @@ Operator-managed files remain the ingress contract.
110110
- `network.effective.json`
111111
- `shaping_inputs.json`
112112

113+
For DIY/manual deployments that expect the `Parent Node` column in `ShapedDevices.csv` to shape under named nodes from `network.json`, use a hierarchy-preserving topology mode such as:
114+
115+
```toml
116+
[topology]
117+
compile_mode = "full"
118+
```
119+
120+
Do not use `compile_mode = "flat"` for hierarchy-based parent shaping. Flat mode intentionally assigns circuits to generated CPU bucket queues such as `Generated_PN_1`; `shaping_inputs.json` will show `resolution_source: "flat_bucket"` for those circuits.
121+
113122
```{mermaid}
114123
flowchart LR
115124
A[Built-in Integration Mode] --> B[topology_import.json]
@@ -143,6 +152,8 @@ flowchart LR
143152

144153
When a circuit references a parent or anchor that is not present in the queue-visible effective topology, LibreQoS still shapes the circuit under a generated parent node. Scheduler output summarizes those fallbacks by reason and includes a few example circuits instead of printing one warning per circuit. Review the examples in Topology Manager or the source integration when those circuits should attach to a specific real site, AP, or parent node.
145154

155+
This is different from explicit flat mode. If `shaping_inputs.json` shows `resolution_source: "flat_bucket"`, the generated parent node is expected flat-mode behavior. Switch `topology.compile_mode` away from `flat` when circuits should follow `network.json` parent names.
156+
146157
## Consumer Map
147158

148159
```{mermaid}

docs/v2.0/troubleshooting.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,25 @@ journalctl -u lqosd --since "10 minutes ago"
283283

284284
If still blank under normal traffic, collect recent logs and open an issue.
285285

286+
### Circuits show Generated_PN instead of network.json node names
287+
288+
If a DIY/manual deployment uses `network.json` and `ShapedDevices.csv`, but the Circuit page shows parents such as `Generated_PN_1`, check the runtime shaping inputs:
289+
290+
```bash
291+
jq '.circuits[] | {circuit_id, logical_parent_node_name, effective_parent_node_name, resolution_source}' /opt/libreqos/state/shaping/shaping_inputs.json
292+
```
293+
294+
If `resolution_source` is `flat_bucket`, LibreQoS is in flat topology mode. That mode intentionally assigns circuits to generated CPU bucket queues instead of shaping them under the named `Parent Node` hierarchy.
295+
296+
To shape circuits under the node names from `network.json`, set:
297+
298+
```toml
299+
[topology]
300+
compile_mode = "full"
301+
```
302+
303+
Then reload or wait for the scheduler to regenerate `network.effective.json` and `shaping_inputs.json`.
304+
286305
### Site Map appears blank or slow
287306

288307
Site Map has one extra dependency beyond normal WebUI data feeds: current builds fetch bbox/bootstrap data and raster tiles from `https://insight.libreqos.com`.

src/rust/lqos_config/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ pub use topology_runtime_state::{
9696
TopologyEffectiveNodeState, TopologyEffectiveStateFile, TopologyRuntimeShapingPayloadIdentity,
9797
TopologyRuntimeStateError, TopologyRuntimeStatusFile, TopologyShapingCircuitInput,
9898
TopologyShapingDeviceInput, TopologyShapingInputsFile, TopologyShapingResolutionSource,
99-
active_runtime_shaping_inputs_path, compute_effective_network_generation,
100-
active_runtime_shaping_inputs_path_from_status, compute_topology_source_generation,
99+
active_runtime_shaping_inputs_path, active_runtime_shaping_inputs_path_from_status,
100+
compute_effective_network_generation, compute_topology_source_generation,
101101
load_active_runtime_shaping_inputs, load_active_runtime_shaping_inputs_from_status,
102102
topology_attachment_health_state_path, topology_compiled_shaping_path,
103103
topology_effective_network_path, topology_effective_state_path, topology_import_path,

0 commit comments

Comments
 (0)