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

eos_portchannel members not idempotent when interface order is not the same #46

Closed
jerearista opened this issue Oct 16, 2015 · 2 comments
Assignees
Labels
Milestone

Comments

@jerearista
Copy link
Contributor

hiera: eos_config::portchannel::members: ['Ethernet1', 'Ethernet2']
Switch state:

show port-channel 1 all-ports
Port Channel Port-Channel1:
  Active Ports: Ethernet2 
  Configured, but inactive ports:
       Port         Reason unconfigured                                   
    --------------- ----------------------------------------------------- 
       Ethernet1    LACP negotiated incompatible aggregate (check config) 

Produces:

Notice: /Stage[main]/Eos_config::Portchannel/Eos_portchannel[Port-Channel1]/members: members changed ['Ethernet2', 'Ethernet1'] to 'Ethernet1 Ethernet2'

Suspect this could be equally reproducible in a normal state with eos_config::portchannel::members: ['Ethernet2', 'Ethernet1']

@devrobo
Copy link
Contributor

devrobo commented Oct 20, 2015

Create a puppet test with interfaces in reverse order and verify that we hit the idempotency issue.
Can we just sort the interface names so they are always processed in the same order?

@devrobo devrobo self-assigned this Oct 20, 2015
@devrobo
Copy link
Contributor

devrobo commented Nov 8, 2015

Turns out fixing this in puppet is very simple. Override the insync? method in the type for the property:

# Sort the arrays before comparing

def insync?(current)

  current.sort == should.sort

end

We need to fix all the types that have this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants