Repository navigation
Fix facility allocated VLANs missing from resource summary/BQM - #458
Merged
Merged
Conversation
occupied_vlans was queried with the facility graph node_id, but the broker policy keys facility VLAN component rows by facility name. Use fac_sliver.get_name() in both the summary and ABQM paths, matching fim_helper.
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.
Problem
/portalresources/summary?level=2&force_refresh=true(and the ABQM returned by/resources) never report allocated VLANs for facility ports:allocated_vlansis alwaysnull, even when facility slices are active.Root cause
The two sides use different keys for facility VLAN allocations:
broker_simpler_units_policy.pybuilds the facility interface node_map as{graph}#{bqm_node.get_name()}#{bqm_cp.node_id}#{vlan}, soactor_databasestores thecomponentsrow withnode_id = <facility name>.AggregatedBQMPlugincalledoccupied_vlans(node_id=fac_sliver.node_id, ...). That passes the facility graph node ID (<port_nid>:facility+<name>), which never matches the stored name.fim_helper.pyalready queries by facility name (node_id=f_name), which is correct.Fix
Use
fac_sliver.get_name()in bothplug_produce_bqm_summaryandplug_produce_bqm.This changes reporting only. VLAN allocation (
allocate_ifs) is not affected.Testing
allocated_vlansin the summary endpoint.