`ephemeral_disk` refusing to migrate

Hi,

I’m experimenting with Nomad locally to see if we can throw out Kubernetes, which so far has been a giant opaque headache masquerading as a piece of technology.

So, I’m running the local dev version of Nomad, and there’s no filesystem isolation in play or anything like that (MacOS is the host).

As part of this, I’m trying out ephemeral_disk to see if we can get our caches migrated over. It’d be nice to not have to warm them up again.

The config is very basic, looks like this:

job "test" {
  update {
    max_parallel      = 1
    health_check      = "checks"
    min_healthy_time  = "10s"
    healthy_deadline  = "5m"
    progress_deadline = "10m"
    auto_revert       = true
    auto_promote      = true
    canary            = 1
    stagger           = "30s"
  }


  group "app" {
    count = 1

    ephemeral_disk {
      migrate = true
      size    = 5000
      sticky  = true
    }

    network {
      port "webapp_http" {
        static = 9080
      }
    }

    task "pleasework" {
      driver = "java"

      config {
        jar_path    = "…"
        jvm_options = […]
        args = […]
      }

      resources {…}

      …

    }
  }
}

With the uninteresting things omitted.

The way I do this is that I go to alloc/data and touch test.txt. Then I change some token variable, like the port (shouldn’t be static, I know, this is just a test), and re-dispatch the job.

My expectation is that test.txt shows up under alloc/data of the new allocation, but this isn’t the case. I’m probably misconfiguring something.

What am I forgetting?