futurewei-cloud / alcor

Alcor: Cloud native SDN platform powered by Kubernetes and Istio
MIT License
32 stars 33 forks source link

Test Controller Enhancements #743

Closed zzxgzgz closed 2 years ago

zzxgzgz commented 2 years ago

Purpose of this PR:

Usage:

  1. Modified the application.properties, indicate that if you wish to run the ncm_test or alcor_http_api_test, by setting test_against_ncm to true or false.
  2. Fill in the parameters, for ncm_test, fill in the ### Test Controller NCM test Params ###; for alcor_http_api_test, fill in the ### Test Controller Alcor HTTP APIs Test Params ###.
  3. Compile the Test Controller using command mvn clean install.
  4. Run the test using command mvn exec:java -D exec.mainClass=com.futurewei.alcor.pseudo_controller.pseudo_controller -e.

Example outputs:

NCM Test:

mvn exec:java -D exec.mainClass=com.futurewei.alcor.pseudo_controller.pseudo_controller   -e
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/usr/share/maven/lib/guice.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.futurewei.alcor:pseudo_controller:jar:1.0-SNAPSHOT
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: io.opentracing.contrib:opentracing-grpc:jar -> duplicate declaration of version 0.2.3 @ line 65, column 21
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: org.apache.httpcomponents:httpclient:jar -> version 4.5.13 vs 4.5.11 @ line 76, column 21
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ---------------< com.futurewei.alcor:pseudo_controller >----------------
[INFO] Building pseudo_controller 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- exec-maven-plugin:3.0.0:java (default-cli) @ pseudo_controller ---

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v2.1.5.RELEASE)

2022-02-17 17:28:42.872  INFO 7697 --- [ntroller.main()] c.f.a.p.pseudo_controller                : Starting pseudo_controller on fw0011157 with PID 7697 (/home/user/src/Github.com/zzxgzgz/alcor/services/pseudo_controller/target/classes started by root in /home/user/src/Github.com/zzxgzgz/alcor/services/pseudo_controller)
2022-02-17 17:28:42.875  INFO 7697 --- [ntroller.main()] c.f.a.p.pseudo_controller                : No active profile set, falling back to default profiles: default
2022-02-17 17:28:43.057  WARN 7697 --- [kground-preinit] o.s.h.c.j.Jackson2ObjectMapperBuilder    : For Jackson Kotlin classes support please add "com.fasterxml.jackson.module:jackson-module-kotlin" to the classpath
2022-02-17 17:28:43.598  INFO 7697 --- [ntroller.main()] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode!
2022-02-17 17:28:43.600  INFO 7697 --- [ntroller.main()] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data repositories in DEFAULT mode.
2022-02-17 17:28:43.621  INFO 7697 --- [ntroller.main()] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 11ms. Found 0 repository interfaces.
2022-02-17 17:28:43.947  INFO 7697 --- [ntroller.main()] trationDelegate$BeanPostProcessorChecker : Bean 'io.opentracing.contrib.spring.cloud.async.DefaultAsyncAutoConfiguration$DefaultTracedAsyncConfigurerSupport' of type [io.opentracing.contrib.spring.cloud.async.DefaultAsyncAutoConfiguration$DefaultTracedAsyncConfigurerSupport$$EnhancerBySpringCGLIB$$2a735e8a] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2022-02-17 17:28:43.983  INFO 7697 --- [ntroller.main()] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.kafka.annotation.KafkaBootstrapConfiguration' of type [org.springframework.kafka.annotation.KafkaBootstrapConfiguration$$EnhancerBySpringCGLIB$$b8bd2d52] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2022-02-17 17:28:44.043  INFO 7697 --- [ntroller.main()] trationDelegate$BeanPostProcessorChecker : Bean 'io.opentracing.contrib.spring.cloud.async.DefaultAsyncAutoConfiguration' of type [io.opentracing.contrib.spring.cloud.async.DefaultAsyncAutoConfiguration$$EnhancerBySpringCGLIB$$2b912f27] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2022-02-17 17:28:44.489  INFO 7697 --- [ntroller.main()] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8080 (http)
2022-02-17 17:28:44.516  INFO 7697 --- [ntroller.main()] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2022-02-17 17:28:44.517  INFO 7697 --- [ntroller.main()] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.33]
2022-02-17 17:28:44.606  INFO 7697 --- [ntroller.main()] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2022-02-17 17:28:44.606  INFO 7697 --- [ntroller.main()] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 1688 ms
2022-02-17 17:28:45.234  INFO 7697 --- [ntroller.main()] o.c.s.w.s.ServerTracingAutoConfiguration : Creating FilterRegistrationBean bean with TracingFilter mapped to [], skip pattern is "/api-docs.*|/swagger.*|.*\.png|.*\.css|.*\.js|.*\.html|/favicon.ico|/hystrix.stream|/actuator/(health|health/.*|info|info/.*)"
Start of NCM Test!
Running pseudo controller code!
There are 1 VPCs, ACA node one has 10 ports per VPC;
ACA node two has 10 ports per VPC.
Total ports per VPC: 20
Need to generate 20 ports
Finished generating 20 ports, ip->mac map has 20 entries, ip->id map has 20 entries
Creating containers on both hosts, ip_mac_map has 20keys
Connected
Connected
Connected
Connected
Connected
Connected
Connected
Connected
Connected
Start of executing command [docker run -itd --name test10 --net=none --label test=ACA busybox sh] on host: node_one_ip
Start of executing command [docker run -itd --name test1 --net=none --label test=ACA busybox sh] on host: node_one_ip
Start of executing command [docker run -itd --name test8 --net=none --label test=ACA busybox sh] on host: node_one_ip
Start of executing command [docker run -itd --name test4 --net=none --label test=ACA busybox sh] on host: node_one_ip
Start of executing command [docker run -itd --name test6 --net=none --label test=ACA busybox sh] on host: node_one_ip
Start of executing command [docker run -itd --name test5 --net=none --label test=ACA busybox sh] on host: node_one_ip
Start of executing command [docker run -itd --name test2 --net=none --label test=ACA busybox sh] on host: node_one_ip
Start of executing command [docker run -itd --name test3 --net=none --label test=ACA busybox sh] on host: node_one_ip
Start of executing command [docker run -itd --name test7 --net=none --label test=ACA busybox sh] on host: node_one_ip
Connected
Start of executing command [docker run -itd --name test9 --net=none --label test=ACA busybox sh] on host: node_one_ip
3b162f5898481442f6df62ff44d48da4e5d6c2472858daec372202195e096796
454d9375435b15ce3d5d755195c857d4e18b9317f60cf749b3a27d3e4be20fd8
754a395679b3537cab8e5b135df64ff83c7962488a0b41f8d7fb740e49ced2dd
2ac46498115403d8728c54c33c84fb1d773264124ccc1e1f2cde85643d6a7e39
a9bd5fc2573af7d1f6d72664c7c7da3419597dfad5c409914c0fff19ce42627c
05050151b1129e2b76ddfd32ed4b282aab847f2c3511de62b007443c387811ca
3de9d9a24ffeab5a7ce7367b5e698bb059af3e11e82a4180c258908dd3654b4a
4b8ba0fee3fcd28930dfb896442b6c1482ebf2d6243324f16c02afa9d8241114
8fe59194a68edc5d60db3f31107df145ec3fdab70a9e7580f1d4c94c3a1c8dd9
de736d41fbff48bdaea9203da81a3d81ea977e2ae71f2a0faf0b58947c7e9702
exit-status: 0
End of executing command [docker run -itd --name test3 --net=none --label test=ACA busybox sh] on host: node_one_ip
Start of executing command [ovs-docker add-port br-int eth0 test3 --ipaddress=10.0.0.12/16 --macaddress=00:00:01:0:0:12] on host: node_one_ip
exit-status: 0
End of executing command [docker run -itd --name test10 --net=none --label test=ACA busybox sh] on host: node_one_ip
Start of executing command [ovs-docker add-port br-int eth0 test10 --ipaddress=10.0.0.19/16 --macaddress=00:00:01:0:0:19] on host: node_one_ip
exit-status: 0
End of executing command [docker run -itd --name test6 --net=none --label test=ACA busybox sh] on host: node_one_ip
Start of executing command [ovs-docker add-port br-int eth0 test6 --ipaddress=10.0.0.15/16 --macaddress=00:00:01:0:0:15] on host: node_one_ip
exit-status: 0
End of executing command [docker run -itd --name test5 --net=none --label test=ACA busybox sh] on host: node_one_ip
Start of executing command [ovs-docker add-port br-int eth0 test5 --ipaddress=10.0.0.14/16 --macaddress=00:00:01:0:0:14] on host: node_one_ip
exit-status: 0
exit-status: 0
End of executing command [docker run -itd --name test4 --net=none --label test=ACA busybox sh] on host: node_one_ip
Start of executing command [ovs-docker add-port br-int eth0 test4 --ipaddress=10.0.0.13/16 --macaddress=00:00:01:0:0:13] on host: node_one_ip
End of executing command [docker run -itd --name test8 --net=none --label test=ACA busybox sh] on host: node_one_ip
Start of executing command [ovs-docker add-port br-int eth0 test8 --ipaddress=10.0.0.17/16 --macaddress=00:00:01:0:0:17] on host: node_one_ip
exit-status: 0
End of executing command [docker run -itd --name test2 --net=none --label test=ACA busybox sh] on host: node_one_ip
Start of executing command [ovs-docker add-port br-int eth0 test2 --ipaddress=10.0.0.11/16 --macaddress=00:00:01:0:0:11] on host: node_one_ip
exit-status: 0
End of executing command [docker run -itd --name test1 --net=none --label test=ACA busybox sh] on host: node_one_ip
Start of executing command [ovs-docker add-port br-int eth0 test1 --ipaddress=10.0.0.10/16 --macaddress=00:00:01:0:0:10] on host: node_one_ip
exit-status: 0
End of executing command [docker run -itd --name test7 --net=none --label test=ACA busybox sh] on host: node_one_ip
Start of executing command [ovs-docker add-port br-int eth0 test7 --ipaddress=10.0.0.16/16 --macaddress=00:00:01:0:0:16] on host: node_one_ip
exit-status: 0
End of executing command [docker run -itd --name test9 --net=none --label test=ACA busybox sh] on host: node_one_ip
Start of executing command [ovs-docker add-port br-int eth0 test9 --ipaddress=10.0.0.18/16 --macaddress=00:00:01:0:0:18] on host: node_one_ip
exit-status: 0
End of executing command [ovs-docker add-port br-int eth0 test5 --ipaddress=10.0.0.14/16 --macaddress=00:00:01:0:0:14] on host: node_one_ip
Start of executing command [ovs-docker set-vlan br-int eth0 test5 1] on host: node_one_ip
exit-status: 0
End of executing command [ovs-docker add-port br-int eth0 test6 --ipaddress=10.0.0.15/16 --macaddress=00:00:01:0:0:15] on host: node_one_ip
Start of executing command [ovs-docker set-vlan br-int eth0 test6 1] on host: node_one_ip
exit-status: 0
End of executing command [ovs-docker add-port br-int eth0 test3 --ipaddress=10.0.0.12/16 --macaddress=00:00:01:0:0:12] on host: node_one_ip
exit-status: 0
End of executing command [ovs-docker set-vlan br-int eth0 test5 1] on host: node_one_ip
exit-status: 0
End of executing command [ovs-docker add-port br-int eth0 test7 --ipaddress=10.0.0.16/16 --macaddress=00:00:01:0:0:16] on host: node_one_ip
Start of executing command [ovs-docker set-vlan br-int eth0 test7 1] on host: node_one_ip
Start of executing command [ovs-docker set-vlan br-int eth0 test3 1] on host: node_one_ip
exit-status: 0
End of executing command [ovs-docker set-vlan br-int eth0 test6 1] on host: node_one_ip
exit-status: 0
End of executing command [ovs-docker add-port br-int eth0 test10 --ipaddress=10.0.0.19/16 --macaddress=00:00:01:0:0:19] on host: node_one_ip
Start of executing command [ovs-docker set-vlan br-int eth0 test10 1] on host: node_one_ip
exit-status: 0
End of executing command [ovs-docker add-port br-int eth0 test8 --ipaddress=10.0.0.17/16 --macaddress=00:00:01:0:0:17] on host: node_one_ip
Start of executing command [ovs-docker set-vlan br-int eth0 test8 1] on host: node_one_ip
DONE
DONE
exit-status: 0
End of executing command [ovs-docker add-port br-int eth0 test1 --ipaddress=10.0.0.10/16 --macaddress=00:00:01:0:0:10] on host: node_one_ip
Start of executing command [ovs-docker set-vlan br-int eth0 test1 1] on host: node_one_ip
exit-status: 0
End of executing command [ovs-docker add-port br-int eth0 test2 --ipaddress=10.0.0.11/16 --macaddress=00:00:01:0:0:11] on host: node_one_ip
Start of executing command [ovs-docker set-vlan br-int eth0 test2 1] on host: node_one_ip
exit-status: 0
End of executing command [ovs-docker add-port br-int eth0 test4 --ipaddress=10.0.0.13/16 --macaddress=00:00:01:0:0:13] on host: node_one_ip
Start of executing command [ovs-docker set-vlan br-int eth0 test4 1] on host: node_one_ip
Connected
Start of executing command [docker run -itd --name test12 --net=none --label test=ACA busybox sh] on host: node_two_ip
exit-status: 0
End of executing command [ovs-docker set-vlan br-int eth0 test7 1] on host: node_one_ip
DONE
exit-status: 0
End of executing command [ovs-docker set-vlan br-int eth0 test8 1] on host: node_one_ip
DONE
exit-status: 0
End of executing command [ovs-docker set-vlan br-int eth0 test10 1] on host: node_one_ip
DONE
exit-status: 0
End of executing command [ovs-docker set-vlan br-int eth0 test3 1] on host: node_one_ip
DONE
exit-status: 0
End of executing command [ovs-docker add-port br-int eth0 test9 --ipaddress=10.0.0.18/16 --macaddress=00:00:01:0:0:18] on host: node_one_ip
Start of executing command [ovs-docker set-vlan br-int eth0 test9 1] on host: node_one_ip
exit-status: 0
End of executing command [ovs-docker set-vlan br-int eth0 test2 1] on host: node_one_ip
DONE
exit-status: 0
End of executing command [ovs-docker set-vlan br-int eth0 test4 1] on host: node_one_ip
DONE
exit-status: 0
End of executing command [ovs-docker set-vlan br-int eth0 test1 1] on host: node_one_ip
DONE
exit-status: 0
End of executing command [ovs-docker set-vlan br-int eth0 test9 1] on host: node_one_ip
DONE
Connected
Start of executing command [docker run -itd --name test11 --net=none --label test=ACA busybox sh] on host: node_two_ip
Connected
Start of executing command [docker run -itd --name test13 --net=none --label test=ACA busybox sh] on host: node_two_ip
Connected
Start of executing command [docker run -itd --name test14 --net=none --label test=ACA busybox sh] on host: node_two_ip
Connected
Start of executing command [docker run -itd --name test20 --net=none --label test=ACA busybox sh] on host: node_two_ip
Connected
Start of executing command [docker run -itd --name test15 --net=none --label test=ACA busybox sh] on host: node_two_ip
Connected
Start of executing command [docker run -itd --name test17 --net=none --label test=ACA busybox sh] on host: node_two_ip
Connected
Start of executing command [docker run -itd --name test19 --net=none --label test=ACA busybox sh] on host: node_two_ip
Connected
Start of executing command [docker run -itd --name test16 --net=none --label test=ACA busybox sh] on host: node_two_ip
Connected
Start of executing command [docker run -itd --name test18 --net=none --label test=ACA busybox sh] on host: node_two_ip
87c6788597fe8bbbd9d230a6047ea058fd14bb06934841fa98e78e0a76685f2e
ffdc04fa2ce9c5e3e28c24524317bd4c320c9da801606fcb9b911122dab67c6c
42ac7089d8e7bf8b2eb682a014db49583ad5d207aa3216ac9e14d39198657ae9
0c40c07e79a35dffc800612b203f6a38dc75553d30b5083e70203b620b3185aa
a1f40bac56918695ba568a75dd6c6d2eed8e7b126ebc8b2dee8fe5becda08668
cb86d3cf806cbf3849d89fbf6d8dbfc6770dad77ed365f218c4e51748347c12a
ff5788c4c2c50e270c398cf0476abb58403fa5cc5d611f54f589323ca464962b
b8f3a8a5dec48d9df8a3d15195220b3f8bdc79cdfe7aa4474ddaed8ffe22a138
3ad7f4d7a86e9f1deaf61238b03e60dbfaa1b71251a7335265bf4f27656518aa
74eee1042f5d96848f9e73abda513ad60cbfc8e428d25e73ba881c8d565b23b8
exit-status: 0
End of executing command [docker run -itd --name test12 --net=none --label test=ACA busybox sh] on host: node_two_ip
Start of executing command [ovs-docker add-port br-int eth0 test12 --ipaddress=10.0.0.20/16 --macaddress=00:00:01:0:0:20] on host: node_two_ip
exit-status: 0
End of executing command [docker run -itd --name test14 --net=none --label test=ACA busybox sh] on host: node_two_ip
Start of executing command [ovs-docker add-port br-int eth0 test14 --ipaddress=10.0.0.3/16 --macaddress=00:00:01:0:0:3] on host: node_two_ip
exit-status: 0
End of executing command [docker run -itd --name test11 --net=none --label test=ACA busybox sh] on host: node_two_ip
Start of executing command [ovs-docker add-port br-int eth0 test11 --ipaddress=10.0.0.2/16 --macaddress=00:00:01:0:0:2] on host: node_two_ip
exit-status: 0
End of executing command [docker run -itd --name test19 --net=none --label test=ACA busybox sh] on host: node_two_ip
Start of executing command [ovs-docker add-port br-int eth0 test19 --ipaddress=10.0.0.8/16 --macaddress=00:00:01:0:0:8] on host: node_two_ip
exit-status: 0
End of executing command [docker run -itd --name test16 --net=none --label test=ACA busybox sh] on host: node_two_ip
exit-status: 0
End of executing command [docker run -itd --name test15 --net=none --label test=ACA busybox sh] on host: node_two_ip
Start of executing command [ovs-docker add-port br-int eth0 test16 --ipaddress=10.0.0.5/16 --macaddress=00:00:01:0:0:5] on host: node_two_ip
Start of executing command [ovs-docker add-port br-int eth0 test15 --ipaddress=10.0.0.4/16 --macaddress=00:00:01:0:0:4] on host: node_two_ip
exit-status: 0
End of executing command [docker run -itd --name test13 --net=none --label test=ACA busybox sh] on host: node_two_ip
Start of executing command [ovs-docker add-port br-int eth0 test13 --ipaddress=10.0.0.21/16 --macaddress=00:00:01:0:0:21] on host: node_two_ip
exit-status: 0
End of executing command [docker run -itd --name test20 --net=none --label test=ACA busybox sh] on host: node_two_ip
Start of executing command [ovs-docker add-port br-int eth0 test20 --ipaddress=10.0.0.9/16 --macaddress=00:00:01:0:0:9] on host: node_two_ip
exit-status: 0
End of executing command [docker run -itd --name test17 --net=none --label test=ACA busybox sh] on host: node_two_ip
Start of executing command [ovs-docker add-port br-int eth0 test17 --ipaddress=10.0.0.6/16 --macaddress=00:00:01:0:0:6] on host: node_two_ip
exit-status: 0
End of executing command [docker run -itd --name test18 --net=none --label test=ACA busybox sh] on host: node_two_ip
Start of executing command [ovs-docker add-port br-int eth0 test18 --ipaddress=10.0.0.7/16 --macaddress=00:00:01:0:0:7] on host: node_two_ip
exit-status: 0
End of executing command [ovs-docker add-port br-int eth0 test12 --ipaddress=10.0.0.20/16 --macaddress=00:00:01:0:0:20] on host: node_two_ip
Start of executing command [ovs-docker set-vlan br-int eth0 test12 1] on host: node_two_ip
exit-status: 0
End of executing command [ovs-docker add-port br-int eth0 test11 --ipaddress=10.0.0.2/16 --macaddress=00:00:01:0:0:2] on host: node_two_ip
Start of executing command [ovs-docker set-vlan br-int eth0 test11 1] on host: node_two_ip
exit-status: 0
End of executing command [ovs-docker set-vlan br-int eth0 test12 1] on host: node_two_ip
DONE
exit-status: 0
End of executing command [ovs-docker add-port br-int eth0 test14 --ipaddress=10.0.0.3/16 --macaddress=00:00:01:0:0:3] on host: node_two_ip
Start of executing command [ovs-docker set-vlan br-int eth0 test14 1] on host: node_two_ip
exit-status: 0
End of executing command [ovs-docker add-port br-int eth0 test19 --ipaddress=10.0.0.8/16 --macaddress=00:00:01:0:0:8] on host: node_two_ip
Start of executing command [ovs-docker set-vlan br-int eth0 test19 1] on host: node_two_ip
exit-status: 0
End of executing command [ovs-docker set-vlan br-int eth0 test14 1] on host: node_two_ip
DONE
exit-status: 0
End of executing command [ovs-docker set-vlan br-int eth0 test11 1] on host: node_two_ip
DONE
exit-status: 0
End of executing command [ovs-docker add-port br-int eth0 test17 --ipaddress=10.0.0.6/16 --macaddress=00:00:01:0:0:6] on host: node_two_ip
Start of executing command [ovs-docker set-vlan br-int eth0 test17 1] on host: node_two_ip
exit-status: 0
End of executing command [ovs-docker add-port br-int eth0 test20 --ipaddress=10.0.0.9/16 --macaddress=00:00:01:0:0:9] on host: node_two_ip
Start of executing command [ovs-docker set-vlan br-int eth0 test20 1] on host: node_two_ip
exit-status: 0
End of executing command [ovs-docker add-port br-int eth0 test16 --ipaddress=10.0.0.5/16 --macaddress=00:00:01:0:0:5] on host: node_two_ip
Start of executing command [ovs-docker set-vlan br-int eth0 test16 1] on host: node_two_ip
exit-status: 0
End of executing command [ovs-docker add-port br-int eth0 test18 --ipaddress=10.0.0.7/16 --macaddress=00:00:01:0:0:7] on host: node_two_ip
Start of executing command [ovs-docker set-vlan br-int eth0 test18 1] on host: node_two_ip
exit-status: 0
End of executing command [ovs-docker add-port br-int eth0 test15 --ipaddress=10.0.0.4/16 --macaddress=00:00:01:0:0:4] on host: node_two_ip
Start of executing command [ovs-docker set-vlan br-int eth0 test15 1] on host: node_two_ip
exit-status: 0
End of executing command [ovs-docker add-port br-int eth0 test13 --ipaddress=10.0.0.21/16 --macaddress=00:00:01:0:0:21] on host: node_two_ip
Start of executing command [ovs-docker set-vlan br-int eth0 test13 1] on host: node_two_ip
exit-status: 0
End of executing command [ovs-docker set-vlan br-int eth0 test19 1] on host: node_two_ip
DONE
exit-status: 0
End of executing command [ovs-docker set-vlan br-int eth0 test17 1] on host: node_two_ip
DONE
exit-status: 0
End of executing command [ovs-docker set-vlan br-int eth0 test16 1] on host: node_two_ip
DONE
exit-status: 0
End of executing command [ovs-docker set-vlan br-int eth0 test18 1] on host: node_two_ip
exit-status: 0
End of executing command [ovs-docker set-vlan br-int eth0 test13 1] on host: node_two_ip
DONE
DONE
exit-status: 0
End of executing command [ovs-docker set-vlan br-int eth0 test20 1] on host: node_two_ip
DONE
exit-status: 0
End of executing command [ovs-docker set-vlan br-int eth0 test15 1] on host: node_two_ip
DONE
DONE creating containers on both hosts, host 1 has 10 ports, host 2 has 10 ports
aca_node_one_ip: node_one_ip
aca_node_two_ip: node_two_ip
user name: root
password: root_password
Containers setup done, now we gotta construct the GoalStateV2
Trying to build the GoalStateV2 for 20 Ports
Current vpc_id: 2b08a5bc-b718-11ea-b3de-111111111001, current subnet id: 27330ae4-b718-11ea-b3df-111111111001
GoalStateV2 size in bytes for host1:
2961

GoalStateV2 size in bytes for host2:
8051

Time to call the GRPC functions
2022-02-17 17:28:49.202  INFO 7697 --- [ntroller.main()] io.jaegertracing.Configuration           : Initialized tracer=JaegerTracer(version=Java-1.3.2, serviceName=alcor-test-controller, reporter=CompositeReporter(reporters=[RemoteReporter(sender=UdpSender(host=ncm_ip, port=6831), closeEnqueueTimeout=1000), LoggingReporter(logger=Logger[io.jaegertracing.internal.reporters.LoggingReporter])]), sampler=ConstSampler(decision=true, tags={sampler.type=const, sampler.param=true}), tags={hostname=fw0011157, jaeger.version=Java-1.3.2, ip=127.0.1.1}, zipkinSharedRpcSpan=false, expandExceptionLogs=false, useTraceId128Bit=false)
[Test Controller] Got this global tracer: JaegerTracer(version=Java-1.3.2, serviceName=alcor-test-controller, reporter=CompositeReporter(reporters=[RemoteReporter(sender=UdpSender(host=ncm_ip, port=6831), closeEnqueueTimeout=1000), LoggingReporter(logger=Logger[io.jaegertracing.internal.reporters.LoggingReporter])]), sampler=ConstSampler(decision=true, tags={sampler.type=const, sampler.param=true}), tags={hostname=fw0011157, jaeger.version=Java-1.3.2, ip=127.0.1.1}, zipkinSharedRpcSpan=false, expandExceptionLogs=false, useTraceId128Bit=false)
Constructed channel
[Test Controller] Built child span: f6b9a938763a5174:f6b9a938763a5174:0:1 - alcor-tc-send-gs
Created stub
Created GoalStateOperationReply observer class
Connected the observers
After calling onNext
Wait no longer than 6000 seconds until both goalstates are sent to both hosts.
onNext function with this GoalStateOperationReply:
format_version: 100

onNext function with this GoalStateOperationReply:
format_version: 100

onCompleted
2022-02-17 17:28:50.923  INFO 7697 --- [ault-executor-1] i.j.internal.reporters.LoggingReporter   : Span reported: f6b9a938763a5174:349b36c292775926:f6b9a938763a5174:1 - alcor.schema.GoalStateProvisioner/PushGoalStatesStream
2022-02-17 17:28:50.963  INFO 7697 --- [ntroller.main()] i.j.internal.reporters.LoggingReporter   : Span reported: f6b9a938763a5174:f6b9a938763a5174:0:1 - alcor-tc-send-gs
[Test Controller] Child span after finish: f6b9a938763a5174:f6b9a938763a5174:0:1 - alcor-tc-send-gs
After the GRPC call, it's time to do the ping test
Sleep 10 seconds before executing the ping
Time to execute these ping commands concurrently
Need to execute this command concurrently: [docker exec test1 ping -I 10.0.0.10 -c1 10.0.0.2]
Need to execute this command concurrently: [docker exec test3 ping -I 10.0.0.12 -c1 10.0.0.21]
Need to execute this command concurrently: [docker exec test2 ping -I 10.0.0.11 -c1 10.0.0.20]
Need to execute this command concurrently: [docker exec test5 ping -I 10.0.0.14 -c1 10.0.0.4]
Need to execute this command concurrently: [docker exec test4 ping -I 10.0.0.13 -c1 10.0.0.3]
Executing BASH command:
   docker exec test1 ping -I 10.0.0.10 -c1 10.0.0.2
Executing BASH command:
   docker exec test2 ping -I 10.0.0.11 -c1 10.0.0.20
Need to execute this command concurrently: [docker exec test6 ping -I 10.0.0.15 -c1 10.0.0.5]
Executing BASH command:
   docker exec test5 ping -I 10.0.0.14 -c1 10.0.0.4
Need to execute this command concurrently: [docker exec test7 ping -I 10.0.0.16 -c1 10.0.0.6]
Executing BASH command:
   docker exec test7 ping -I 10.0.0.16 -c1 10.0.0.6
Executing BASH command:
   docker exec test3 ping -I 10.0.0.12 -c1 10.0.0.21
Need to execute this command concurrently: [docker exec test9 ping -I 10.0.0.18 -c1 10.0.0.8]
Executing BASH command:
   docker exec test4 ping -I 10.0.0.13 -c1 10.0.0.3
Executing BASH command:
   docker exec test9 ping -I 10.0.0.18 -c1 10.0.0.8
Need to execute this command concurrently: [docker exec test10 ping -I 10.0.0.19 -c1 10.0.0.9]
End of the test controller
Need to execute this command concurrently: [docker exec test8 ping -I 10.0.0.17 -c1 10.0.0.7]
Executing BASH command:
   docker exec test6 ping -I 10.0.0.15 -c1 10.0.0.5
Executing BASH command:
   docker exec test8 ping -I 10.0.0.17 -c1 10.0.0.7
Executing BASH command:
   docker exec test10 ping -I 10.0.0.19 -c1 10.0.0.9
PING 10.0.0.20 (10.0.0.20) from 10.0.0.11: 56 data bytes
64 bytes from 10.0.0.20: seq=0 ttl=64 time=3.244 ms

--- 10.0.0.20 ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 3.244/3.244/3.244 ms
PING 10.0.0.9 (10.0.0.9) from 10.0.0.19: 56 data bytes
64 bytes from 10.0.0.9: seq=0 ttl=64 time=3.419 ms

--- 10.0.0.9 ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 3.419/3.419/3.419 ms
PING 10.0.0.2 (10.0.0.2) from 10.0.0.10: 56 data bytes
PING 10.0.0.3 (10.0.0.3) from 10.0.0.13: 56 data bytes
64 bytes from 10.0.0.3: seq=0 ttl=64 time=1.888 ms

--- 10.0.0.3 ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
64 bytes from 10.0.0.2: seq=0 ttl=64 time=2.136 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 2.136/2.136/2.136 ms
round-trip min/avg/max = 1.888/1.888/1.888 ms
PING 10.0.0.21 (10.0.0.21) from 10.0.0.12: 56 data bytes
64 bytes from 10.0.0.21: seq=0 ttl=64 time=2.519 ms

--- 10.0.0.21 ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 2.519/2.519/2.519 ms
PING 10.0.0.6 (10.0.0.6) from 10.0.0.16: 56 data bytes
64 bytes from 10.0.0.6: seq=0 ttl=64 time=2.267 ms

--- 10.0.0.6 ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 2.267/2.267/2.267 ms
PING 10.0.0.4 (10.0.0.4) from 10.0.0.14: 56 data bytes
64 bytes from 10.0.0.4: seq=0 ttl=64 time=2.205 ms

--- 10.0.0.4 ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 2.205/2.205/2.205 ms
PING 10.0.0.7 (10.0.0.7) from 10.0.0.17: 56 data bytes
64 bytes from 10.0.0.7: seq=0 ttl=64 time=1.961 ms

--- 10.0.0.7 ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 1.961/1.961/1.961 ms
PING 10.0.0.8 (10.0.0.8) from 10.0.0.18: 56 data bytes
64 bytes from 10.0.0.8: seq=0 ttl=64 time=2.221 ms

--- 10.0.0.8 ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 2.221/2.221/2.221 ms
PING 10.0.0.5 (10.0.0.5) from 10.0.0.15: 56 data bytes
64 bytes from 10.0.0.5: seq=0 ttl=64 time=2.190 ms

--- 10.0.0.5 ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 2.190/2.190/2.190 ms

Alcor Http API Test:

mvn exec:java -D exec.mainClass=com.futurewei.alcor.pseudo_controller.pseudo_controller   -e
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/usr/share/maven/lib/guice.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.futurewei.alcor:pseudo_controller:jar:1.0-SNAPSHOT
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: io.opentracing.contrib:opentracing-grpc:jar -> duplicate declaration of version 0.2.3 @ line 65, column 21
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: org.apache.httpcomponents:httpclient:jar -> version 4.5.13 vs 4.5.11 @ line 76, column 21
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ---------------< com.futurewei.alcor:pseudo_controller >----------------
[INFO] Building pseudo_controller 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- exec-maven-plugin:3.0.0:java (default-cli) @ pseudo_controller ---

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v2.1.5.RELEASE)

2022-02-17 17:23:53.862  INFO 6284 --- [ntroller.main()] c.f.a.p.pseudo_controller                : Starting pseudo_controller on fw0011157 with PID 6284 (/home/user/src/Github.com/zzxgzgz/alcor/services/pseudo_controller/target/classes started by root in /home/user/src/Github.com/zzxgzgz/alcor/services/pseudo_controller)
2022-02-17 17:23:53.864  INFO 6284 --- [ntroller.main()] c.f.a.p.pseudo_controller                : No active profile set, falling back to default profiles: default
2022-02-17 17:23:54.059  WARN 6284 --- [kground-preinit] o.s.h.c.j.Jackson2ObjectMapperBuilder    : For Jackson Kotlin classes support please add "com.fasterxml.jackson.module:jackson-module-kotlin" to the classpath
2022-02-17 17:23:54.587  INFO 6284 --- [ntroller.main()] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode!
2022-02-17 17:23:54.589  INFO 6284 --- [ntroller.main()] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data repositories in DEFAULT mode.
2022-02-17 17:23:54.611  INFO 6284 --- [ntroller.main()] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 11ms. Found 0 repository interfaces.
2022-02-17 17:23:54.947  INFO 6284 --- [ntroller.main()] trationDelegate$BeanPostProcessorChecker : Bean 'io.opentracing.contrib.spring.cloud.async.DefaultAsyncAutoConfiguration$DefaultTracedAsyncConfigurerSupport' of type [io.opentracing.contrib.spring.cloud.async.DefaultAsyncAutoConfiguration$DefaultTracedAsyncConfigurerSupport$$EnhancerBySpringCGLIB$$eab58fda] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2022-02-17 17:23:54.984  INFO 6284 --- [ntroller.main()] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.kafka.annotation.KafkaBootstrapConfiguration' of type [org.springframework.kafka.annotation.KafkaBootstrapConfiguration$$EnhancerBySpringCGLIB$$78ff5ea2] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2022-02-17 17:23:55.042  INFO 6284 --- [ntroller.main()] trationDelegate$BeanPostProcessorChecker : Bean 'io.opentracing.contrib.spring.cloud.async.DefaultAsyncAutoConfiguration' of type [io.opentracing.contrib.spring.cloud.async.DefaultAsyncAutoConfiguration$$EnhancerBySpringCGLIB$$ebd36077] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2022-02-17 17:23:55.486  INFO 6284 --- [ntroller.main()] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8080 (http)
2022-02-17 17:23:55.513  INFO 6284 --- [ntroller.main()] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2022-02-17 17:23:55.513  INFO 6284 --- [ntroller.main()] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.33]
2022-02-17 17:23:55.600  INFO 6284 --- [ntroller.main()] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2022-02-17 17:23:55.600  INFO 6284 --- [ntroller.main()] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 1697 ms
2022-02-17 17:23:56.239  INFO 6284 --- [ntroller.main()] o.c.s.w.s.ServerTracingAutoConfiguration : Creating FilterRegistrationBean bean with TracingFilter mapped to [], skip pattern is "/api-docs.*|/swagger.*|.*\.png|.*\.css|.*\.js|.*\.html|/favicon.ico|/hystrix.stream|/actuator/(health|health/.*|info|info/.*)"
Start of NCM Test!
Running pseudo controller code!
Beginning of alcor API test, need to generate: 1 tenants,
1 projects for each tenant,
1 VPCs for each project,
1 subnets for each VPC,
1 ports for each subnet.
Need to generate port IPs for the first time.
Finished generating port IPs. Each subnet should have 1024 ports
Generating subnets
Finished generating subnets for vpc.
Created JSON payloads for 1 tenants,
each tenant has 1 projects,
each project has 1 vpcs,
each vpc has 1 subnets,
each subnet has 1024 ports.
Time to call those APIs! Calling APIs at 8/second
Time to test VPC API!
This VPC test will call createVPC API 1 times, at the rate of 8/second, it will wait at most 1 seconds
Total amount of calling createVPC API 1 times, finished 1 times, succeeded 1 times, at the rate of 8/second, it took 1670 milliseconds
Time to test subnet API!
This subnet test will call createSubnet API 1 times, at the rate of 8/second, it will wait at most 1 seconds
Total amount of calling createSubnet API 1 times, finished 1 times, succeeded 1 times, at the rate of 8/second, it took 3206 milliseconds
Time to test port API!
This port test will call createPort API 1022 times, at the rate of 8/second, it will wait at most 128 seconds
Total amount of calling createPort API 1022 times, finished 1022 times, succeeded1022 times, at the rate of 8/second, it took 126645 milliseconds

Future Improvements:

  1. Add more HTTP APIs for testing.
lgtm-com[bot] commented 2 years ago

This pull request introduces 2 alerts when merging d464e2cb8c4c152141e57394ff18fcb38efecc2c into ffcc5974163692c741e245b12404f802bc4c955a - view on LGTM.com

new alerts: