Neops Core 2.6.0
Released 2026-11-17
Upgrade notes
The Helm migrate Job takes its own resources
The core chart has a new value, migrate.resources, for the post-install and post-upgrade migrate Job, which runs the index rebuild. Left empty, as it is by default, the Job takes the top-level resources of the Core web pods, as before. Set it to give the rebuild more memory without resizing every web pod; under the neops umbrella chart it is neops-core.migrate.resources.
Since 2.3.0 a full rebuild (elastic_index --rebuild --force, or --rebuild-if-stale when every index is stale) holds about 140 bytes more per row until it has synced the lookup indices. At 610,000 documents its peak RSS went from 409 MiB to 492 MiB. It grows linearly, so expect about 0.8 GB more at 6 million rows.
This release changes which fact and check values are indexed, so the index content version rises and manage.py elastic_index --rebuild-if-stale rebuilds every search index on the upgrade with no further step. Search is unavailable or incomplete while the rebuild runs, and locks that search the index are refused with INDEX_SYNC_PENDING until it finishes; the workflow engine retries them. Going back to an earlier release rebuilds the indices again.
Group membership changes fail until the migrate Job finishes
Migration 0208_pending_group_index_first_due_at adds a column that the new pods write when a device’s groups change. The chart runs migrations in the post-upgrade migrate Job while the new pods already serve, so until that Job has migrated, changing a device’s groups on a new pod fails and manage.py index_sync_status errors.
Archived devices, groups and clients no longer hold their unique values
The upgrade applies migration 0207_unique_among_live_rows. A device’s external_reference, a group’s name and a client’s MAC address are now unique among live rows only, so an unlock’s db_updates can create or rename an entity to a value an archived one still carries. It used to be refused with already exists. Likewise, an import that matches a live device without a reference now gives it the reference an archived device carries, where it used to fail with Reference is held by an archived device. Restoring an archived row while a live row holds its value is refused with A live device already has this external reference. (or the group or client equivalent), and restoring an interface leaves such a client archived. The migration rewrites no rows. It holds an exclusive lock on core_device, core_devicegroup and core_client while it builds their indexes, about a second at two million clients.
Going back below this release
Undoing 0207_unique_among_live_rows puts back uniqueness across all rows, and it fails with could not create unique index once two rows share a value, which this release allows. Before migrate core 0206_network_zone (or any older target), clear the value on each archived row that shares it with a live row or with a row archived later. This keeps the live row’s value, or else the one archived last:
UPDATE core_device d SET external_reference = NULL
WHERE d.deleted_at IS NOT NULL AND EXISTS (
SELECT 1 FROM core_device o
WHERE o.external_reference = d.external_reference AND o.id <> d.id
AND (o.deleted_at IS NULL OR (o.deleted_at, o.id) > (d.deleted_at, d.id)));
UPDATE core_devicegroup g SET name = NULL
WHERE g.deleted_at IS NOT NULL AND EXISTS (
SELECT 1 FROM core_devicegroup o
WHERE o.name = g.name AND o.id <> g.id
AND (o.deleted_at IS NULL OR (o.deleted_at, o.id) > (g.deleted_at, g.id)));
UPDATE core_client c SET mac_address = NULL
WHERE c.deleted_at IS NOT NULL AND EXISTS (
SELECT 1 FROM core_client o
WHERE o.mac_address = c.mac_address AND o.id <> c.id
AND (o.deleted_at IS NULL OR (o.deleted_at, o.id) > (c.deleted_at, c.id)));
Run it right before the migrate, with Core’s workers and the workflow engine stopped, since a run that archives or re-creates an entity in between can add a new duplicate. Run each as a SELECT id with the same WHERE first to see what it clears. An archived row whose value was cleared can no longer be found or restored by that value.
Fixes
manage.py sync_lookup_indices --forcenow stamps the lookup indices it refilled. It used to leave them unstamped, so the nextelastic_index --rebuild-if-stale(every Helm upgrade, every./neops up) rebuiltnetwork,groupsandclientsas well, with search down meanwhile.- A fact or check value is indexed as null only when Elasticsearch maps its key as an IP address and the value is not one. Those keys are the names the
ipaddress_fieldstemplate matches as a whole, in any case:ip,ip4,ip6,ipv4,ipv6oripaddress, with at most one_or-before or after it (IPv4,_ip). In a dotted key only the last segment counts, as Elasticsearch splits the key into objects:mgmt.ipv4is an IP key,ipv4.descriptionis not. Before, every string under a key containing the lettersipthat was not an IP address was indexed as null, sodescription,ship,vip,ip_addressormgmt_ipwere not searchable; after the rebuild they are, as keywords. A key such asIPv4with a value likenone, which Elasticsearch used to refuse and set aside the whole document for, is now indexed with that key as null. Checks were not converted at all and are now converted the same way. Search follows the same rule: a CIDR such asmgmt_ipv4: 10.0.0.0/8on a key Elasticsearch maps as keyword is now matched as that text, where 2.3.0 and later sent it as a CIDR match that could not match a keyword field. https://github.com/zebbra/neops-core/issues/2434 - The
deviceslist now sorts a device with no zone asdefaultwhen ordered bynetworkZone.name, as the 2.4.0 notes said and asdevicesElasticalready did. In 2.4.0 and 2.5.0 it sorted those devices last ascending and first descending. - An ordering list separated by spaces only, such as
hostname -networkZone.name, is now read as two keys, likehostname,-networkZone.name. It used to fail as one unknown field. - A search that Elasticsearch refuses as invalid ES|QL now names its problems without the
line N:M:positions, which pointed into the statement Core generates rather than into anything the client sent:Query failed: Found 1 problem: Unknown column [nope]. Several problems are joined with;. A client that matches on the old message text needs to follow. - An aggregation or related sort over a link field whose search document holds a non-numeric id, which only a document Core did not write can, now fails the search with
Query failed: non-numeric id ... in field ... (index ...). It used to fail with a rawinvalid literal for int(). The document is not skipped, since leaving it out would make the counts wrong without saying so. - A rebuild’s set-aside report now groups a refusal such as
object mapping for [facts.rack] tried to parse field [rack] as object, but found a concrete valueunder its field,facts.rack, with the type-conflict remedy. It used to list it under the index name with no remedy. manage.py elastic_sync_schema --show-schema KEYnow prints the stored and the inferred schema of that fact or check key for each entity type, and creates nothing. It used to run the--analyzesummary and never print the key. Combining it with--analyzeor--createis refused (https://github.com/zebbra/neops-core/issues/2449).- With more than one shard per index (
ELASTICSEARCH_DSL_INDEX_SHARDSabove 1), a shard that fails a query now fails the search lists and the topology with that shard’s reason, for exampleQuery failed: For input string: "abc" (index network), and fails a list filtered by a scope. They used to return the other shards’ rows, or none, without an error. A task whose targets come from a search filter still swallows the error and now runs on no targets instead of on fewer: https://github.com/zebbra/neops-core/issues/2433 tracks that. A list also no longer answers no rows and atotalCountof 0 when counting more than 10,000 hits fails: it counts in the same search. - A Django admin import with the delay Elasticsearch option now puts the web process’s configured signal processor back when it ends, also when it fails. It used to leave
NeopsCacheSignalProcessorinstalled, so that process kept queueing the pks of later saves in memory until its next delayed import or restart. manage.py index_sync_statusnow reports group index writes due for longer than--max-pending-agewhen a group’s write keeps failing. It measured their age from the time each record is next due, which every failed try moved to now, so the threshold never tripped. Migration0208_pending_group_index_first_due_atkeeps the time the change was made in the new columnfirst_due_at, set fromcreated_atfor records already due.
Going back
An earlier release runs on the migrated database as it is, during the rolling upgrade and after going back: the database sets first_due_at to the time of the insert for the records it writes. migrate core 0206_network_zone drops the column, and with it the time each record already due first came due. Migrate back only once the pods of the earlier release have replaced the new ones: a new pod cannot record a group write without the column.
