Skip to content

GB-311: an IPsec rotation stopped half way through its switch, and what is left does not finish it

Generated from ops/errors/catalog.yaml by ops/ci/check-error-catalog.py --write; do not edit here. GB-311 is printed by goatbuilder. The same text offline: goat explain GB-311 or goatbuilder explain GB-311.

What it means

The switch of an IPsec credential rotation (goat-peering-edge) moves the staged key, then the staged certificate, over the live names. A run killed between the two moves leaves one moved in and the other still staged. The next run finishes the remaining move when what is left is the moved one's match: the moved file is not the set-aside one, and the two halves are one key pair (each parsed by openssl; a file that does not parse matches nothing). Here they are not, so the live pair would be mixed: nothing was moved.

Why it happens

  • the staged file left behind was replaced after the run stopped
  • someone moved or edited the live or set-aside files by hand

What to do

One line per step or alternative:

restore the staged file the ceremony issued for this rotation, then run the rotation again with the same id
or put the set-aside pair in /etc/swanctl/.previous-<id>/ back by hand, check it with openssl, and stage the new pair again

Read more

Exit code

goatbuilder exits with 2.