Nscale Topology Provider
The nscale topology provider reads topology data from the Nscale Radar API and converts it into Topograph’s canonical three-tier topology graph.
The provider uses two Nscale data sources:
- Radar API: returns each instance’s network path via
GET /v2/topology - Instance Metadata Service (IMDS): each node exposes its own server ID and region at
http://169.254.169.254/openstack/latest/meta_data.json
The Radar response supplies the provider server ID, switch path, and optional block ID. For Slurm auto-discovery, the provider reaches each Slurm node over pdsh (SSH-based) and queries that node’s own IMDS endpoint to build the server-ID-to-hostname map. If the region credential is set, nodes whose IMDS region does not match it are excluded from the topology query.
When to Use This Provider
Use this provider for Nscale environments where Radar is the topology source. It is most commonly used with the Slurm engine to generate topology.conf from the current Slurm node list.
If the request payload supplies explicit nodes, Topograph uses those server ID to node name mappings directly. If nodes is omitted and the Slurm engine is used, Topograph runs scontrol show nodes -o to get the Slurm node list, then uses pdsh to query each node’s local IMDS endpoint for its server ID (serverID) and region (regionID), merging the results into a single server-ID-to-hostname map.
Prerequisites
- A Radar API endpoint reachable from the Topograph host
- An Nscale organization ID
- An API token with permission to read Radar topology data
- For Slurm auto-discovery:
scontrolandpdshmust be available to the Topograph process, with SSH access to every Slurm node, and each node must be able to reach the configuredimdsUrlendpoint (169.254.169.254by default; see Parameters)
Credentials
Store credentials in a YAML file:
Reference that file from the Topograph config:
Credentials can also be supplied directly in the topology request payload under provider.creds.
Parameters
The top-level Topograph pageSize setting controls pagination for the Radar topology request.
Configuration
Example Topograph config for Slurm:
Example request payload:
If you already have the server ID to hostname mapping, you can include it explicitly:
How It Works
For each region in the compute instance list, the provider fetches topology pages from Radar:
Each returned instance is translated as follows:
For Slurm auto-discovery, the provider runs scontrol show nodes -o to get the current Slurm node list, then uses pdsh to run the following on every node in that list:
This single pdsh sweep is cached and shared by both the server-ID-to-hostname map and the region map, so a topology request only queries each node’s IMDS once, not once per map. Each node’s response is a JSON document with a meta map. The provider extracts two fields per node:
Nodes that omit serverID, or whose IMDS response fails to parse, are dropped from the map; a node’s absence from regionID simply omits it from the region map. If the region credential is set, nodes whose regionID does not match it (including nodes missing regionID) are excluded from both maps entirely, with a warning logged per excluded node.
Verifying the Output
You can reproduce the same server-ID-to-hostname map Topograph builds by running the equivalent pdsh command directly. Replace imds_url below with the configured imdsUrl parameter if you override the default. This command is unfiltered — it does not apply the region credential’s filtering, so if region is set, Topograph’s actual map may exclude nodes this command still lists; cross-check those nodes’ regionID against the configured region by hand if needed:
A node that fails to respond, or whose IMDS response is missing serverID, is silently dropped from the generated topology rather than causing an error — run this check before relying on Slurm auto-discovery.
Then trigger topology generation:
For the Slurm engine, verify that the generated topology.conf contains the expected switch hierarchy or block topology for the Nscale instances.