open-horizon / anax

Horizon agent control system
https://open-horizon.github.io/docs/anax/docs/
Apache License 2.0
73 stars 98 forks source link

Agreement never gets terminated even when policy no longer matches #4034

Closed dlarson04 closed 4 months ago

dlarson04 commented 5 months ago

Describe the bug.

A node policy was changed so that the node policy matched the constraints of a deployment policy... See this node log message

I0409 13:04:52.417713      14 node_policy.go:67] Updated the local node policy with the exchange copy: NodePolicy: Label: , Description: , Properties: [{openhorizon.arch amd64 } {openhorizon.cpu 6 } {openhorizon.allowPrivileged true } {openhorizon.kubernetesVersion v1.29.1-eks-508b6b3 } {openhorizon.kubernetesNamespace ns5-eks-boutique-useast1 } {openhorizon.kubernetesNamespaceScoped true } {openhorizon.memory 12114 }], Constraints: [], Deployment: Properties: [{com.ibm.mesh.skupper-site false boolean}], Constraints: [], Management: Properties: [], Constraints: []
I0409 13:04:52.417832      14 node.go:259] AgreementWorker Node policy updated with the exchange copy: NodePolicy: Label: , Description: , Properties: [{openhorizon.arch amd64 } {openhorizon.cpu 6 } {openhorizon.allowPrivileged true } {openhorizon.kubernetesVersion v1.29.1-eks-508b6b3 } {openhorizon.kubernetesNamespace ns5-eks-boutique-useast1 } {openhorizon.kubernetesNamespaceScoped true } {openhorizon.memory 12114 }], Constraints: [], Deployment: Properties: [{com.ibm.mesh.skupper-site false boolean}], Constraints: [], Management: Properties: [], Constraints: []
I0409 13:05:02.502288      14 governance.go:525] GovernanceWorker: current proposal for 6bd144c6fa78e1aa975583e2c04e85039af25a00be811a66536b6a1ba4e9a6b8 is out of policy: Compatibility Error: Node properties [{openhorizon.arch amd64 } {openhorizon.cpu 6 } {openhorizon.allowPrivileged true } {openhorizon.kubernetesVersion v1.29.1-eks-508b6b3 } {openhorizon.kubernetesNamespace ns5-eks-boutique-useast1 } {openhorizon.kubernetesNamespaceScoped true } {openhorizon.memory 12,114 } {com.ibm.mesh.skupper-site false boolean}] do not satisfy constraint requirements [com.ibm.mesh.skupper-site == true]. Underlying error: The required properties com.ibm.mesh.skupper-site==true were not found in the available properties openhorizon.arch=amd64, openhorizon.cpu=6, openhorizon.allowPrivileged=true, openhorizon.kubernetesVersion=v1.29.1-eks-508b6b3, openhorizon.kubernetesNamespace=ns5-eks-boutique-useast1, openhorizon.kubernetesNamespaceScoped=true, openhorizon.memory=12114, com.ibm.mesh.skupper-site=false

so the agent knew that the constraints no longer patched for this agreement. What should have happened is the agbot should have canceled the agreement but it appears the agreement was lost by the agbot since I didn't find the agreement in the agreements table.

If the agent could have also triggered an agreement cancel, it would have cleaned up the running services.

Describe the steps to reproduce the behavior.

No response

Expected behavior.

No response

Screenshots.

No response

Operating Environment

Linux

Additional Information

No response

dlarson04 commented 4 months ago

this has been verified.. closing