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

Data model issues after upgrading to 5.0 #4686

Open
1 task done
duddis1 opened this issue Nov 5, 2024 · 6 comments
Open
1 task done

Data model issues after upgrading to 5.0 #4686

duddis1 opened this issue Nov 5, 2024 · 6 comments
Labels
type: enhancement New feature or request

Comments

@duddis1
Copy link

duddis1 commented Nov 5, 2024

Enhancement summary

We are trying to adopt arista AVD version v5.0.0, and finding below validation errors.

ERROR! [MBH-CAMP0S]: 'Validation Error: servers': Invalid type 'dict'. Expected a 'list'.
ERROR! [MBH-CAMP0S]: 'Validation Error: tenants': Invalid type 'dict'. Expected a 'list'.
ERROR! [MBH-CAMP0S]: 'Validation Error: l3_edge.p2p_links_ip_pools': Invalid type 'dict'. Expected a 'list'.
ERROR! [MBH-CAMP0S]: 'Validation Error: local_users': Invalid type 'dict'. Expected a 'list'.
ERROR! [MBH-CAMP0S]: 'Validation Error: node_type_keys': Primary key 'key' is not set on all items as required.
ERROR! [MBH-CAMP0S]: 'Validation Error: port_profiles[15].dot1x': Unexpected key(s) 'eapol' found in dict.

We can find from the release notes Data model changes from “dict-of-dicts” to “list-of-dicts” for only Ethernet interfaces, and you are using the key as "name" for the Ethernet interface name.

ethernet_interfaces:
-  Ethernet1:   # <-- User defined key
+  - name: Ethernet1 # <-- "name" here is called the "primary_key" which must have a unique value across all list elements
    <...>

but we can't find the key name for ip_address and ip_helper attributes, please let us know which key we have to use for ip_address and ip_helper values while converting them to list of lists.

Which component of AVD is impacted

eos_cli_config_gen

Use case example

We tried populating the config using below list of lists format for ip_helpers and ip_address for bgp_peers, but getting error saying ip_helper is not a valid key.

        ip_helpers:
        - ip_helper: 10.254.52.5
      bgp_peers:
      - local_as: 65106
        remote_as: 204260
        description: em-palo-3220-a
        ip_address: 192.168.100.158
        nodes:
        - MBH-BL1A

Describe the solution you would like

The config should access the key names ip_helper and ip_address as detailed below.

        ip_helpers:
        - ip_helper: 10.254.52.5
      bgp_peers:
      - local_as: 65106
        remote_as: 204260
        description: em-palo-3220-a
        ip_address: 192.168.100.158
        nodes:
        - MBH-BL1A

Describe alternatives you have considered

No response

Additional context

No response

Contributing Guide

  • I agree to follow this project's Code of Conduct
@duddis1 duddis1 added the type: enhancement New feature or request label Nov 5, 2024
@duddis1
Copy link
Author

duddis1 commented Nov 5, 2024

also, please advise how can we resolve the below two errors, if you have any idea?

ERROR! [MBH-CAMP0S]: 'Validation Error: node_type_keys': Primary key 'key' is not set on all items as required.
ERROR! [MBH-CAMP0S]: 'Validation Error: port_profiles[15].dot1x': Unexpected key(s) 'eapol' found in dict.

@ClausHolbechArista
Copy link
Contributor

The primary key is always the first key shown in the documentation for a given list of dicts.
You suggestion for ip_helper looks good to me, and we use the same in our test cases.

            ip_helpers:
              - ip_helper: 1.1.1.1

ERROR! [MBH-CAMP0S]: 'Validation Error: node_type_keys': Primary key 'key' is not set on all items as required.

Without seeing your inputs for node_type_keys I cannot say anything else than the error states. You are missing a key named key on one of the list elements.

ERROR! [MBH-CAMP0S]: 'Validation Error: port_profiles[15].dot1x': Unexpected key(s) 'eapol' found in dict.

The eapol key is not supported under the port-profiles according to the documentation and schema, but it actually works because the underlying code is "lazy". We will be adding support for all the dot1x knobs in AVD 5.1.

Until then you can move the dot1x key under structured_config and it will render correctly.

@ClausHolbechArista ClausHolbechArista changed the title Feature request Title Data model issues after upgrading to 5.0 Nov 6, 2024
@duddis1
Copy link
Author

duddis1 commented Nov 11, 2024

Thanks for providing the details!

if I move dot1x key under structured_config it is rendering correctly, but it is applied to all the switches. I have to see whether I can restrict this in populating for only campus switches.

also , I have amended the type for node_type_keys from spine to l2spine as mentioned in below link
(#4340), but still seeing below validation errors. Can you please advise on these errors?

ERROR! [MBH-SPINE1]: 'Validation Error: node_type_keys': Primary key 'key' is not set on all items as required.
ERROR! [MBH-SPINE1]: 'Validation Error: type': 'spine' is not one of ['bleaf', 'campus', 'ixleaf', 'l2leaf', 'l3leaf', 'overlay-controller', 'l2spine', 'super-spine']

@duddis1
Copy link
Author

duddis1 commented Nov 11, 2024

node_type_keys

I have attached the screenshot for the node_type_keys config, what is the Primary key 'key' in node_type_keys the config is expecting?

@ClausHolbechArista
Copy link
Contributor

You need to add key which refers to the key like l3leaf under which you set defaults, nodes etc. The value of type is the value that goes under the type: <type> which may or may not be the same.

@ClausHolbechArista
Copy link
Contributor

if I move dot1x key under structured_config it is rendering correctly, but it is applied to all the switches. I have to see whether I can restrict this in populating for only campus switches.

I meant add it under the structured_config key on the endpoint directly. Then it will only render for the ports pointing to this endpoint. If you need it on multiple ports, you can use port_profiles.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants