Page MenuHomePhabricator

Extend sre.network.configure-switch-interfaces cookbook to add sflow and qos config
Open, LowPublic

Description

The sre.network.configure-switch-interfaces cookbook currently configures the Juniper switch port a given host is connected to within the JunOS "interfaces" section, which covers the main task of activating the port in the required vlan so the host can communicate.

Homer, however, also enables sflow stats export for any enabled port, and adds qos packet classifiers and schedules under configure.qos.interface. As these elements are not done by the cookbook a Homer run is needed after it is run before the configuration for a given port is 100% complete. It also means that we get warned about config diffs on given devices in the meantime.

So we should probably adjust the cookbook to add the required, in the case of QFX5120:

set class-of-service interfaces <interface> scheduler-map wmf_map
set class-of-service interfaces <interface> unit 0 classifiers dscp v4_classifier
set class-of-service interfaces <interface> unit 0 classifiers dscp-ipv6 v6_classifier
set protocols sflow interfaces <interface>.0

Or for legacy QFX5100 / VC devices:

set class-of-service interfaces <interface> forwarding-class-set wmf_classes output-traffic-control-profile wmf_tc_profile
set class-of-service interfaces <interface> unit 0 classifiers dscp v4_classifier

I don't think this should be a huge problem to add to the commands the cookbook runs to include these, I will prep a patch.

Event Timeline

cmooney created this task.

I discussed this briefly with @ayounsi on irc and while this is probably a good idea it won't, as things stand, prevent us getting emails from the automated homer diff. Reason being the order of commands causes a diff and homer will apply them in a different order (it makes no difference to device operation).

Still probably a good idea. We may also want to adjust the Homer 'diff' function so it does not care about inconsequential re-ordered lines, i.e. the ones prefixed with an exclamation mark rather than a plus or minus in the diff.