open-horizon-services / service-edgelake

Deployment of EdgeLake using OpenHorizon
0 stars 2 forks source link

Failure to create a new token during install of OpenHorzion #16

Open oshadmon opened 3 months ago

oshadmon commented 3 months ago

I attempted to deploy a second EdgeLake instance on a different machine, however, learned the hard way that when the HZN_DEVICE_ID name on the second node is the same as the first, the the first EdgeLake instances goes down.

When trying to us a different HZN_DEVICE_ID, I get invalid-input error (directions shown below).

Steps:

  1. Update hzn related information in profile (Ubuntu bashrc)
export HZN_ORG_ID=alog
# export HZN_DEVICE_TOKEN= # specify a string value for a token
export HZN_DEVICE_ID=edgelake-demo
...
  1. Attempt to install using hello world
    curl -sSL https://raw.githubusercontent.com/open-horizon/anax/v2.30/agent-install/agent-install.sh | bash -s -- -i anax: -c css: -p IBM/pattern-ibm.helloworld -w '*' -T 120 

Expect: Success Actual: failed to create node with new Device ID

Node alog/edgelake-demo does not exist in the Exchange with the specified token, creating/updating it...
Error: bad HTTP code 400 from PUT http://132.177.125.232:3090/v1/orgs/alog/nodes/edgelake-demo?noheartbeat=true: invalid-input, Unrecognized field "isNamespaceScoped" (class com.horizon.exchangeapi.PutNodesRequest), not marked as ignorable (12 known properties: "pattern", "softwareVersions", "jsonFormats", "msgEndPoint", "token", "name", "nodeType", "userInput", "registeredServices", "heartbeatIntervals", "publicKey", "arch"])
 at [Source: (String)"{"token":"goYck5og-VccN7uRhIqPTLb18lVtGFN0_UaAYT9I2AfQhsb4OI1in7vk8aTeFhcsGqHj0XKEwrh75TYUKGV05yJ0","name":"edgex-demo","nodeType":"device","isNamespaceScoped":false,"pattern":"","registeredServices":null,"msgEndPoint":"","softwareVersions":{},"publicKey":"","arch":"amd64","userInput":null}"; line: 1, column: 292] (through reference chain: com.horizon.exchangeapi.PutNodesRequest["isNamespaceScoped"])
oshadmon commented 3 months ago

When installing OpenHorizon with code by @playground (Jeff from IBM) then I'm able to deploy a second EdgeLake operator using a different HZN_DEVICE_ID

curl -sSL https://raw.githubusercontent.com/playground/hzn-cli/main/install.sh --output install.sh && bash ./install.sh