Closed jacobweinstock closed 1 year ago
This issue relates to the use of the tink
CLI that leverages the Postgres backend. While its still the case today that validation is weak when submitting to the Kubernetes backend, we have a resource validation roadmap item to address it more holistically in a way that works with the Kubernetes backend.
It is possible to successfully push a Hardware record that contains duplicate MAC and/or IP addresses. Pushing a Hardware record checks against other Hardware records for MAC address uniqueness but not against other interfaces within the same Hardware record.
For example, the following Hardware record with duplicate MAC addresses will successfully push to Tink.
Also, the following Hardware record with duplicate IP addresses will successfully push to Tink.
Expected Behaviour
Duplicate MAC and/or IP addresses checking in the same Hardware record behaves the same as the existing MAC address checking that occurs between different Hardware records.
Current Behaviour
See above.
Possible Solution
Steps to Reproduce (for bugs)
make run
docker exec -it tink_tink-cli_1 sh
tink hardware push --file hardware.json
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: