tinkerbell / tink

Workflow Engine for provisioning Bare Metal
https://tinkerbell.org
Apache License 2.0
913 stars 134 forks source link

workflow creation - missing steps #65

Closed Ottovsky closed 4 years ago

Ottovsky commented 4 years ago

Hi there,

I setup a tinkerbell in my local environment, all seems to be operational. I tried to setup a workflow following instructions from https://github.com/tinkerbell/tink/blob/master/docs/writing-workflow.md , but ended up with the following error message:

~ # tink hardware all ~ # tink target list +--------------------------------------+--------------------------------------------------------------+ | TARGET ID | TARGET DATA | +--------------------------------------+--------------------------------------------------------------+ | 2597b263-0de1-422c-8aca-7738d903e550 | {"targets": {"machine1": {"mac_addr": "52:54:00:f9:79:28"}}} | +--------------------------------------+--------------------------------------------------------------+ ~ # tink template list +--------------------------------------+---------------+-------------------------------+-------------------------------+ | TEMPLATE ID | TEMPLATE NAME | CREATED AT | UPDATED AT | +--------------------------------------+---------------+-------------------------------+-------------------------------+ | 5d8f9e7c-e984-4162-bff0-ad0400fe5b1b | sample | 2020-04-15 14:14:16 +0000 UTC | 2020-04-15 14:14:16 +0000 UTC | +--------------------------------------+---------------+-------------------------------+-------------------------------+ ~ # tink workflow create -t 5d8f9e7c-e984-4162-bff0-ad0400fe5b1b -r 2597b263-0de1-422c-8aca-7738d903e550 2020/04/15 14:15:13 rpc error: code = Unknown desc = Failed to insert in workflow_state: Target mentioned with refernece 52:54:00:f9:79:28 not found

From the logs, it looks like I am missing entries in hardware table in db. But in the documentation, I haven't seen any steps or instructions on how to add hardware entries to the db.

nathangoulding commented 4 years ago

Issue #60 resolves this, by not requiring you to add a hardware and target. You need to push the data model to hardware first, prior to creating the target that references the MAC address.

Ottovsky commented 4 years ago

Thanks, looking forward for #60 to resolve it. In the meantime, is there an example how hardware data model should look like?

gauravgahlot commented 4 years ago

Hey @Ottovsky :wave:

Since #60 has been merged and the required docs have also been updated, could you please see if the issue is resolved?

Ottovsky commented 4 years ago

Yes, it looks like it resolves it.