Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IP/Port info for allocations is missing from UI in 0.12.x #9031

Closed
gmichalec-pandora opened this issue Oct 5, 2020 · 4 comments · Fixed by #9309
Closed

IP/Port info for allocations is missing from UI in 0.12.x #9031

gmichalec-pandora opened this issue Oct 5, 2020 · 4 comments · Fixed by #9309
Assignees

Comments

@gmichalec-pandora
Copy link

For reporting security vulnerabilities please refer to the website.

If you have a question, prepend your issue with [question] or preferably use the nomad mailing list.

If filing a bug please include the following:

Nomad version

0.12.5-ent

Operating system and Environment details

Debian Buster

Issue

After upgrading from 0.11.3 -> 0.12.5, we noticed that the allocation/task view in the UI no longer lists the IP/Port of allocations.
It appears to be related to this commit - https://github.com/hashicorp/nomad/pull/8631/files

Reproduction steps

Job file (if appropriate)

  "Stop": false,
  "Region": "integration",
  "Namespace": "doppler",
  "ID": "doppler-integration",
  "ParentID": "",
  "Name": "doppler-integration",
  "Type": "service",
  "Priority": 50,
  "AllAtOnce": false,
  "Datacenters": [
    "integration"
  ],
  "Constraints": [
    {
      "LTarget": "${attr.kernel.name}",
      "RTarget": "linux",
      "Operand": "="
    }
  ],
  "Affinities": null,
  "Spreads": null,
  "TaskGroups": [
    {
      "Name": "doppler",
      "Count": 1,
      "Update": {
        "Stagger": 60000000000,
        "MaxParallel": 1,
        "HealthCheck": "checks",
        "MinHealthyTime": 10000000000,
        "HealthyDeadline": 300000000000,
        "ProgressDeadline": 600000000000,
        "AutoRevert": false,
        "AutoPromote": false,
        "Canary": 0
      },
      "Migrate": {
        "MaxParallel": 1,
        "HealthCheck": "checks",
        "MinHealthyTime": 10000000000,
        "HealthyDeadline": 300000000000
      },
      "Constraints": [
        {
          "LTarget": "${attr.vault.version}",
          "RTarget": ">= 0.6.1",
          "Operand": "semver"
        }
      ],
      "Scaling": null,
      "RestartPolicy": {
        "Attempts": 10,
        "Interval": 300000000000,
        "Delay": 20000000000,
        "Mode": "delay"
      },
      "Tasks": [
        {
          "Name": "doppler",
          "Driver": "docker",
          "User": "",
          "Config": {
            "extra_hosts": [
              "dockerhost:${attr.unique.network.ip-address}"
            ],
            "image": "https://docker-registry.savagebeast.com/doppler:0.10.16",
            "port_map": [
              {
                "doppler_ssl": 443
              }
            ]
          },
          "Env": {
            "HOST_IP": "${attr.unique.network.ip-address}",
            "MODE": "stage",
            "STAGING": "true"
          },
          "Services": [
            {
              "Name": "doppler-integration",
              "TaskName": "",
              "PortLabel": "doppler_ssl",
              "AddressMode": "auto",
              "EnableTagOverride": false,
              "Tags": [
                "env--stage",
                "integration",
                "doppler-integration",
                "https-prometheus-scrape-target",
                "urlprefix-doppler.savagebeast.com/",
                "urlprefix-doppler.docker.savagebeast.com/",
                "urlprefix-doppler.docker.integration.savagebeast.com/",
                "urlprefix-doppler.service.savagebeast.com/",
                "urlprefix-doppler.service.integration.savagebeast.com/",
                "urlprefix-vaultui.doppler.savagebeast.com/",
                "urlprefix-vaultui.doppler.docker.savagebeast.com/",
                "urlprefix-vaultui.doppler.docker.integration.savagebeast.com/",
                "urlprefix-vaultui.doppler.service.savagebeast.com/",
                "urlprefix-vaultui.doppler.service.integration.savagebeast.com/",
                "urlprefix-nomadui.doppler.savagebeast.com/",
                "urlprefix-nomadui.doppler.docker.savagebeast.com/",
                "urlprefix-nomadui.doppler.docker.integration.savagebeast.com/",
                "urlprefix-nomadui.doppler.service.savagebeast.com/",
                "urlprefix-nomadui.doppler.service.integration.savagebeast.com/",
                "project--doppler",
                "docker_tag--0.10.16",
                "nomad_job--${NOMAD_JOB_NAME}",
                "nomad_task--${NOMAD_JOB_NAME}-${NOMAD_GROUP_NAME}-${NOMAD_TASK_NAME}"
              ],
              "CanaryTags": [
                "project--doppler",
                "docker_tag--0.10.16",
                "nomad_job--${NOMAD_JOB_NAME}",
                "nomad_task--${NOMAD_JOB_NAME}-${NOMAD_GROUP_NAME}-${NOMAD_TASK_NAME}",
                "canary--true"
              ],
              "Checks": [
                {
                  "Name": "doppler alive",
                  "Type": "http",
                  "Command": "",
                  "Args": null,
                  "Path": "/health",
                  "Protocol": "https",
                  "PortLabel": "",
                  "Expose": false,
                  "AddressMode": "",
                  "Interval": 10000000000,
                  "Timeout": 2000000000,
                  "InitialStatus": "",
                  "TLSSkipVerify": false,
                  "Method": "",
                  "Header": null,
                  "CheckRestart": {
                    "Limit": 3,
                    "Grace": 90000000000,
                    "IgnoreWarnings": false
                  },
                  "GRPCService": "",
                  "GRPCUseTLS": false,
                  "TaskName": "",
                  "SuccessBeforePassing": 0,
                  "FailuresBeforeCritical": 0
                }
              ],
              "Connect": null,
              "Meta": null,
              "CanaryMeta": null
            }
          ],
          "Vault": {
            "Policies": [
              "doppler"
            ],
            "Namespace": "",
            "Env": true,
            "ChangeMode": "restart",
            "ChangeSignal": "SIGHUP"
          },
          "Templates": [
            {
              "SourcePath": "",
              "DestPath": "/secrets/service.consul.crt",
              "EmbeddedTmpl": "{{ with secret \"pki/issue/doppler\" \"common_name=doppler.savagebeast.com\" \"alt_names=doppler.savagebeast.com,doppler.docker.savagebeast.com, doppler.docker.integration.savagebeast.com,doppler.service.savagebeast.com, doppler.service.integration.savagebeast.com,vaultui.doppler.savagebeast.com,vaultui.doppler.docker.savagebeast.com, vaultui.doppler.docker.integration.savagebeast.com,vaultui.doppler.service.savagebeast.com, vaultui.doppler.service.integration.savagebeast.com,nomadui.doppler.savagebeast.com,nomadui.doppler.docker.savagebeast.com, nomadui.doppler.docker.integration.savagebeast.com,nomadui.doppler.service.savagebeast.com, nomadui.doppler.service.integration.savagebeast.com,\" (env \"attr.unique.network.ip-address\" | printf  \"ip_sans=%s\") }}{{ .Data.certificate }}\n{{ range .Data.ca_chain }}{{ . }}\n{{ end }} {{ end }}",
              "ChangeMode": "restart",
              "ChangeSignal": "",
              "Splay": 3600000000000,
              "Perms": "0644",
              "LeftDelim": "{{",
              "RightDelim": "}}",
              "Envvars": false,
              "VaultGrace": 0
            },
            {
              "SourcePath": "",
              "DestPath": "/secrets/service.consul.key",
              "EmbeddedTmpl": "{{ with secret \"pki/issue/doppler\" \"common_name=doppler.savagebeast.com\" \"alt_names=doppler.savagebeast.com,doppler.docker.savagebeast.com, doppler.docker.integration.savagebeast.com,doppler.service.savagebeast.com, doppler.service.integration.savagebeast.com,vaultui.doppler.savagebeast.com,vaultui.doppler.docker.savagebeast.com, vaultui.doppler.docker.integration.savagebeast.com,vaultui.doppler.service.savagebeast.com, vaultui.doppler.service.integration.savagebeast.com,nomadui.doppler.savagebeast.com,nomadui.doppler.docker.savagebeast.com, nomadui.doppler.docker.integration.savagebeast.com,nomadui.doppler.service.savagebeast.com, nomadui.doppler.service.integration.savagebeast.com,\" (env \"attr.unique.network.ip-address\" | printf  \"ip_sans=%s\") }}{{ .Data.private_key }}{{ end }}",
              "ChangeMode": "restart",
              "ChangeSignal": "",
              "Splay": 3600000000000,
              "Perms": "0644",
              "LeftDelim": "{{",
              "RightDelim": "}}",
              "Envvars": false,
              "VaultGrace": 0
            },
            {
              "SourcePath": "",
              "DestPath": "secrets/env.txt",
              "EmbeddedTmpl": "          NOMAD_MANAGEMENT_TOKEN={{ with secret \"secret/doppler/nomad/management_token\" }}{{ .Data.value }}{{ end }}\n          DOPPLER_LDAP_PASSWORD={{ with secret \"secret/doppler/doppler_user\" }}{{ .Data.password }}{{ end }}\n          DOPPLER_SECRET={{ with secret \"secret/doppler/DOPPLER_SECRET\" }}{{ .Data.value }}{{ end }}\n          nomad_token={{ with secret \"secret/doppler/nomad_token\" }}{{ .Data.value }}{{ end }}\n          JENKINS_BUILDER_PASSWORD={{ with secret \"secret/doppler/JENKINS_BUILDER_PASSWORD\" }}{{ .Data.value }}{{ end }}\n          DMV_JWT={{ with secret \"secret/doppler/dmv/dmv-stage\" }}{{ .Data.value }}{{ end }}\n          MODE=stage\n          HOST_IP={{ env \"attr.unique.network.ip-address\" }}\n        ",
              "ChangeMode": "restart",
              "ChangeSignal": "",
              "Splay": 5000000000,
              "Perms": "0644",
              "LeftDelim": "{{",
              "RightDelim": "}}",
              "Envvars": true,
              "VaultGrace": 0
            }
          ],
          "Constraints": null,
          "Affinities": null,
          "Resources": {
            "CPU": 5500,
            "MemoryMB": 500,
            "DiskMB": 0,
            "IOPS": 0,
            "Networks": [
              {
                "Mode": "",
                "Device": "",
                "CIDR": "",
                "IP": "",
                "MBits": 10,
                "DNS": null,
                "ReservedPorts": null,
                "DynamicPorts": [
                  {
                    "Label": "doppler_ssl",
                    "Value": 0,
                    "To": 0,
                    "HostNetwork": "default"
                  }
                ]
              }
            ],
            "Devices": null
          },
          "RestartPolicy": {
            "Attempts": 10,
            "Interval": 300000000000,
            "Delay": 20000000000,
            "Mode": "delay"
          },
          "DispatchPayload": null,
          "Lifecycle": null,
          "Meta": null,
          "KillTimeout": 5000000000,
          "LogConfig": {
            "MaxFiles": 10,
            "MaxFileSizeMB": 10
          },
          "Artifacts": null,
          "Leader": false,
          "ShutdownDelay": 0,
          "VolumeMounts": null,
          "KillSignal": "",
          "Kind": "",
          "CSIPluginConfig": null
        }
      ],
      "EphemeralDisk": {
        "Sticky": false,
        "SizeMB": 300,
        "Migrate": false
      },
      "Meta": null,
      "ReschedulePolicy": {
        "Attempts": 0,
        "Interval": 0,
        "Delay": 30000000000,
        "DelayFunction": "exponential",
        "MaxDelay": 3600000000000,
        "Unlimited": true
      },
      "Affinities": null,
      "Spreads": null,
      "Networks": null,
      "Services": null,
      "Volumes": null,
      "ShutdownDelay": null,
      "StopAfterClientDisconnect": null
    }
  ],
  "Update": {
    "Stagger": 60000000000,
    "MaxParallel": 1,
    "HealthCheck": "",
    "MinHealthyTime": 0,
    "HealthyDeadline": 0,
    "ProgressDeadline": 0,
    "AutoRevert": false,
    "AutoPromote": false,
    "Canary": 0
  },
  "Multiregion": null,
  "Periodic": null,
  "ParameterizedJob": null,
  "Dispatched": false,
  "Payload": null,
  "Meta": {
    "DEPLOY_MODE": "release",
    "PROJECT": "doppler"
  },
  "ConsulToken": "",
  "VaultToken": "",
  "VaultNamespace": "",
  "NomadTokenID": "",
  "Status": "running",
  "StatusDescription": "",
  "Stable": true,
  "Version": 0,
  "SubmitTime": 1595894192805407500,
  "CreateIndex": 7049681,
  "ModifyIndex": 7049692,
  "JobModifyIndex": 7049681
}
@gmichalec-pandora gmichalec-pandora changed the title IP/Port info for allocations is missing IP/Port info for allocations is missing from UI in 0.12.x Oct 5, 2020
@rkettelerij
Copy link
Contributor

Good catch, just checked between our 11.3 and 12.5 cluster and I can confirm the 'Addresses' column is missing on the allocation details page

@nickethier
Copy link
Member

Hey @gmichalec-pandora
The main reason you're seeing this is due to the use of the deprecated task network syntax.

If you define your ports as part of the group then they will appear as part of the alloc info page in a separate "Ports" table.

I'm going to keep this open as I plan to to try and expose the deprecated task network ports into this table to try and ease the confusion here.

@gmichalec-pandora
Copy link
Author

Thanks for responding - I updated a job to use the new syntax and indeed the port info showed up. However, until #8780 is resolved, it's going to be a huge undertaking to get our 100s of users to update 1000s of job specs to use the new syntax - currently it seems to require not only moving the network definition, but also any service definitions that use port labels.

@github-actions
Copy link

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 github-actions bot locked as resolved and limited conversation to collaborators Oct 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants