Simon Tasker

Games, apps, and the occasional detour.

App Dev · · 4 min read

NetLay: Fixing the map from the map

The reality check could tell me a device was on the wrong port, and fixing it meant deleting the device and adding it again, so this is the phase about jobs that took five clicks.

Knowing is not fixing#

The reality check from post ten has been able to tell me a device is on the wrong port for about four months. What it could not do was move it, and neither could I, because NetLay had no way to move a device to a different switch at all.

The actual procedure was to delete the device and add it again on the right port, which loses its history, its photos, its cabling notes and everything else about it. So in practice nobody fixed anything, which makes the reality check an elaborate way of generating guilt.

This is the last phase of the review, and it is entirely about that gap between knowing and doing.

Moving a device.#

There is a move option in the inspector now. Any free port on any switch, or onto a host as a virtual machine or a wireless client.

Everything comes with it, because it is the same device. Same history, same photos, same cabling, same settings. That is the entire feature and it should have existed in post two.

The devices nobody has located yet.#

A related gap: plenty of devices answer pings while nobody yet knows which port they are on. Discovery finds them, and until now you had to put them on a real port, which is a guess written down as a fact.

Each layout gets a not yet located hub now, created the first time it is needed and parked off to the left of the map. Discovery can put devices straight into it, and so can a reality check fix that bumps a device off a port that turns out to belong to something else. It grows another forty eight ports whenever it fills up.

That is a small thing with an effect on honesty. There is now somewhere to put a device that means we know this exists and we do not know where it goes, which is a true statement, unlike port 24 of the nearest switch.

Flags that stay put.#

The warnings a reality check produced used to vanish on reload, and only the person who ran the check ever saw them.

They are saved on the devices now, so a colleague opening the map tomorrow sees what the switch disagreed about. Re-checking one switch replaces only that switch's flags.

Three new fixes went in with them. Swap them on the map, for when two devices turn out to be the other way round, which is the single most common mistake in a hand built map. Move it here, for a device found on a port that is already taken. And apply all fixes, for when you trust the switch and want the list gone.

Forty devices at once.#

Box select a group of devices and you can now edit them together. Type, whether they are pinged, addressing, service ports, group membership.

Deleting also tells you what is going with it, so it says it will take the cabinet, three switches, a hundred and twelve devices and six virtual machines, rather than asking if you are sure about a thing whose size you cannot see. And an admin deleting ten or more devices gets a backup taken first, which is the automatic backup machinery from post twenty eight earning its keep for the second time.

Tidying up after an import.#

Imports used to drop each new switch's devices on top of the last import's, so importing five switches gave you five piles in the same place.

Each switch's devices now go into their own free block in port order, and there is a tidy button that does the same for devices already on the map.

Filling in the names.#

This is my favourite thing in this phase. Imports and scans leave you with devices called 10.20.30.41 and Gi1/0/14, and renaming two hundred of them by hand is how a documentation project dies.

There is a fill in device names tool that proposes better names from what the application already knows, in order of how much it trusts each source. The device's own name over SNMP, NetBIOS or mDNS first, then a DHCP lease, then reverse DNS. Types and makers get filled in from the scan results at the same time, and you untick anything you disagree with before it does a thing.

No new data was needed for that. It is all sitting in the discovery results from post thirteen, and it took four months to notice I could simply offer it.

Small things that had bitten people.#

A log file in the data folder, rotating, so a window that closes during start up leaves a reason behind rather than just closing. The launchers pause on an error instead of vanishing, which is the same bug in a different place.

And the documentation finally explains upgrading: extract into a new folder, move the data folder across, and never move a newer database into an older NetLay. That last one is the sort of thing you only write down after somebody does it.

That is the review done.#

Four phases. Security, keeping sites apart, performance, and the workflow gaps in this post. A hundred and fourteen backend tests now.

What strikes me looking back at it is that none of the four phases were about features. Every single finding was about something I had built, working exactly as I wrote it, being wrong for somebody who was not me. The security holes were written for a tool nobody else could reach. The leaks were written for a person with one network. The performance was fine for fifty devices. And the workflow gaps are all places where I knew how to work around my own application.

That is the argument for the review, and it is also the argument for shutting up and letting somebody else look.