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-server fails to compare mac addresses #485

Closed
moadqassem opened this issue Apr 22, 2021 · 0 comments · Fixed by #486
Closed

tink-server fails to compare mac addresses #485

moadqassem opened this issue Apr 22, 2021 · 0 comments · Fixed by #486

Comments

@moadqassem
Copy link
Member

Expected Behaviour

When I create a new hardware, template and workflow, I expect to tink-server to match the worker mac address in pg with the provided mac address in the workflow request regardless the case sensitivity, as mac addresses are not case sensitive.

Current Behaviour

tink-server fails to fetch the worker even though it has the same mac address but it is upper case.

Possible Solution

Due to the merge of this PR #279, the mac address of the hardware data will be lowered and then persisted to avoid comparisons problems. However, if the you are creating a workflow based on the worker id, instead of the mac address(as the grpc client would do) it will fail to create the workflow. I opened a PR which should solve the issue:

Steps to Reproduce (for bugs)

1.create hardware data
2.create template data(add the worker mac address and with upper case letters)
3.create a workflow using the template and hardware id
4. Workflow won't be created as this method here will fail to match and fetch mac addresses, because of the case sensitivity:

func getWorkerIDbyMac(ctx context.Context, db *sql.DB, mac string) (string, error) {

Context

Your Environment

  • Operating System and version (e.g. Linux, Windows, MacOS):

  • How are you running Tinkerbell? Using Vagrant & VirtualBox, Vagrant & Libvirt, on Packet using Terraform, or give details:

  • Link to your project or a code example to reproduce issue:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant