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

Merge with local IDArray referencing external keystore fails #68

Closed
PackeTsar opened this issue Jun 17, 2020 · 0 comments
Closed

Merge with local IDArray referencing external keystore fails #68

PackeTsar opened this issue Jun 17, 2020 · 0 comments

Comments

@PackeTsar
Copy link
Owner

PackeTsar commented Jun 17, 2020

Running a merge-test against a real-ID contained in a locally configured IDArray, where the IDArray matches an externally-stored keystore, fails to match

Reproduction

ZTP Config

ztp set idarray STACK1 SERIAL1 SERIAL2 SERIAL3
#
ztp set external-keystore EXTERNAL type csv
ztp set external-keystore EXTERNAL file '/root/test.csv'

File:/root/test.csv

keystore_id,association,idarray_1,idarray_2,idarray_3,vl1_ip_address,hostname,vl1_netmask
SERIAL100,SHORT_TEMPLATE,,,,10.0.0.201,SOMEDEVICE,
STACK1,LONG_TEMPLATE,,,,10.0.0.200,CORESWITCH,255.255.255.0

File:/root/test.csv Equivalent Local Config

[root@ZTPSERVER ~]# ztp request external-keystore-test EXTERNAL                 
#
#
#
ztp set keystore SERIAL100 keystore_id SERIAL100
ztp set keystore SERIAL100 vl1_ip_address 10.0.0.201
ztp set keystore SERIAL100 hostname SOMEDEVICE
#
ztp set keystore STACK1 keystore_id STACK1
ztp set keystore STACK1 vl1_ip_address 10.0.0.200
ztp set keystore STACK1 hostname CORESWITCH
ztp set keystore STACK1 vl1_netmask 255.255.255.0
#
#
#
#
#
#
ztp set association id SERIAL100 template SHORT_TEMPLATE
ztp set association id STACK1 template LONG_TEMPLATE
#
#
#

Run the Merge-Test

[root@ZTPSERVER ~]# ztp request merge-test SERIAL1              
2020-06-17 16:19:33:   cfact.get_keystore_id: Checking Keystores and IDArrays for (SERIAL1)

2020-06-17 16:19:33:   cfact.get_keystore_id: Checking Keystore names for (SERIAL1)

2020-06-17 16:19:33:   cfact.get_keystore_id: ID (SERIAL1) not found in keystore names, checking local IDArrays

2020-06-17 16:19:33:   cfact.get_keystore_id: ID 'SERIAL1' resolved to arrayname 'STACK1'

2020-06-17 16:19:33:   cfact.get_keystore_id: A keystore matching arrayname 'STACK1' cannot be found. Discarding IDArray match

2020-06-17 16:19:33:   cfact.get_keystore_id: ID (SERIAL1) not found in local IDArrays, checking external Keystore names

2020-06-17 16:19:33:   cfact.get_keystore_id: ID (SERIAL1) not found in external Keystore names, checking external IDArrays

2020-06-17 16:19:33:   cfact.get_keystore_id: ID (SERIAL1) not found in external IDArrays. ID Lookup failed!

2020-06-17 16:19:33:   ID 'SERIAL1' cannot be found!

2020-06-17 16:19:33:   To check for usage of a default keystore use: ztp request default-keystore-test

[root@ZTPSERVER ~]# 
@PackeTsar PackeTsar changed the title Merge-Test with local IDArray referencing external keystore fails Merge with local IDArray referencing external keystore fails Jun 18, 2020
PackeTsar added a commit that referenced this issue Jun 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant