Docs
Tutorial

Check for drift

Change a device in NetBox by hand, have Designs find the drift, and put it back.

Drift is NetBox changing under a deployment: someone edits a field the design sets, or deletes an object it created. Designs finds it by planning the deployment again, with the design and variables it was applied with. A deployment that matches its design plans to nothing, so anything the plan finds is drift.

Make some

In NetBox, open device R2-COMPUTE-01 and change its Status from Active to Planned. Save it.

Find it

  1. Go to Deployments and open rack-r2.
  2. Select Check drift. It plans the deployment again in the background and stays on the page.

It says Drifted, with one change. Select Review: the plan has 1 Update, on R2-COMPUTE-01, showing the field, the value NetBox has now, Planned, and the value the design sets, Active.

Only what the design declares counts. Change a field the design doesn't set, such as the device's Comments, and check again: still the one update, the status; the comment isn't in it. A field the design leaves out is never reported as drift and never written, so you can keep notes in NetBox on objects a design manages.

Put it back, or keep it

The check has told you; it has changed nothing, and it has nothing to discard. You have two ways forward, and leaving it is a third.

To put NetBox back, apply the plan. The device is Active again. Check drift once more: in sync.

To keep what NetBox has, you would change the design instead: set the server's status to planned, or stop setting it, and redeploy rack-r2 with the new version. The design then declares what NetBox holds, and the drift is gone without a write. For this tutorial, put it back: later chapters expect the status the design sets.

Drift and design edits look the same to a plan

Check drift compares NetBox with the version of the design the deployment applied, and the designs it's built from at the versions they resolved to then, so editing a design in the catalogue doesn't show up as drift: the Deployments page says the design has changed, and that is a different thing. rack-r1 still says the server design changed underneath it, and its drift check is in sync all the same. A plan you make yourself with a newer version shows the design's changes and NetBox's together, worded the same, which is why chapter 7 put the rack design back before this one.

The list under a deployment is its history: the deploy you applied, this check, and from now on every plan made of it, each saying what it found and what became of it. Open on any of them shows the plan as it was reviewed. A deploy or redeploy planned and not applied has Discard plan, which closes it and changes nothing in NetBox; a check has nothing to discard.

Next, several designs as one: a second site, with its rack, under one name.

On this page