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 test to verify host networking setup & cleanup #1457

Merged
merged 2 commits into from
May 6, 2021

Conversation

abhipth
Copy link
Contributor

@abhipth abhipth commented May 5, 2021

What type of PR is this?
Adds integration test to verify host networking setup and cleanup on a single node. In future, we will modify the test to run as a DaemonSet and verify host side networking across all nodes.

Which issue does this PR fix:
Adds integration test.

What does this PR do / Why do we need it:
Adds integration test.

If an issue # is not available please add repro steps and logs from IPAMD/CNI showing the issue:
NA

Testing done on this change:

Running Suite: CNI Pod Networking Suite
=======================================
Random Seed: 1620222143
Will run 2 of 9 specs

STEP: creating test namespace
STEP: getting the node with the node label key NGName and value eks-2021042623-coffeepowo4c-ng-al2-cpu
STEP: verifying more than 1 nodes are present for the test
STEP: getting the instance type from node label beta.kubernetes.io/instance-type
STEP: getting the network interface details from ec2
STEP: describing the VPC to get the VPC CIDRs
STEP: getting the aws-node daemon set in namesapce kube-system
STEP: setting the environment variables on the ds to map[WARM_ENI_TARGET:0 WARM_IP_TARGET:3]
STEP: updating the daemon set with new environment variable
SSS
------------------------------
test host networking when pods using IP from primary and secondary ENI are created 
  should have correct host networking setup when running and cleaned up once terminated
  /Users/abhipth/go/src/github.com/aws/amazon-vpc-cni-k8s/test/integration-new/cni/host_networking_test.go:47
STEP: creating a deployment to launch pod using primary and secondary ENI IP
STEP: getting the list of pods using IP from primary and secondary ENI
STEP: generating the pod networking validation input to be passed to tester
STEP: validating host networking setup is setup correctly
STEP: creating pod to test host networking setup
2021/05/05 13:44:05 list of pod against which test will be run [{deployment-test-548f675f8c-wsg7f cni-automation 10.2.28.232 false} {deployment-test-548f675f8c-vbth6 cni-automation 10.2.96.9 false} {deployment-test-548f675f8c-65pt2 cni-automation 10.2.120.175 false} {deployment-test-548f675f8c-h7fwq cni-automation 10.2.43.44 false} {deployment-test-548f675f8c-8j4xn cni-automation 10.2.42.44 false} {deployment-test-548f675f8c-jc5mw cni-automation 10.2.30.77 false} {deployment-test-548f675f8c-2wzb6 cni-automation 10.2.111.19 false} {deployment-test-548f675f8c-chfwg cni-automation 10.2.101.83 false} {deployment-test-548f675f8c-mbfdd cni-automation 10.2.168.23 false} {deployment-test-548f675f8c-qbtsc cni-automation 10.2.236.247 false} {deployment-test-548f675f8c-tn4c8 cni-automation 10.2.82.250 false} {deployment-test-548f675f8c-2jskq cni-automation 10.2.202.184 false} {deployment-test-548f675f8c-frlwj cni-automation 10.2.220.255 false} {deployment-test-548f675f8c-vfghr cni-automation 10.2.176.231 true} {deployment-test-548f675f8c-scgll cni-automation 10.2.60.41 true} {deployment-test-548f675f8c-4g5md cni-automation 10.2.55.240 true} {deployment-test-548f675f8c-28fp2 cni-automation 10.2.38.51 true} {deployment-test-548f675f8c-wft7n cni-automation 10.2.66.51 true} {deployment-test-548f675f8c-qtc7h cni-automation 10.2.48.70 true} {deployment-test-548f675f8c-f9xdg cni-automation 10.2.151.102 true} {deployment-test-548f675f8c-wksjq cni-automation 10.2.0.234 true} {deployment-test-548f675f8c-b8hjs cni-automation 10.2.84.59 true} {deployment-test-548f675f8c-5lrtp cni-automation 10.2.46.120 true} {deployment-test-548f675f8c-b5hhh cni-automation 10.2.141.254 true} {deployment-test-548f675f8c-w44gt cni-automation 10.2.247.221 true} {deployment-test-548f675f8c-gbjgt cni-automation 10.2.107.125 true} {deployment-test-548f675f8c-n5l5f cni-automation 10.2.89.253 true} {deployment-test-548f675f8c-2fdhb cni-automation 10.2.181.176 true} {deployment-test-548f675f8c-d5mwc cni-automation 10.2.143.217 true} {deployment-test-548f675f8c-fn8qv cni-automation 10.2.121.121 true}]
2021/05/05 13:44:05 testing networking is setup for regular pods
2021/05/05 13:44:05 testing for Pod name: deployment-test-548f675f8c-wsg7f Namespace: cni-automation, IP: 10.2.28.232, IP on secondary ENI: false
2021/05/05 13:44:05 found veth pair eni52ef0a96f22 in host network namespace in up state with index 491
2021/05/05 13:44:05 found rule for main route table to 10.2.28.232/32 with priority 
2021/05/05 13:44:05 found route to 10.2.28.232/32 with link index 491
2021/05/05 13:44:05 validation for pod cni-automation/deployment-test-548f675f8c-wsg7f succeeded
2021/05/05 13:44:05 testing for Pod name: deployment-test-548f675f8c-vbth6 Namespace: cni-automation, IP: 10.2.96.9, IP on secondary ENI: false
2021/05/05 13:44:05 found veth pair eni5e9738d736a in host network namespace in up state with index 489
2021/05/05 13:44:05 found rule for main route table to 10.2.96.9/32 with priority 
2021/05/05 13:44:05 found route to 10.2.96.9/32 with link index 489
2021/05/05 13:44:05 validation for pod cni-automation/deployment-test-548f675f8c-vbth6 succeeded
2021/05/05 13:44:05 testing for Pod name: deployment-test-548f675f8c-65pt2 Namespace: cni-automation, IP: 10.2.120.175, IP on secondary ENI: false
2021/05/05 13:44:05 found veth pair eni888e74effe7 in host network namespace in up state with index 495
2021/05/05 13:44:05 found rule for main route table to 10.2.120.175/32 with priority 
2021/05/05 13:44:05 found route to 10.2.120.175/32 with link index 495
2021/05/05 13:44:05 validation for pod cni-automation/deployment-test-548f675f8c-65pt2 succeeded
2021/05/05 13:44:05 testing for Pod name: deployment-test-548f675f8c-h7fwq Namespace: cni-automation, IP: 10.2.43.44, IP on secondary ENI: false
2021/05/05 13:44:05 found veth pair eni114f44db5bf in host network namespace in up state with index 493
2021/05/05 13:44:05 found rule for main route table to 10.2.43.44/32 with priority 
2021/05/05 13:44:05 found route to 10.2.43.44/32 with link index 493
2021/05/05 13:44:05 validation for pod cni-automation/deployment-test-548f675f8c-h7fwq succeeded
2021/05/05 13:44:05 testing for Pod name: deployment-test-548f675f8c-8j4xn Namespace: cni-automation, IP: 10.2.42.44, IP on secondary ENI: false
2021/05/05 13:44:05 found veth pair enia5bef95afdc in host network namespace in up state with index 501
2021/05/05 13:44:05 found rule for main route table to 10.2.42.44/32 with priority 
2021/05/05 13:44:05 found route to 10.2.42.44/32 with link index 501
2021/05/05 13:44:05 validation for pod cni-automation/deployment-test-548f675f8c-8j4xn succeeded
2021/05/05 13:44:05 testing for Pod name: deployment-test-548f675f8c-jc5mw Namespace: cni-automation, IP: 10.2.30.77, IP on secondary ENI: false
2021/05/05 13:44:05 found veth pair eni3703cc9a0ba in host network namespace in up state with index 498
2021/05/05 13:44:05 found rule for main route table to 10.2.30.77/32 with priority 
2021/05/05 13:44:05 found route to 10.2.30.77/32 with link index 498
2021/05/05 13:44:05 validation for pod cni-automation/deployment-test-548f675f8c-jc5mw succeeded
2021/05/05 13:44:05 testing for Pod name: deployment-test-548f675f8c-2wzb6 Namespace: cni-automation, IP: 10.2.111.19, IP on secondary ENI: false
2021/05/05 13:44:05 found veth pair eni8db8dc4a94f in host network namespace in up state with index 494
2021/05/05 13:44:05 found rule for main route table to 10.2.111.19/32 with priority 
2021/05/05 13:44:05 found route to 10.2.111.19/32 with link index 494
2021/05/05 13:44:05 validation for pod cni-automation/deployment-test-548f675f8c-2wzb6 succeeded
2021/05/05 13:44:05 testing for Pod name: deployment-test-548f675f8c-chfwg Namespace: cni-automation, IP: 10.2.101.83, IP on secondary ENI: false
2021/05/05 13:44:05 found veth pair eni8289bf3f732 in host network namespace in up state with index 496
2021/05/05 13:44:05 found rule for main route table to 10.2.101.83/32 with priority 
2021/05/05 13:44:05 found route to 10.2.101.83/32 with link index 496
2021/05/05 13:44:05 validation for pod cni-automation/deployment-test-548f675f8c-chfwg succeeded
2021/05/05 13:44:05 testing for Pod name: deployment-test-548f675f8c-mbfdd Namespace: cni-automation, IP: 10.2.168.23, IP on secondary ENI: false
2021/05/05 13:44:05 found veth pair enica3d5bbc57d in host network namespace in up state with index 500
2021/05/05 13:44:05 found rule for main route table to 10.2.168.23/32 with priority 
2021/05/05 13:44:05 found route to 10.2.168.23/32 with link index 500
2021/05/05 13:44:05 validation for pod cni-automation/deployment-test-548f675f8c-mbfdd succeeded
2021/05/05 13:44:05 testing for Pod name: deployment-test-548f675f8c-qbtsc Namespace: cni-automation, IP: 10.2.236.247, IP on secondary ENI: false
2021/05/05 13:44:05 found veth pair eni9b38d90f3c9 in host network namespace in up state with index 490
2021/05/05 13:44:05 found rule for main route table to 10.2.236.247/32 with priority 
2021/05/05 13:44:05 found route to 10.2.236.247/32 with link index 490
2021/05/05 13:44:05 validation for pod cni-automation/deployment-test-548f675f8c-qbtsc succeeded
2021/05/05 13:44:05 testing for Pod name: deployment-test-548f675f8c-tn4c8 Namespace: cni-automation, IP: 10.2.82.250, IP on secondary ENI: false
2021/05/05 13:44:05 found veth pair eni77210e0df20 in host network namespace in up state with index 497
2021/05/05 13:44:05 found rule for main route table to 10.2.82.250/32 with priority 
2021/05/05 13:44:05 found route to 10.2.82.250/32 with link index 497
2021/05/05 13:44:05 validation for pod cni-automation/deployment-test-548f675f8c-tn4c8 succeeded
2021/05/05 13:44:05 testing for Pod name: deployment-test-548f675f8c-2jskq Namespace: cni-automation, IP: 10.2.202.184, IP on secondary ENI: false
2021/05/05 13:44:05 found veth pair eni5c820c1eece in host network namespace in up state with index 492
2021/05/05 13:44:05 found rule for main route table to 10.2.202.184/32 with priority 
2021/05/05 13:44:05 found route to 10.2.202.184/32 with link index 492
2021/05/05 13:44:05 validation for pod cni-automation/deployment-test-548f675f8c-2jskq succeeded
2021/05/05 13:44:05 testing for Pod name: deployment-test-548f675f8c-frlwj Namespace: cni-automation, IP: 10.2.220.255, IP on secondary ENI: false
2021/05/05 13:44:05 found veth pair eni28943652d11 in host network namespace in up state with index 499
2021/05/05 13:44:05 found rule for main route table to 10.2.220.255/32 with priority 
2021/05/05 13:44:05 found route to 10.2.220.255/32 with link index 499
2021/05/05 13:44:05 validation for pod cni-automation/deployment-test-548f675f8c-frlwj succeeded
2021/05/05 13:44:05 testing for Pod name: deployment-test-548f675f8c-vfghr Namespace: cni-automation, IP: 10.2.176.231, IP on secondary ENI: true
2021/05/05 13:44:05 found veth pair enibd089252e2c in host network namespace in up state with index 487
2021/05/05 13:44:05 found rule for main route table to 10.2.176.231/32 with priority 
2021/05/05 13:44:05 found route to 10.2.176.231/32 with link index 487
2021/05/05 13:44:05 validated all routes for VPC CIDR [10.0.0.0/16 10.1.0.0/16 10.2.0.0/16 10.3.0.0/16] are present for secondary ENI
2021/05/05 13:44:05 validation for pod cni-automation/deployment-test-548f675f8c-vfghr succeeded
2021/05/05 13:44:05 testing for Pod name: deployment-test-548f675f8c-scgll Namespace: cni-automation, IP: 10.2.60.41, IP on secondary ENI: true
2021/05/05 13:44:05 found veth pair eni6bda2d80322 in host network namespace in up state with index 486
2021/05/05 13:44:05 found rule for main route table to 10.2.60.41/32 with priority 
2021/05/05 13:44:05 found route to 10.2.60.41/32 with link index 486
2021/05/05 13:44:05 validated all routes for VPC CIDR [10.0.0.0/16 10.1.0.0/16 10.2.0.0/16 10.3.0.0/16] are present for secondary ENI
2021/05/05 13:44:05 validation for pod cni-automation/deployment-test-548f675f8c-scgll succeeded
2021/05/05 13:44:05 testing for Pod name: deployment-test-548f675f8c-4g5md Namespace: cni-automation, IP: 10.2.55.240, IP on secondary ENI: true
2021/05/05 13:44:05 found veth pair eni8987b716c7b in host network namespace in up state with index 488
2021/05/05 13:44:05 found rule for main route table to 10.2.55.240/32 with priority 
2021/05/05 13:44:05 found route to 10.2.55.240/32 with link index 488
2021/05/05 13:44:05 validated all routes for VPC CIDR [10.0.0.0/16 10.1.0.0/16 10.2.0.0/16 10.3.0.0/16] are present for secondary ENI
2021/05/05 13:44:05 validation for pod cni-automation/deployment-test-548f675f8c-4g5md succeeded
2021/05/05 13:44:05 testing for Pod name: deployment-test-548f675f8c-28fp2 Namespace: cni-automation, IP: 10.2.38.51, IP on secondary ENI: true
2021/05/05 13:44:05 found veth pair eni19da3bb71d1 in host network namespace in up state with index 503
2021/05/05 13:44:05 found rule for main route table to 10.2.38.51/32 with priority 
2021/05/05 13:44:05 found route to 10.2.38.51/32 with link index 503
2021/05/05 13:44:05 validated all routes for VPC CIDR [10.0.0.0/16 10.1.0.0/16 10.2.0.0/16 10.3.0.0/16] are present for secondary ENI
2021/05/05 13:44:05 validation for pod cni-automation/deployment-test-548f675f8c-28fp2 succeeded
2021/05/05 13:44:05 testing for Pod name: deployment-test-548f675f8c-wft7n Namespace: cni-automation, IP: 10.2.66.51, IP on secondary ENI: true
2021/05/05 13:44:05 found veth pair eni1be9dbee935 in host network namespace in up state with index 502
2021/05/05 13:44:05 found rule for main route table to 10.2.66.51/32 with priority 
2021/05/05 13:44:05 found route to 10.2.66.51/32 with link index 502
2021/05/05 13:44:05 validated all routes for VPC CIDR [10.0.0.0/16 10.1.0.0/16 10.2.0.0/16 10.3.0.0/16] are present for secondary ENI
2021/05/05 13:44:05 validation for pod cni-automation/deployment-test-548f675f8c-wft7n succeeded
2021/05/05 13:44:05 testing for Pod name: deployment-test-548f675f8c-qtc7h Namespace: cni-automation, IP: 10.2.48.70, IP on secondary ENI: true
2021/05/05 13:44:05 found veth pair eni7b68ee8b2eb in host network namespace in up state with index 506
2021/05/05 13:44:05 found rule for main route table to 10.2.48.70/32 with priority 
2021/05/05 13:44:05 found route to 10.2.48.70/32 with link index 506
2021/05/05 13:44:05 validated all routes for VPC CIDR [10.0.0.0/16 10.1.0.0/16 10.2.0.0/16 10.3.0.0/16] are present for secondary ENI
2021/05/05 13:44:05 validation for pod cni-automation/deployment-test-548f675f8c-qtc7h succeeded
2021/05/05 13:44:05 testing for Pod name: deployment-test-548f675f8c-f9xdg Namespace: cni-automation, IP: 10.2.151.102, IP on secondary ENI: true
2021/05/05 13:44:05 found veth pair eni91d9373c9a2 in host network namespace in up state with index 507
2021/05/05 13:44:05 found rule for main route table to 10.2.151.102/32 with priority 
2021/05/05 13:44:05 found route to 10.2.151.102/32 with link index 507
2021/05/05 13:44:05 validated all routes for VPC CIDR [10.0.0.0/16 10.1.0.0/16 10.2.0.0/16 10.3.0.0/16] are present for secondary ENI
2021/05/05 13:44:05 validation for pod cni-automation/deployment-test-548f675f8c-f9xdg succeeded
2021/05/05 13:44:05 testing for Pod name: deployment-test-548f675f8c-wksjq Namespace: cni-automation, IP: 10.2.0.234, IP on secondary ENI: true
2021/05/05 13:44:05 found veth pair eni0bd9284de5e in host network namespace in up state with index 510
2021/05/05 13:44:05 found rule for main route table to 10.2.0.234/32 with priority 
2021/05/05 13:44:05 found route to 10.2.0.234/32 with link index 510
2021/05/05 13:44:05 validated all routes for VPC CIDR [10.0.0.0/16 10.1.0.0/16 10.2.0.0/16 10.3.0.0/16] are present for secondary ENI
2021/05/05 13:44:05 validation for pod cni-automation/deployment-test-548f675f8c-wksjq succeeded
2021/05/05 13:44:05 testing for Pod name: deployment-test-548f675f8c-b8hjs Namespace: cni-automation, IP: 10.2.84.59, IP on secondary ENI: true
2021/05/05 13:44:05 found veth pair eni5f8316fa713 in host network namespace in up state with index 504
2021/05/05 13:44:05 found rule for main route table to 10.2.84.59/32 with priority 
2021/05/05 13:44:05 found route to 10.2.84.59/32 with link index 504
2021/05/05 13:44:05 validated all routes for VPC CIDR [10.0.0.0/16 10.1.0.0/16 10.2.0.0/16 10.3.0.0/16] are present for secondary ENI
2021/05/05 13:44:05 validation for pod cni-automation/deployment-test-548f675f8c-b8hjs succeeded
2021/05/05 13:44:05 testing for Pod name: deployment-test-548f675f8c-5lrtp Namespace: cni-automation, IP: 10.2.46.120, IP on secondary ENI: true
2021/05/05 13:44:05 found veth pair eni9f04c93a03c in host network namespace in up state with index 505
2021/05/05 13:44:05 found rule for main route table to 10.2.46.120/32 with priority 
2021/05/05 13:44:05 found route to 10.2.46.120/32 with link index 505
2021/05/05 13:44:05 validated all routes for VPC CIDR [10.0.0.0/16 10.1.0.0/16 10.2.0.0/16 10.3.0.0/16] are present for secondary ENI
2021/05/05 13:44:05 validation for pod cni-automation/deployment-test-548f675f8c-5lrtp succeeded
2021/05/05 13:44:05 testing for Pod name: deployment-test-548f675f8c-b5hhh Namespace: cni-automation, IP: 10.2.141.254, IP on secondary ENI: true
2021/05/05 13:44:05 found veth pair eni6829bd21062 in host network namespace in up state with index 512
2021/05/05 13:44:05 found rule for main route table to 10.2.141.254/32 with priority 
2021/05/05 13:44:05 found route to 10.2.141.254/32 with link index 512
2021/05/05 13:44:05 validated all routes for VPC CIDR [10.0.0.0/16 10.1.0.0/16 10.2.0.0/16 10.3.0.0/16] are present for secondary ENI
2021/05/05 13:44:05 validation for pod cni-automation/deployment-test-548f675f8c-b5hhh succeeded
2021/05/05 13:44:05 testing for Pod name: deployment-test-548f675f8c-w44gt Namespace: cni-automation, IP: 10.2.247.221, IP on secondary ENI: true
2021/05/05 13:44:05 found veth pair eni35a139e522b in host network namespace in up state with index 509
2021/05/05 13:44:05 found rule for main route table to 10.2.247.221/32 with priority 
2021/05/05 13:44:05 found route to 10.2.247.221/32 with link index 509
2021/05/05 13:44:05 validated all routes for VPC CIDR [10.0.0.0/16 10.1.0.0/16 10.2.0.0/16 10.3.0.0/16] are present for secondary ENI
2021/05/05 13:44:05 validation for pod cni-automation/deployment-test-548f675f8c-w44gt succeeded
2021/05/05 13:44:05 testing for Pod name: deployment-test-548f675f8c-gbjgt Namespace: cni-automation, IP: 10.2.107.125, IP on secondary ENI: true
2021/05/05 13:44:05 found veth pair eni175b5864ab8 in host network namespace in up state with index 508
2021/05/05 13:44:05 found rule for main route table to 10.2.107.125/32 with priority 
2021/05/05 13:44:05 found route to 10.2.107.125/32 with link index 508
2021/05/05 13:44:05 validated all routes for VPC CIDR [10.0.0.0/16 10.1.0.0/16 10.2.0.0/16 10.3.0.0/16] are present for secondary ENI
2021/05/05 13:44:05 validation for pod cni-automation/deployment-test-548f675f8c-gbjgt succeeded
2021/05/05 13:44:05 testing for Pod name: deployment-test-548f675f8c-n5l5f Namespace: cni-automation, IP: 10.2.89.253, IP on secondary ENI: true
2021/05/05 13:44:05 found veth pair eni36a55da23ad in host network namespace in up state with index 511
2021/05/05 13:44:05 found rule for main route table to 10.2.89.253/32 with priority 
2021/05/05 13:44:05 found route to 10.2.89.253/32 with link index 511
2021/05/05 13:44:05 validated all routes for VPC CIDR [10.0.0.0/16 10.1.0.0/16 10.2.0.0/16 10.3.0.0/16] are present for secondary ENI
2021/05/05 13:44:05 validation for pod cni-automation/deployment-test-548f675f8c-n5l5f succeeded
2021/05/05 13:44:05 testing for Pod name: deployment-test-548f675f8c-2fdhb Namespace: cni-automation, IP: 10.2.181.176, IP on secondary ENI: true
2021/05/05 13:44:05 found veth pair eni3fb9c3a51c7 in host network namespace in up state with index 514
2021/05/05 13:44:05 found rule for main route table to 10.2.181.176/32 with priority 
2021/05/05 13:44:05 found route to 10.2.181.176/32 with link index 514
2021/05/05 13:44:05 validated all routes for VPC CIDR [10.0.0.0/16 10.1.0.0/16 10.2.0.0/16 10.3.0.0/16] are present for secondary ENI
2021/05/05 13:44:05 validation for pod cni-automation/deployment-test-548f675f8c-2fdhb succeeded
2021/05/05 13:44:05 testing for Pod name: deployment-test-548f675f8c-d5mwc Namespace: cni-automation, IP: 10.2.143.217, IP on secondary ENI: true
2021/05/05 13:44:05 found veth pair eni98ecebcc14f in host network namespace in up state with index 515
2021/05/05 13:44:05 found rule for main route table to 10.2.143.217/32 with priority 
2021/05/05 13:44:05 found route to 10.2.143.217/32 with link index 515
2021/05/05 13:44:05 validated all routes for VPC CIDR [10.0.0.0/16 10.1.0.0/16 10.2.0.0/16 10.3.0.0/16] are present for secondary ENI
2021/05/05 13:44:05 validation for pod cni-automation/deployment-test-548f675f8c-d5mwc succeeded
2021/05/05 13:44:05 testing for Pod name: deployment-test-548f675f8c-fn8qv Namespace: cni-automation, IP: 10.2.121.121, IP on secondary ENI: true
2021/05/05 13:44:05 found veth pair eni1b6d6f3d41b in host network namespace in up state with index 516
2021/05/05 13:44:05 found rule for main route table to 10.2.121.121/32 with priority 
2021/05/05 13:44:05 found route to 10.2.121.121/32 with link index 516
2021/05/05 13:44:05 validated all routes for VPC CIDR [10.0.0.0/16 10.1.0.0/16 10.2.0.0/16 10.3.0.0/16] are present for secondary ENI
2021/05/05 13:44:05 validation for pod cni-automation/deployment-test-548f675f8c-fn8qv succeeded
2021/05/05 13:44:05 validated route table for secondary ENI 3 has right routes
2021/05/05 13:44:05 validated route table for secondary ENI 2 has right routes

STEP: deleting the host networking setup pod
STEP: deleting the deployment to test teardown
STEP: waiting to allow CNI to tear down networking for terminated pods
STEP: validating host networking is teared down correctly
STEP: creating pod to test host networking setup
2021/05/05 13:45:11 list of pod against which test will be run [{deployment-test-548f675f8c-wsg7f cni-automation 10.2.28.232 false} {deployment-test-548f675f8c-vbth6 cni-automation 10.2.96.9 false} {deployment-test-548f675f8c-65pt2 cni-automation 10.2.120.175 false} {deployment-test-548f675f8c-h7fwq cni-automation 10.2.43.44 false} {deployment-test-548f675f8c-8j4xn cni-automation 10.2.42.44 false} {deployment-test-548f675f8c-jc5mw cni-automation 10.2.30.77 false} {deployment-test-548f675f8c-2wzb6 cni-automation 10.2.111.19 false} {deployment-test-548f675f8c-chfwg cni-automation 10.2.101.83 false} {deployment-test-548f675f8c-mbfdd cni-automation 10.2.168.23 false} {deployment-test-548f675f8c-qbtsc cni-automation 10.2.236.247 false} {deployment-test-548f675f8c-tn4c8 cni-automation 10.2.82.250 false} {deployment-test-548f675f8c-2jskq cni-automation 10.2.202.184 false} {deployment-test-548f675f8c-frlwj cni-automation 10.2.220.255 false} {deployment-test-548f675f8c-vfghr cni-automation 10.2.176.231 true} {deployment-test-548f675f8c-scgll cni-automation 10.2.60.41 true} {deployment-test-548f675f8c-4g5md cni-automation 10.2.55.240 true} {deployment-test-548f675f8c-28fp2 cni-automation 10.2.38.51 true} {deployment-test-548f675f8c-wft7n cni-automation 10.2.66.51 true} {deployment-test-548f675f8c-qtc7h cni-automation 10.2.48.70 true} {deployment-test-548f675f8c-f9xdg cni-automation 10.2.151.102 true} {deployment-test-548f675f8c-wksjq cni-automation 10.2.0.234 true} {deployment-test-548f675f8c-b8hjs cni-automation 10.2.84.59 true} {deployment-test-548f675f8c-5lrtp cni-automation 10.2.46.120 true} {deployment-test-548f675f8c-b5hhh cni-automation 10.2.141.254 true} {deployment-test-548f675f8c-w44gt cni-automation 10.2.247.221 true} {deployment-test-548f675f8c-gbjgt cni-automation 10.2.107.125 true} {deployment-test-548f675f8c-n5l5f cni-automation 10.2.89.253 true} {deployment-test-548f675f8c-2fdhb cni-automation 10.2.181.176 true} {deployment-test-548f675f8c-d5mwc cni-automation 10.2.143.217 true} {deployment-test-548f675f8c-fn8qv cni-automation 10.2.121.121 true}]
2021/05/05 13:45:11 testing network is teared down for regular pods
2021/05/05 13:45:11 testing for Pod name: deployment-test-548f675f8c-wsg7f Namespace: cni-automation, IP: 10.2.28.232, IP on secondary ENI: false
2021/05/05 13:45:11 veth pair eni52ef0a96f22 not found for the pod: Link not found
2021/05/05 13:45:11 found no rules for the pod's IP 10.2.28.232
2021/05/05 13:45:11 no leaked resource found for the pod cni-automation/deployment-test-548f675f8c-wsg7f
2021/05/05 13:45:11 testing for Pod name: deployment-test-548f675f8c-vbth6 Namespace: cni-automation, IP: 10.2.96.9, IP on secondary ENI: false
2021/05/05 13:45:11 veth pair eni5e9738d736a not found for the pod: Link not found
2021/05/05 13:45:11 found no rules for the pod's IP 10.2.96.9
2021/05/05 13:45:11 no leaked resource found for the pod cni-automation/deployment-test-548f675f8c-vbth6
2021/05/05 13:45:11 testing for Pod name: deployment-test-548f675f8c-65pt2 Namespace: cni-automation, IP: 10.2.120.175, IP on secondary ENI: false
2021/05/05 13:45:11 veth pair eni888e74effe7 not found for the pod: Link not found
2021/05/05 13:45:11 found no rules for the pod's IP 10.2.120.175
2021/05/05 13:45:11 no leaked resource found for the pod cni-automation/deployment-test-548f675f8c-65pt2
2021/05/05 13:45:11 testing for Pod name: deployment-test-548f675f8c-h7fwq Namespace: cni-automation, IP: 10.2.43.44, IP on secondary ENI: false
2021/05/05 13:45:11 veth pair eni114f44db5bf not found for the pod: Link not found
2021/05/05 13:45:11 found no rules for the pod's IP 10.2.43.44
2021/05/05 13:45:11 no leaked resource found for the pod cni-automation/deployment-test-548f675f8c-h7fwq
2021/05/05 13:45:11 testing for Pod name: deployment-test-548f675f8c-8j4xn Namespace: cni-automation, IP: 10.2.42.44, IP on secondary ENI: false
2021/05/05 13:45:11 veth pair enia5bef95afdc not found for the pod: Link not found
2021/05/05 13:45:11 found no rules for the pod's IP 10.2.42.44
2021/05/05 13:45:11 no leaked resource found for the pod cni-automation/deployment-test-548f675f8c-8j4xn
2021/05/05 13:45:11 testing for Pod name: deployment-test-548f675f8c-jc5mw Namespace: cni-automation, IP: 10.2.30.77, IP on secondary ENI: false
2021/05/05 13:45:11 veth pair eni3703cc9a0ba not found for the pod: Link not found
2021/05/05 13:45:11 found no rules for the pod's IP 10.2.30.77
2021/05/05 13:45:11 no leaked resource found for the pod cni-automation/deployment-test-548f675f8c-jc5mw
2021/05/05 13:45:11 testing for Pod name: deployment-test-548f675f8c-2wzb6 Namespace: cni-automation, IP: 10.2.111.19, IP on secondary ENI: false
2021/05/05 13:45:11 veth pair eni8db8dc4a94f not found for the pod: Link not found
2021/05/05 13:45:11 found no rules for the pod's IP 10.2.111.19
2021/05/05 13:45:11 no leaked resource found for the pod cni-automation/deployment-test-548f675f8c-2wzb6
2021/05/05 13:45:11 testing for Pod name: deployment-test-548f675f8c-chfwg Namespace: cni-automation, IP: 10.2.101.83, IP on secondary ENI: false
2021/05/05 13:45:11 veth pair eni8289bf3f732 not found for the pod: Link not found
2021/05/05 13:45:11 found no rules for the pod's IP 10.2.101.83
2021/05/05 13:45:11 no leaked resource found for the pod cni-automation/deployment-test-548f675f8c-chfwg
2021/05/05 13:45:11 testing for Pod name: deployment-test-548f675f8c-mbfdd Namespace: cni-automation, IP: 10.2.168.23, IP on secondary ENI: false
2021/05/05 13:45:11 veth pair enica3d5bbc57d not found for the pod: Link not found
2021/05/05 13:45:11 found no rules for the pod's IP 10.2.168.23
2021/05/05 13:45:11 no leaked resource found for the pod cni-automation/deployment-test-548f675f8c-mbfdd
2021/05/05 13:45:11 testing for Pod name: deployment-test-548f675f8c-qbtsc Namespace: cni-automation, IP: 10.2.236.247, IP on secondary ENI: false
2021/05/05 13:45:11 veth pair eni9b38d90f3c9 not found for the pod: Link not found
2021/05/05 13:45:11 found no rules for the pod's IP 10.2.236.247
2021/05/05 13:45:11 no leaked resource found for the pod cni-automation/deployment-test-548f675f8c-qbtsc
2021/05/05 13:45:11 testing for Pod name: deployment-test-548f675f8c-tn4c8 Namespace: cni-automation, IP: 10.2.82.250, IP on secondary ENI: false
2021/05/05 13:45:11 veth pair eni77210e0df20 not found for the pod: Link not found
2021/05/05 13:45:11 found no rules for the pod's IP 10.2.82.250
2021/05/05 13:45:11 no leaked resource found for the pod cni-automation/deployment-test-548f675f8c-tn4c8
2021/05/05 13:45:11 testing for Pod name: deployment-test-548f675f8c-2jskq Namespace: cni-automation, IP: 10.2.202.184, IP on secondary ENI: false
2021/05/05 13:45:11 veth pair eni5c820c1eece not found for the pod: Link not found
2021/05/05 13:45:11 found no rules for the pod's IP 10.2.202.184
2021/05/05 13:45:11 no leaked resource found for the pod cni-automation/deployment-test-548f675f8c-2jskq
2021/05/05 13:45:11 testing for Pod name: deployment-test-548f675f8c-frlwj Namespace: cni-automation, IP: 10.2.220.255, IP on secondary ENI: false
2021/05/05 13:45:11 veth pair eni28943652d11 not found for the pod: Link not found
2021/05/05 13:45:11 found no rules for the pod's IP 10.2.220.255
2021/05/05 13:45:11 no leaked resource found for the pod cni-automation/deployment-test-548f675f8c-frlwj
2021/05/05 13:45:11 testing for Pod name: deployment-test-548f675f8c-vfghr Namespace: cni-automation, IP: 10.2.176.231, IP on secondary ENI: true
2021/05/05 13:45:11 veth pair enibd089252e2c not found for the pod: Link not found
2021/05/05 13:45:11 found no rules for the pod's IP 10.2.176.231
2021/05/05 13:45:11 no leaked resource found for the pod cni-automation/deployment-test-548f675f8c-vfghr
2021/05/05 13:45:11 testing for Pod name: deployment-test-548f675f8c-scgll Namespace: cni-automation, IP: 10.2.60.41, IP on secondary ENI: true
2021/05/05 13:45:11 veth pair eni6bda2d80322 not found for the pod: Link not found
2021/05/05 13:45:11 found no rules for the pod's IP 10.2.60.41
2021/05/05 13:45:11 no leaked resource found for the pod cni-automation/deployment-test-548f675f8c-scgll
2021/05/05 13:45:11 testing for Pod name: deployment-test-548f675f8c-4g5md Namespace: cni-automation, IP: 10.2.55.240, IP on secondary ENI: true
2021/05/05 13:45:11 veth pair eni8987b716c7b not found for the pod: Link not found
2021/05/05 13:45:11 found no rules for the pod's IP 10.2.55.240
2021/05/05 13:45:11 no leaked resource found for the pod cni-automation/deployment-test-548f675f8c-4g5md
2021/05/05 13:45:11 testing for Pod name: deployment-test-548f675f8c-28fp2 Namespace: cni-automation, IP: 10.2.38.51, IP on secondary ENI: true
2021/05/05 13:45:11 veth pair eni19da3bb71d1 not found for the pod: Link not found
2021/05/05 13:45:11 found no rules for the pod's IP 10.2.38.51
2021/05/05 13:45:11 no leaked resource found for the pod cni-automation/deployment-test-548f675f8c-28fp2
2021/05/05 13:45:11 testing for Pod name: deployment-test-548f675f8c-wft7n Namespace: cni-automation, IP: 10.2.66.51, IP on secondary ENI: true
2021/05/05 13:45:11 veth pair eni1be9dbee935 not found for the pod: Link not found
2021/05/05 13:45:11 found no rules for the pod's IP 10.2.66.51
2021/05/05 13:45:11 no leaked resource found for the pod cni-automation/deployment-test-548f675f8c-wft7n
2021/05/05 13:45:11 testing for Pod name: deployment-test-548f675f8c-qtc7h Namespace: cni-automation, IP: 10.2.48.70, IP on secondary ENI: true
2021/05/05 13:45:11 veth pair eni7b68ee8b2eb not found for the pod: Link not found
2021/05/05 13:45:11 found no rules for the pod's IP 10.2.48.70
2021/05/05 13:45:11 no leaked resource found for the pod cni-automation/deployment-test-548f675f8c-qtc7h
2021/05/05 13:45:11 testing for Pod name: deployment-test-548f675f8c-f9xdg Namespace: cni-automation, IP: 10.2.151.102, IP on secondary ENI: true
2021/05/05 13:45:11 veth pair eni91d9373c9a2 not found for the pod: Link not found
2021/05/05 13:45:11 found no rules for the pod's IP 10.2.151.102
2021/05/05 13:45:11 no leaked resource found for the pod cni-automation/deployment-test-548f675f8c-f9xdg
2021/05/05 13:45:11 testing for Pod name: deployment-test-548f675f8c-wksjq Namespace: cni-automation, IP: 10.2.0.234, IP on secondary ENI: true
2021/05/05 13:45:11 veth pair eni0bd9284de5e not found for the pod: Link not found
2021/05/05 13:45:11 found no rules for the pod's IP 10.2.0.234
2021/05/05 13:45:11 no leaked resource found for the pod cni-automation/deployment-test-548f675f8c-wksjq
2021/05/05 13:45:11 testing for Pod name: deployment-test-548f675f8c-b8hjs Namespace: cni-automation, IP: 10.2.84.59, IP on secondary ENI: true
2021/05/05 13:45:11 veth pair eni5f8316fa713 not found for the pod: Link not found
2021/05/05 13:45:11 found no rules for the pod's IP 10.2.84.59
2021/05/05 13:45:11 no leaked resource found for the pod cni-automation/deployment-test-548f675f8c-b8hjs
2021/05/05 13:45:11 testing for Pod name: deployment-test-548f675f8c-5lrtp Namespace: cni-automation, IP: 10.2.46.120, IP on secondary ENI: true
2021/05/05 13:45:11 veth pair eni9f04c93a03c not found for the pod: Link not found
2021/05/05 13:45:11 found no rules for the pod's IP 10.2.46.120
2021/05/05 13:45:11 no leaked resource found for the pod cni-automation/deployment-test-548f675f8c-5lrtp
2021/05/05 13:45:11 testing for Pod name: deployment-test-548f675f8c-b5hhh Namespace: cni-automation, IP: 10.2.141.254, IP on secondary ENI: true
2021/05/05 13:45:11 veth pair eni6829bd21062 not found for the pod: Link not found
2021/05/05 13:45:11 found no rules for the pod's IP 10.2.141.254
2021/05/05 13:45:11 no leaked resource found for the pod cni-automation/deployment-test-548f675f8c-b5hhh
2021/05/05 13:45:11 testing for Pod name: deployment-test-548f675f8c-w44gt Namespace: cni-automation, IP: 10.2.247.221, IP on secondary ENI: true
2021/05/05 13:45:11 veth pair eni35a139e522b not found for the pod: Link not found
2021/05/05 13:45:11 found no rules for the pod's IP 10.2.247.221
2021/05/05 13:45:11 no leaked resource found for the pod cni-automation/deployment-test-548f675f8c-w44gt
2021/05/05 13:45:11 testing for Pod name: deployment-test-548f675f8c-gbjgt Namespace: cni-automation, IP: 10.2.107.125, IP on secondary ENI: true
2021/05/05 13:45:11 veth pair eni175b5864ab8 not found for the pod: Link not found
2021/05/05 13:45:11 found no rules for the pod's IP 10.2.107.125
2021/05/05 13:45:11 no leaked resource found for the pod cni-automation/deployment-test-548f675f8c-gbjgt
2021/05/05 13:45:11 testing for Pod name: deployment-test-548f675f8c-n5l5f Namespace: cni-automation, IP: 10.2.89.253, IP on secondary ENI: true
2021/05/05 13:45:11 veth pair eni36a55da23ad not found for the pod: Link not found
2021/05/05 13:45:11 found no rules for the pod's IP 10.2.89.253
2021/05/05 13:45:11 no leaked resource found for the pod cni-automation/deployment-test-548f675f8c-n5l5f
2021/05/05 13:45:11 testing for Pod name: deployment-test-548f675f8c-2fdhb Namespace: cni-automation, IP: 10.2.181.176, IP on secondary ENI: true
2021/05/05 13:45:11 veth pair eni3fb9c3a51c7 not found for the pod: Link not found
2021/05/05 13:45:11 found no rules for the pod's IP 10.2.181.176
2021/05/05 13:45:11 no leaked resource found for the pod cni-automation/deployment-test-548f675f8c-2fdhb
2021/05/05 13:45:11 testing for Pod name: deployment-test-548f675f8c-d5mwc Namespace: cni-automation, IP: 10.2.143.217, IP on secondary ENI: true
2021/05/05 13:45:11 veth pair eni98ecebcc14f not found for the pod: Link not found
2021/05/05 13:45:11 found no rules for the pod's IP 10.2.143.217
2021/05/05 13:45:11 no leaked resource found for the pod cni-automation/deployment-test-548f675f8c-d5mwc
2021/05/05 13:45:11 testing for Pod name: deployment-test-548f675f8c-fn8qv Namespace: cni-automation, IP: 10.2.121.121, IP on secondary ENI: true
2021/05/05 13:45:11 veth pair eni1b6d6f3d41b not found for the pod: Link not found
2021/05/05 13:45:11 found no rules for the pod's IP 10.2.121.121
2021/05/05 13:45:11 no leaked resource found for the pod cni-automation/deployment-test-548f675f8c-fn8qv

STEP: deleting the host networking setup pod

• [SLOW TEST:102.351 seconds]
test host networking
/Users/abhipth/go/src/github.com/aws/amazon-vpc-cni-k8s/test/integration-new/cni/host_networking_test.go:41
  when pods using IP from primary and secondary ENI are created
  /Users/abhipth/go/src/github.com/aws/amazon-vpc-cni-k8s/test/integration-new/cni/host_networking_test.go:46
    should have correct host networking setup when running and cleaned up once terminated
    /Users/abhipth/go/src/github.com/aws/amazon-vpc-cni-k8s/test/integration-new/cni/host_networking_test.go:47
------------------------------
test host networking when host networking is tested on invalid input 
  tester pod should error out
  /Users/abhipth/go/src/github.com/aws/amazon-vpc-cni-k8s/test/integration-new/cni/host_networking_test.go:93
STEP: creating a single pod on the test node
STEP: first validating the tester work on valid input
STEP: creating pod to test host networking setup
2021/05/05 13:45:17 list of pod against which test will be run [{parking-pod cni-automation 10.2.111.19 false}]
2021/05/05 13:45:17 testing networking is setup for regular pods
2021/05/05 13:45:17 testing for Pod name: parking-pod Namespace: cni-automation, IP: 10.2.111.19, IP on secondary ENI: false
2021/05/05 13:45:17 found veth pair eni5ed0640a5aa in host network namespace in up state with index 517
2021/05/05 13:45:17 found rule for main route table to 10.2.111.19/32 with priority 
2021/05/05 13:45:17 found route to 10.2.111.19/32 with link index 517
2021/05/05 13:45:17 validation for pod cni-automation/parking-pod succeeded

STEP: deleting the host networking setup pod
STEP: validating tester fails when invalid IP is passed
STEP: creating pod to test host networking setup
2021/05/05 13:45:20 list of pod against which test will be run [{parking-pod cni-automation 1.1.1.1 false}]
2021/05/05 13:45:20 testing networking is setup for regular pods
2021/05/05 13:45:20 testing for Pod name: parking-pod Namespace: cni-automation, IP: 1.1.1.1, IP on secondary ENI: false
2021/05/05 13:45:20 found veth pair eni5ed0640a5aa in host network namespace in up state with index 517
2021/05/05 13:45:20 found 1 or more pod setup validation failure: [found 0 or more than 1 rule for main route table: []]

STEP: deleting the host networking setup pod
STEP: validating the tester fails when invalid namespace is passed
STEP: creating pod to test host networking setup
2021/05/05 13:45:23 list of pod against which test will be run [{parking-pod different 10.2.111.19 false}]
2021/05/05 13:45:23 testing networking is setup for regular pods
2021/05/05 13:45:23 testing for Pod name: parking-pod Namespace: different, IP: 10.2.111.19, IP on secondary ENI: false
2021/05/05 13:45:23 found 1 or more pod setup validation failure: [failed to find netlink eni160e3442714: Link not found]

STEP: deleting the host networking setup pod
STEP: validating the tester fails when tear down check is run on running pod
STEP: creating pod to test host networking setup
2021/05/05 13:45:28 list of pod against which test will be run [{parking-pod cni-automation 10.2.111.19 false}]
2021/05/05 13:45:28 testing network is teared down for regular pods
2021/05/05 13:45:28 testing for Pod name: parking-pod Namespace: cni-automation, IP: 10.2.111.19, IP on secondary ENI: false
2021/05/05 13:45:28 found 1 or more pod teardown validation failure: [found an existing veth pair for the pod parking-pod: &{{517 9001 0 eni5ed0640a5aa aa:62:8c:c5:9f:b6 up|broadcast|multicast 69699 3 0 <nil>  0xc0000da0c0 0 0xc0000b2240 ether <nil> up 1 1 1 65536 65535 [] 0 <nil>}  }]

STEP: deleting the host networking setup pod
STEP: deleting the parking pod

• [SLOW TEST:16.367 seconds]
test host networking
/Users/abhipth/go/src/github.com/aws/amazon-vpc-cni-k8s/test/integration-new/cni/host_networking_test.go:41
  when host networking is tested on invalid input
  /Users/abhipth/go/src/github.com/aws/amazon-vpc-cni-k8s/test/integration-new/cni/host_networking_test.go:92
    tester pod should error out
    /Users/abhipth/go/src/github.com/aws/amazon-vpc-cni-k8s/test/integration-new/cni/host_networking_test.go:93
------------------------------
SSSSSTEP: deleting test namespace
STEP: getting the aws-node daemon set in namesapce kube-system
STEP: setting the environment variables on the ds to map[WARM_ENI_TARGET:{} WARM_IP_TARGET:{}]
STEP: updating the daemon set with new environment variable

Ran 2 of 9 Specs in 232.119 seconds
SUCCESS! -- 2 Passed | 0 Failed | 0 Pending | 7 Skipped

Automation added to e2e:
NA

Will this break upgrades or downgrades. Has updating a running cluster been tested?:
NA

Does this change require updates to the CNI daemonset config files to work?:
No

Does this PR introduce any user-facing change?:
No

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@fawadkhaliq fawadkhaliq self-requested a review May 6, 2021 14:44
Copy link

@fawadkhaliq fawadkhaliq left a comment

Choose a reason for hiding this comment

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

/lgtm

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

Successfully merging this pull request may close these issues.

2 participants