This repository was archived by the owner on Jun 27, 2025. It is now read-only.
This repository was archived by the owner on Jun 27, 2025. It is now read-only.
auto-revert SIGSEGV #426
Closed
Description
Description
Levant crashes every time I deploy a job with a failing check when it gets to the auto-revert state.
By the way, why does Levant even do auto-revert, since Nomad already returns to a stable working version on its own? Can we add a flag to disable Levant's auto-revert functionality?
2021-09-27T23:58:41Z |INFO| levant/auto_revert: job the-job has entered auto-revert state; launching auto-revert checker job_id=the-job
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x77098e]
goroutine 1 [running]:
github.com/hashicorp/levant/levant.(*levantDeployment).autoRevert(0xc0003fd040, 0xc00011e2f0, 0xc00011e2d0)
/home/circleci/project/project/levant/auto_revert.go:25 +0x16e
github.com/hashicorp/levant/levant.(*levantDeployment).checkAutoRevert(0xc0003fd040, 0xc00011e2d0)
/home/circleci/project/project/levant/auto_revert.go:71 +0x186
github.com/hashicorp/levant/levant.(*levantDeployment).deploy(0xc0003fd040, 0x1)
/home/circleci/project/project/levant/deploy.go:195 +0x505
github.com/hashicorp/levant/levant.TriggerDeployment(0xc0000ccd20, 0x0, 0xc0001696f0)
/home/circleci/project/project/levant/deploy.go:81 +0x7e
github.com/hashicorp/levant/command.(*DeployCommand).Run(0xc0000aedf8, 0xc0000c0020, 0x3, 0x3, 0xc0000ccb00)
/home/circleci/project/project/command/deploy.go:197 +0x939
github.com/mitchellh/cli.(*CLI).Run(0xc0000edcc0, 0xc0000edcc0, 0x7, 0xc0000aed08)
/go/pkg/mod/github.com/mitchellh/cli@v1.1.0/cli.go:260 +0x41a
main.RunCustom(0xc0000c0010, 0x4, 0x4, 0xc000196870, 0x406365)
/home/circleci/project/project/main.go:49 +0x33e
main.Run(0xc0000c0010, 0x4, 0x4, 0xc000094058)
/home/circleci/project/project/main.go:17 +0x56
main.main()
/home/circleci/project/project/main.go:11 +0x65
Relevant Nomad job specification file
I don't think this is very relevant, it happens every time.
Output of levant version
:
Levant v0.3.0
Output of consul version
:
Consul v1.10.0
Revision 27de64da7
Protocol 2 spoken by default, understands 2 to 3 (agent will automatically use protocol >2 when speaking to compatible agents)
Output of nomad version
:
Nomad v1.1.2 (60638a086ef9630e2a9ba1e237e8426192a44244)
Additional environment details:
Debug log outputs from Levant: