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

tink-cli and boots model confusion about the source of the hostname property #550

Closed
rgl opened this issue Oct 10, 2021 · 4 comments
Closed
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.

Comments

@rgl
Copy link
Contributor

rgl commented Oct 10, 2021

Expected Behaviour

Expected that tink hardware get would get the hostname value from the same place as Boots.

Current Behaviour

While trying to understand why Boots was not returning the hostname to the worker I've probably found some model confusion about where the hostname should be configured from.

At some point, this was the working hardware definition with the hostname set at .network.interfaces.dhcp.hostnam (I've trimmed it a bit to make it fit this issue; see the full version if required):

{
  "metadata": {
    "instance": {}
  },
  "network": {
    "interfaces": [
      {
        "dhcp": {
          "hostname": "$worker_name"
        },
      }
    ]
  }
}

But with recent Boots, we must set the hostname at .metadata.instance.hostname:

{
  "metadata": {
    "instance": {
      "hostname": "$worker_name"
    },
  },
  "network": {
    "interfaces": [
      {
        "dhcp": {
        },
      }
    ]
  }
}

But doing so has a collateral effect of making tink hardware get return an empty hostname, e.g.:

$ docker exec -i compose-tink-cli-1 tink hardware get
+--------------------------------------+-------------------+------------+----------+
| ID                                   | MAC ADDRESS       | IP ADDRESS | HOSTNAME |
+--------------------------------------+-------------------+------------+----------+
| 00000000-0000-4000-8000-080027000001 | 08:00:27:00:00:01 | 10.3.0.11  |          |
+--------------------------------------+-------------------+------------+----------+

Which was unexpected, hence this bug report.

Possible Solution

Either fix Boots or tink-cli.

Steps to Reproduce (for bugs)

  1. create an hardware like described before and observe the Boots vs tink-cli behaviour.

Your Environment

@stephen-fox stephen-fox added the kind/bug Categorizes issue or PR as related to a bug. label Nov 2, 2021
@nshalman nshalman added the help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. label Nov 16, 2021
@nshalman
Copy link
Member

@mmlb is this one of those instances where metadata is load-bearing in spite of having not official schema?

@nshalman nshalman added the priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. label Nov 16, 2021
@mmlb
Copy link
Contributor

mmlb commented Feb 8, 2022

@nshalman yes :(.

@jacobweinstock
Copy link
Member

#654 might close this. I will check Boots with the Kubernetes backend to see if this is still an issue.

@chrisdoherty4
Copy link
Member

Given Tink CLI has been superseded and removed this is no longer an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Projects
None yet
Development

No branches or pull requests

6 participants