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

Bug: Creating pattern with multiple entries in secretBinding array does not work #3907

Closed dlarson04 closed 1 year ago

dlarson04 commented 1 year ago

Describe the bug.

Define a service with 2 secrets - one with node level secrets and one without. Attempt to publish a pattern with 2 entries in secretBinding array

Error is received trying to publish the pattern

:~# export PATTERN_FILE=pattern.txt
:~# hzn exchange pattern publish --json-file=${PATTERN_FILE} --pattern-name DougsMultiSecretPattern -v
[verbose] Reading configuration file: /etc/horizon/hzn.json
[verbose] Reading configuration file: /etc/default/horizon
[verbose] Config file does not exist: /root/.hzn/hzn.json.
[verbose] No project level configuration file found.
[verbose] The exchange url: https://cp-console.ieam-roks-stage-2-70ea81cdef68a2eb78ece6d890b7dad3-0000.us-south.containers.appdomain.cloud/edge-exchange/v1
[verbose] GET https://cp-console.ieam-roks-stage-2-70ea81cdef68a2eb78ece6d890b7dad3-0000.us-south.containers.appdomain.cloud/edge-exchange/v1/admin/version
[verbose] HTTP request timeout set to 30 seconds
[verbose] HTTP code: 200
[verbose] The exchange url: https://cp-console.ieam-roks-stage-2-70ea81cdef68a2eb78ece6d890b7dad3-0000.us-south.containers.appdomain.cloud/edge-exchange/v1
[verbose] Config file does not exist: /root/hzn.json.
[verbose] The exchange url: https://cp-console.ieam-roks-stage-2-70ea81cdef68a2eb78ece6d890b7dad3-0000.us-south.containers.appdomain.cloud/edge-exchange/v1
[verbose] HTTP request timeout set to 30 seconds
Error: Failed to validate the secret binding. Error validating secret bindings for service ieam-roks-stage-2/xx-secret-service-multiarch_1.0.0_amd64. No secret binding found for the following service secrets: [hw_who_2].

Describe the steps to reproduce the behavior.

Here is my service def and pattern

svc.txt pattern.txt

Expected behavior.

Pattern should be publish successfully - with 1 secret using node level secret and one without

Screenshots.

No response

Operating Environment

Linux

Additional Information

No response

dlarson04 commented 1 year ago

Canceling after discussing with @MaxMcAdam