Nomad: Periodic job transitions to dead on update

Created on 1 Feb 2017  路  6Comments  路  Source: hashicorp/nomad

Steps to reproduce

1) nomad run example.nomad
2) edit test -> test2
3) nomad run example.nomad
4) nomad status example: It will be dead.

job "example" {
  type = "batch"
  datacenters = ["dc1"]
  periodic {
     cron = "* * * * * *"
     prohibit_overlap = true
  }
  group "foo" {
    task "foo" {
      driver = "raw_exec"
      config {
        command = "echo"
        args = ["test2"]
      }
    }
  }
}
themcore typbug

All 6 comments

Haha, i've always thought that was the intended state for a periodic job waiting for something to execute... interesting :D

Yeah, I was confused with the 'dead' status. Even with the 'dead' status the periodic job still appears to run.

I wish I would have seen this issue a week ago!
We just started implementing a bulk update to all our periodic jobs and have run into this.

@dadgar Is this simply a matter of setting status correctly when a periodic job is updated? I'd like to submit a PR if so.
It seems to me like @sepulworld 's comment is correct. The periodic jobs that are marked as "dead" seem to be functioning correctly

@briansorahan Appreciate the offer! I went ahead and fixed it as it is somewhat subtle! In the meantime, the periodic job will have the incorrect state but it will function correctly. We should have a release out soon though!

@dadgar Thank you!

Was this page helpful?
0 / 5 - 0 ratings