nomad icon indicating copy to clipboard operation
nomad copied to clipboard

Template file (may be deleted) change to folder when job restart

Open khinhvuphiduong opened this issue 1 year ago • 1 comments

Nomad version

Output from 1.3.2

Operating system and Environment details

Ubuntu server Ubuntu 20.04.6 LTS

Issue

Template file change to folder when job restart

Reproduction steps

Template output mount to container, after app restart, it looks like the mount file is deleted but it happens very rarely.

Expected Result

Mount file isn't deleted

Actual Result

Mount file is deleted

Job file (if appropriate)

...
"Tasks": [
        {
          "Name": "job_name",
          "Driver": "docker",
          "User": "",
          "Config": {
            "force_pull": false,
            "image": "private_repo",
            "ports": [
              "http"
            ],
            "volumes": [
              "/etc/localtime:/etc/localtime:ro",
              "local/log:/app/Logging/",
              "local/config/appsettings.json:/app/appsettings.json:ro"
            ],
            "auth": [
              {
                "username": "user private",
                "password": "password private"
              }
            ],
            "cap_add": [
              "SYS_PTRACE"
            ]
          },
          "Env": {
            "CONSUL_PREFIX": "nomad-"
          },
          "Services": null,
          "Vault": null,
          "Templates": [
            {
              "SourcePath": "local/configtpl/template_file.tpl",
              "DestPath": "local/config/appsettings.json",
              "EmbeddedTmpl": "",
              "ChangeMode": "noop",
              "ChangeSignal": "",
              "Splay": 5000000000,
              "Perms": "0644",
              "LeftDelim": "{{",
              "RightDelim": "}}",
              "Envvars": false,
              "VaultGrace": 0,
              "Wait": null
            }
          ],
...

Nomad Server logs (if appropriate)

nothing special

Nomad Client logs (if appropriate)

nothing special

khinhvuphiduong avatar Oct 02 '24 09:10 khinhvuphiduong

Hello @khinhvuphiduong, thank you for taking the time to report the bug. Im working on trying to reproduce it, but working with volumes requieres also some extra configuration, can you please share all the job file? Also if you have any configuration regarding the use of volumes on the agent specs, we could use that one too.

Juanadelacuesta avatar Oct 22 '24 16:10 Juanadelacuesta

I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

github-actions[bot] avatar May 25 '25 02:05 github-actions[bot]