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

pattern-based deployment doesn't connect to agent when looking at hzn agreement list #11

Closed
oshadmon opened this issue Apr 1, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@oshadmon
Copy link
Collaborator

oshadmon commented Apr 1, 2024

OpenHorzon Version: v2.30.0-1476_amd64
Machine: Ubuntu 22.04 LTS (jammy) on amd64

Prepare Machine:

  1. Add params to ~/.bashrc & execute ~/.bashrc & execute
export HZN_ORG_ID=alog
# export HZN_DEVICE_TOKEN= # specify a string value for a token
export HZN_DEVICE_ID=alog-edgelake-node 
export HZN_EXCHANGE_USER_AUTH=
export HZN_EXCHANGE_URL=http://132.177.125.232:3090/v1
export HZN_FSS_CSSURL=http://132.177.125.232:9443/
export HZN_AGBOT_URL=http://132.177.125.232:3111/
export HZN_SDO_SVC_URL=http://132.177.125.232:9008/api
source ~/.bashrc
  1. create agent-install.cfg
HZN_EXCHANGE_URL=http://132.177.125.232:3090/v1
HZN_FSS_CSSURL=http://132.177.125.232:9443/
HZN_AGBOT_URL=http://132.177.125.232:3111/
HZN_SDO_SVC_URL=http://132.177.125.232:9008/api
HZN_FDO_SVC_URL=http://132.177.125.232:9008/api 
  1. Install Agent - Timeouts, however service does get installed
    Look at HelloWorld Issue for details
curl -sSL https://github.com/open-horizon/anax/releases/latest/download/agent-install.sh | bash -s -- -i anax: -k ./agent-install.cfg -c css: -p IBM/pattern-ibm.helloworld -w '*' -T 120
  1. Install make and clone repo
sudo apt-get -y install make 
git clone https://github.com/open-horizon-services/service-anylog/
  1. Unregister node
hzn unregister -f

Deploy EdgeLake: The following steps are found in Deploy via OpenHorizon Pattern

  1. cd into service-anylog

  2. Publish service

make publish-service EDGELAKE_TYPE=master 

Expect / Actual: Success

  1. Publish service policy
make publish-service-policy EDGELAKE_TYPE=master 

Expect / Actual: Success

  1. Publish deployment policy
make publish-deployment-policy EDGELAKE_TYPE=master 

Expect / Actual: Success

  1. agent-run
make agent-run EDGELAKE_TYPE=master 

Expect: Success
Actual: Everything looks correct, but nothing is happening as part of the agreement list - waited for over an hour

root@alog-edgelake-node:~/service-anylog# make agent-run EDGELAKE_TYPE=master 
================
REGISTERING NODE
================
Note: No properties and constraints are specified under 'deployment' attribute in the node policy file hzn/node.policy.master.json. The top level properties and constraints will be used.
Horizon Exchange base URL: http://132.177.125.232:3090/v1
Using node ID 'alog-edgelake-node' from the Horizon agent
Generated random node token
Updating node token...
Will proceed with the given node policy.
Updating the node policy...
Initializing the Horizon node with node type 'device'...
Note: no input file was specified. This is only valid if none of the services need variables set.
However, if there is 'userInput' specified in the node already in the Exchange, the userInput will be used.
Changing Horizon state to configured to register this node with Horizon...
Horizon node is registered. Workload agreement negotiation should begin shortly. Run 'hzn agreement list' to view.

root@alog-edgelake-node:~/service-anylog# hzn agreement list
[]
@oshadmon oshadmon added the bug Something isn't working label Apr 1, 2024
@oshadmon oshadmon assigned oshadmon and unassigned oshadmon Apr 1, 2024
@oshadmon
Copy link
Collaborator Author

oshadmon commented Apr 5, 2024

Steps:
0. Rebuilt the machine

  1. In os-dev branch, I updated service and deployment configurations to not include empty values.
  2. Re-ran steps 1-5

Behavior: Policy Incompatible

root@alog-edgelake-node:~/service-anylog# make deploy-check EDGELAKE_TYPE=master 
Warning: environment variable 'LOCAL_SCRIPTS' is referenced in input file, but not defined in the environment.
Neither node id nor node user input file is specified. Getting node user input from the local node.
ERROR: logging before flag.Parse: E0405 01:16:37.417388    3026 service.go:400] Exchange RPC expecting 1 service service-edgelake alog 1.3.2403 response: &{map[] 0}
{
  "compatible": false,
  "reason": {
    "alog/service-edgelake_1.3.2403_amd64": "Policy Incompatible: Failed to find definition for dependent services of . Compatability of openhorizon.allowPrivileged cannot be fully evaluated until all services are in the Exchange."
  }
}

@joewxboy
Copy link
Member

joewxboy commented Mar 1, 2025

@oshadmon Is this still a valid issue or can it be closed?

@oshadmon
Copy link
Collaborator Author

oshadmon commented Mar 3, 2025

invalid at this time

@oshadmon oshadmon closed this as completed Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants