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

Feat(eos_cli_config_gen): Add global logging event storm-control #2994

Merged
merged 5 commits into from
Jul 25, 2023

Conversation

kmueller68
Copy link
Contributor

Change Summary

Add global configuration to enable event logging for storm-control discards.

access(config)#logging event ?
  congestion-drops  Drops due to congestion
  flowcontrol       Configure syslogging for flowcontrol
  link-status       UPDOWN messages
  login             Login activities
  port-channel      Configure port-channel messages
  spanning-tree     Spanning tree messages
  storm-control     Configure storm-control

access(config)#logging event storm-control ?
  discards  Discards due to storm control

access(config)#logging event storm-control discards ?
  global    Configure global storm control discard logging
  interval  Logging interval

Related Issue(s)

Fixes #2993

Component(s) name

arista.avd.eos_cli_config_gen

Proposed changes

logging:
  event:
    storm_control_discards:
      enable: <bool>
      interval: <int>

How to test

logging:
  event:
    storm_control_discards:
      enable: true
      interval: 10

renders to:

logging event storm-control discards global
logging event storm-control discards interval 10

Checklist

User Checklist

  • N/A

Repository Checklist

  • My code has been rebased from devel before I start
  • I have read the CONTRIBUTING document.
  • My change requires a change to the documentation and documentation have been updated accordingly.
  • I have updated molecule CI testing accordingly. (check the box if not applicable)

@kmueller68 kmueller68 requested review from a team as code owners June 20, 2023 10:57
@github-actions github-actions bot added the role: eos_cli_config_gen issue related to eos_cli_config_gen role label Jun 20, 2023
@hamptonmoore
Copy link
Member

hamptonmoore commented Jun 20, 2023

Hello! I believe your schema changes are in the wrong position as both eos_cli_config_gen.jsonschema.json and eos_cli_config_gen.schema.yml are meant to be automatically generated from the schema_fragments and there aren't any changes to schema_fragements in this PR. Changes should be instead made in ansible_collections/arista/avd/roles/eos_cli_config_gen/schemas/schema_fragments/logging.schema.yml and then rebuilt either by the pre-commit or ansible-playbook playbooks/_build_schemas_and_docs.yml. Also it seems like your last commit which says it added molecule tests, didn't? So it might just be files forgot to be commited

@@ -3922,6 +3922,16 @@ keys:
type: str
valid_values:
- discard
event:
storm_control_discards:
enable: bool
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

enable should include a type member

enable:
    type: bool

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for that inconvenience.
I will correct it tomorrow, since our servers with the development platforms are currently down.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hamptonmoore would this match the correct syntax?

  event:
    type: dict
    keys:
      storm_control_discards:
	type: dict
        keys:
	  enable:
	    type: bool
	  interval:
	    type: int
	    convert_types:
	      - str
	    min: 10
	    max: 65535
	    description: Logging interval in seconds

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That looks good to me! One thing I'm not sure about is if EOS could add future options to storm-control in the future and if we should have discards be in a dict inside of there. Any thoughts @carlbuchmann?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hamptonmoore @carlbuchmann
A comment from my side on this:
Currently EOS storm-control has only the action to "drop/discard" packets exceeding the configured thresholds.

Other vendors also support the action "interface shutdown" when thresholds are exceeded.
So there might be the slightly chance, that "shutdown" could be added in the future and that there would be a syslog message added for this action.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, I agree with @hamptonmoore, so it would be something like this:

  event:
    type: dict
    keys:
      storm_control:
        type: dict
        keys:
          discards:
            type: dict
            keys:
              enable:
                type: bool
              interval:
                type: int
                convert_types:
                  - str
                min: 10
                max: 65535
                description: Logging interval in seconds

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kmueller68 if you need help with schema authoring, we are also available for a live zoom call.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@carlbuchmann thank you very much.
I will prepare things tomorrow and a short "how to do schema" in a zoom session would be very helpful.
Would you be available tomorrow morning EDT?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I will send you an invite!

Copy link
Member

@hamptonmoore hamptonmoore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ClausHolbechArista ClausHolbechArista changed the title Feat(eos_cli_config_gen): add global logging event storm-control Feat(eos_cli_config_gen): Add global logging event storm-control Jul 24, 2023
@carlbuchmann carlbuchmann merged commit c864167 into aristanetworks:devel Jul 25, 2023
39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rn: Feat(eos_cli_config_gen) role: eos_cli_config_gen issue related to eos_cli_config_gen role state: CI Updated CI scenario have been updated in the PR state: Documentation role Updated
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feat(eos_cli_config_gen): add global logging event storm-control
4 participants