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

Add integration tests for nxos_facts, nxos_bgp, nxos_bgp_af, nxos_bgp_neighbor, and nxos_evpn_global #26924

Merged
merged 10 commits into from
Aug 10, 2017

Conversation

rahushen
Copy link
Contributor

@rahushen rahushen commented Jul 17, 2017

SUMMARY

This PR adds integration tests for the nxos_bgp, nxos_bgp_af, nxos_bgp_neighbor and nxos_evpn_global modules.

ISSUE TYPE
  • Integration Test Pull Request
COMPONENT NAME
  • nxos_bgp
  • nxos_bgp_af
  • nxos_bgp_neighbor
  • nxos_evpn_global
ANSIBLE VERSION
ansible 2.4.0 (devel 24195c9932) last updated 2017/07/17 16:45:40 (GMT -400)
  config file = None
  configured module search path = [u'/Users/rahushen/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /Users/xxx/xxxx/ansible/lib/ansible
  executable location = /Users/xxxx/xxxx/ansible/bin/ansible
  python version = 2.7.12 (v2.7.12:d33e0cf91556, Jun 26 2016, 12:10:39) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)]

@ansibot ansibot added affects_2.4 This issue/PR affects Ansible v2.4 needs_triage Needs a first human triage before being processed. support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Jul 17, 2017
@ansibot
Copy link
Contributor

ansibot commented Jul 17, 2017

The test ansible-test sanity --test yamllint failed with the following errors:

test/integration/targets/nxos_bgp/tests/cli/sanity.yaml:77:7: duplication of key "router_id" in mapping (key-duplicates)
test/integration/targets/nxos_bgp/tests/nxapi/sanity.yaml:77:7: duplication of key "router_id" in mapping (key-duplicates)

click here for bot help

@ansibot ansibot added ci_verified Changes made in this PR are causing tests to fail. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed ci_verified Changes made in this PR are causing tests to fail. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Jul 17, 2017
@jctanner jctanner added the networking Network category label Jul 19, 2017
@jctanner
Copy link
Contributor

@jctanner jctanner added test_pull_requests and removed needs_triage Needs a first human triage before being processed. labels Jul 19, 2017
@rahushen rahushen changed the title Add new ITs for nxos_bgp, nxos_bgp_af, nxos_bgp_neighbor, and nxos_ev… Add new ITs for nxos_facts, nxos_bgp, nxos_bgp_af, nxos_bgp_neighbor, and nxos_evpn_global Jul 20, 2017
@ansibot
Copy link
Contributor

ansibot commented Jul 20, 2017

@rahushen this PR contains the following merge commits:

Please rebase your branch to remove these commits.

click here for bot help

@ansibot ansibot added merge_commit This PR contains at least one merge commit. Please resolve! needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html labels Jul 20, 2017
@ansibot ansibot added needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed merge_commit This PR contains at least one merge commit. Please resolve! needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html labels Jul 20, 2017
@ansibot ansibot removed needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Jul 26, 2017
@gundalow gundalow changed the title Add new ITs for nxos_facts, nxos_bgp, nxos_bgp_af, nxos_bgp_neighbor, and nxos_evpn_global Add integration tests for nxos_facts, nxos_bgp, nxos_bgp_af, nxos_bgp_neighbor, and nxos_evpn_global Jul 26, 2017
@gundalow gundalow added this to the 2.4.0 milestone Jul 26, 2017
@gundalow gundalow requested a review from Qalthos July 26, 2017 16:14
@Qalthos
Copy link
Contributor

Qalthos commented Jul 26, 2017

Status of the tests provided:

  • nxos_bgp works after nxos_bgp: Fix idempotence for event-history #27329, but both neighbor-down fib-accelerate and reconnect-interval report as invalid commands
  • nxos_bgp_af works, but only after appending ignore_errors: yes to Disable feature nv overlay (which matches the Enable feature nv overlay task
  • nxos_bgp_neighbor is better after nxos_bgp_neighbor fixes #27348, with the caveats that shutdown no longer takes default as an option (and the corresponding line in sanity.yaml should be removed), that log-neighbor-changes kicks the commands out of bgp-neighbor into just bgp context, and remove private-as all complains with Please configure a public local-as with no-prepend replace-as to ensure that the real private ASN does not get appended to the AS-PATH
  • nxos_evpn_global looks good to me.

@rahushen
Copy link
Contributor Author

rahushen commented Aug 2, 2017

@Qalthos

  1. Fixed nxos_bgp_af.
  2. nxos_bgp_neighbor - removed the default shutdown from test as it is not supported. And the other 2 issues are what is reference in (P2)nxos_bgp_neighbor - several properties not idempotent #26262. If log_neighbor_changes kicks the command into nxos_bgp then the property doesn't belong to this module ? If remove private-as all complains shouldn't the module fail with that message ? Instead all we get is idempotency check failures.

@ansibot ansibot removed needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Aug 2, 2017
@rahushen
Copy link
Contributor Author

rahushen commented Aug 3, 2017

@Qalthos .... I've added checks in the tests for titanium now. Can you verify ?

Copy link
Contributor

@Qalthos Qalthos left a comment

Choose a reason for hiding this comment

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

This works for me. There's some issues left to be resolved, but with those out of the way, we can finally merge this.

graceful_restart_timers_restart: 130
graceful_restart_timers_stalepath_time: 310
isolate: false
log_neighbor_changes: true
Copy link
Contributor

Choose a reason for hiding this comment

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

log_neighbor_changes needs to be toggled on titanium

Copy link
Contributor

Choose a reason for hiding this comment

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

Hahaha, it was totally my fault x_x

Sorry.

graceful_restart_timers_restart: 130
graceful_restart_timers_stalepath_time: 310
isolate: false
log_neighbor_changes: true
Copy link
Contributor

Choose a reason for hiding this comment

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

And the various parameters

log_neighbor_changes: true
maxas_limit: 50
neighbor_down_fib_accelerate: true
reconnect_interval: 55
Copy link
Contributor

Choose a reason for hiding this comment

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

And reconnect_interval

event_history_detail: size_large
event_history_events: size_medium
event_history_periodic: size_small
suppress_fib_pending: "{{suppress_fib_pending|default(omit)}}"
Copy link
Contributor

Choose a reason for hiding this comment

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

But I don't think suppress_fib_pending does

- debug: msg="START TRANSPORT:CLI nxos_bgp sanity test"

- set_fact: suppress_fib_pending="true"
when: (titanium is defined) and ((titanium | search('true')) != 'true')
Copy link
Contributor

Choose a reason for hiding this comment

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

This test did not work properly as written. when: (titanium is defined) and not ((titanium | search('true'))) did.

- debug: msg="START TRANSPORT:NXAPI nxos_bgp sanity test"

- set_fact: suppress_fib_pending="true"
when: (titanium is defined) and ((titanium | search('true')) != 'true')
Copy link
Contributor

Choose a reason for hiding this comment

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

Again with the test

- set_fact: intname="{{ nxos_int1 }}"

- set_fact: log_neighbor_changes="enable"
when: (titanium is defined) and ((titanium | search('true')) != 'true')
Copy link
Contributor

Choose a reason for hiding this comment

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

Same issue with these tests

- set_fact: intname="{{ nxos_int1 }}"

- set_fact: log_neighbor_changes="enable"
when: (titanium is defined) and ((titanium | search('true')) != 'true')
Copy link
Contributor

Choose a reason for hiding this comment

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

And these tests

@ansibot ansibot added the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. label Aug 7, 2017
@rahushen
Copy link
Contributor Author

rahushen commented Aug 8, 2017

@Qalthos ... review comments have been take care of.

---
- debug: msg="START TRANSPORT:CLI nxos_bgp sanity test"

- set_fact: log_neighbor_changes="true"
Copy link
Contributor

Choose a reason for hiding this comment

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

The comments I made here are gone, and I'm going to assume that this was my fault, because I've been looking at this too long and can't remember what is what anymore.

log_neighbor_changes is not an issue with nxos_bgp (but it is with nxos_bgp_neighbor). Instead, what needs to be turned off here in nxos_bgp (and its twin in nxapi) is neighbor_down_fib_accelerate. Sorry for the confusion

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok fixed. If there are more issues with titanium specifically can we get a whole rundown on the issue rather than piece meal info ? This is incredibly frustating. Ideally, a test against an irrelevant platform shouldn't gate commits.

@ansibot ansibot added needs_ci This PR requires CI testing to be performed. Please close and re-open this PR to trigger CI. and removed needs_ci This PR requires CI testing to be performed. Please close and re-open this PR to trigger CI. labels Aug 9, 2017
@Qalthos
Copy link
Contributor

Qalthos commented Aug 9, 2017

Everything passes here (after #27329 is applied). When Shippable is green, this is good to go

@Qalthos Qalthos merged commit 85fc4c6 into ansible:devel Aug 10, 2017
@dagwieers dagwieers added nxos Cisco NXOS community cisco Cisco technologies labels Feb 22, 2019
@ansible ansible locked and limited conversation to collaborators Apr 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.4 This issue/PR affects Ansible v2.4 cisco Cisco technologies needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. networking Network category nxos Cisco NXOS community support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants