Skip to content

Conversation

@shatoboar
Copy link
Contributor

@shatoboar shatoboar commented Jul 11, 2021

…on, and cleanup during time of removal

Description

This PR is a GSoC project: #4814

This PR adds a feature to L2 persitent networks, where resources of the persistent networks are created at hostConnect phase of DefaultHostListener, and cleaned up at hostAboutToBeRemoved phase.

This PR also fixes a bug, where rebooting the hosts removes the persistent network's resources, without readding them when the host is readded to the zone.

Fixes: #5196

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

This has been manually tested with a mbx KVM, XenServer and VmWare setup on a local machine.

Different manual test scenarios:

  1. When the persistent network is created and the host is added afterwards, the newly added host has the persistent network's resources.
  2. When a host within a zone with a persistent network is removed from the zone, its resources will be cleaned up.
  3. When a host with a running VM is removed from the zone, the running VM will migrate before the resources are cleaned up.
  4. When a host is rebooted, it still has access to the persistent network's resources.

A Marvin component test under
test/integration/component/test_persistent_networks.py
added that tests the following steps for a KVM environment.

  1. identify hosts in the zone, and remove the first
  2. create a L2 persistent network
  3. add the host back to the zone

Validation steps:

  1. Persistent network state should be implemented before adding the host
  2. Host should be added back in successfully
  3. Host should have the persistent networks resources after being added

Test output results should be:

==== Marvin Init Started ====

=== Marvin Parse Config Successful ===

=== Marvin Setting TestData Successful===

==== Log Folder Path: /tmp/MarvinLogs/. All logs will be available here ====

=== Marvin Init Logging Successful===

==== Marvin Init Successful ====
====Trying SSH Connection: Host:172.20.0.121 User:root Port:22 RetryCnt:10===
===SSH to Host 172.20.0.121 port : 22 SUCCESSFUL===
{Cmd: ip addr | grep breth0-991 > /dev/null 2>&1; echo $? via Host: 172.20.0.121} {returns: ['0']}
=== TestName: test_newly_added_host_for_persistent_network_resources | Status : SUCCESS ===

===final results are now copied to: /tmp//MarvinLogs/test_persistent_networks_===

@shatoboar shatoboar marked this pull request as draft July 11, 2021 17:04
@shatoboar shatoboar marked this pull request as ready for review August 13, 2021 22:25
@Pearl1594
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

@Pearl1594 a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Packaging result: ✔️ el7 ✔️ el8 ✔️ debian. SL-JID 889

@Pearl1594
Copy link
Contributor

@blueorangutan test

@blueorangutan
Copy link

@Pearl1594 a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

@blueorangutan
Copy link

Trillian test result (tid-1672)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 43628 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr5195-t1672-kvm-centos7.zip
Intermittent failure detected: /marvin/tests/smoke/test_diagnostics.py
Intermittent failure detected: /marvin/tests/smoke/test_routers_network_ops.py
Intermittent failure detected: /marvin/tests/smoke/test_service_offerings.py
Intermittent failure detected: /marvin/tests/smoke/test_vpc_redundant.py
Smoke tests completed. 87 look OK, 2 have error(s)
Only failed tests results shown below:

Test Result Time (s) Test File
test_01_RVR_Network_FW_PF_SSH_default_routes_egress_true Failure 347.16 test_routers_network_ops.py
test_02_RVR_Network_FW_PF_SSH_default_routes_egress_false Failure 331.69 test_routers_network_ops.py
test_03_create_redundant_VPC_1tier_2VMs_2IPs_2PF_ACL_reboot_routers Failure 533.36 test_vpc_redundant.py
test_05_rvpc_multi_tiers Failure 502.04 test_vpc_redundant.py

@DaanHoogland
Copy link
Contributor

@blueorangutan test keepEnv

@blueorangutan
Copy link

@DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

@blueorangutan
Copy link

Trillian test result (tid-1742)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 34008 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr5195-t1742-kvm-centos7.zip
Smoke tests completed. 89 look OK, 0 have error(s)
Only failed tests results shown below:

Test Result Time (s) Test File

@Pearl1594
Copy link
Contributor

Closing this PR - tracking it with PR #5977

@Pearl1594 Pearl1594 closed this Feb 10, 2022
@apache apache deleted a comment from NuxRo Mar 18, 2022
@yadvr yadvr removed this from the 4.17.0.0 milestone Mar 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

Rebooting a host in a zone, doesn't re-add the persistent network's resources

6 participants