Skip to content

Network zones

A network zone is a network that only its own workers reach; zones may reuse each other’s addresses. Each device is in exactly one zone, and the workflow engine sends a device’s jobs to the workers of that zone. A device with no zone set is in the zone default.

The web client shows zones in two places:

  • the Network zones page, from the header, which lists every zone and its devices;
  • the device pages, which show each device’s zone.

The zones come from Neops Core. The web client shows no workers and no jobs; the workflow manager does.

The Network zones page

Open Network zones in the header. The page belongs to no scope, so it is the same whichever scope you were in.

default comes first, then the zones stored in Core. default is reserved: no zone can take its name, and it can’t be described or deleted.

Select Show devices on a zone to list its devices with their hostname and IP. The list shows only the devices you are allowed to read, and at most the first 200. When a zone holds more, the page says how many there are in all.

Create, describe and delete zones

The forms appear only to users whose role has write on the permission element network-zones. Every signed-in user can read zones, so the page itself is open to everyone. Grant the write in Core’s role management.

Action How Core refuses it when
Create a zone Create a zone, with a name and an optional description the name is taken, is default, or breaks the naming rule
Change a description Edit description on the zone
Delete a zone Delete, then confirm devices are still in the zone

A zone name uses lowercase letters, digits and hyphens, at most 63 characters, and starts and ends with a letter or digit, for example site-zurich-2. The name is fixed once the zone exists. To rename a zone, create the new one, move its devices, then delete the old one.

When Core refuses a change, the page shows Core’s message next to the form, for example:

Network zone site-zurich-2 is used by 3 device(s). Move or delete them first.

What deleting a zone does to deleted devices

Deleting a device in a workflow run or in Django admin only archives it. Archived devices don’t keep a zone from being deleted. When a zone is deleted, the archived devices that were in it move to default, so an archived device restored later is in default.

A device’s zone

The device table has a Network zone column, and a device’s detail page shows Network zone in its summary. A device with no zone set shows default. Sorting the table by Network zone orders devices by zone name, and a device with no zone set sorts as default.

The web client can’t move a device to another zone. A device changes zone only through a workflow run, with the device_update_device function block.

Retiring a site

Core can’t see which workers serve a zone or which jobs wait in it, so retire a site in this order:

  1. While the site’s workers still run, move its devices to another zone or delete them.
  2. Stop the site’s workers.
  3. Delete the zone on the Network zones page.

If the site is already gone, delete its devices in Django admin, which needs no worker, then delete the zone.