Skip to content
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.

Levant deploy stuck in loop when deployment object is empty #263

@msvbhat

Description

@msvbhat

We had a nomad job which was last deployed couple of months ago. And for some reason, the /v1/job//deployments returned an empty object. So when I try to run deploy the job (with no changes to job definition), levant got stuck in a loop for more than 20 minutes. The command I ran for levant deploy is levant deploy -ignore-no-changes -var-file <file> job.nomad

levant version
Levant v0.2.5
Date: 2018-10-25T13:22:22Z
Commit: 0514741
Branch: 0.2.5
State: 0.2.5
Summary: 0514741

nomad version
Nomad v0.8.5 (90fbfaba6a6d9af7febc39082b95ed832d8b8bd6)

Debug log outputs from Levant:

I don't have the DEBUG logs output yet (lost them when we did the workaround). But the debug had lot of below output

levant/deploy: Nomad returned an empty deployment for evaluation ; retrying

When I checked the levant code, I observed that the DeploymentID is empty and that is why it got stuck.

https://github.com/jrasell/levant/blob/cc275cb120fda9dfaf20ffaebb36c12305495acb/levant/deploy.go#L446

The steps to reproduce would be to have a job that doesn't have the deployment (not sure how a job can end up in this state). And then try to deploy that job without doing any changes to job definition with -ignore-no-changes option.

If I am able to reproduce this again in our environment, I will provide more information.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions