diff --git a/.gitignore b/.gitignore index 66fd13c..cba6286 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ # Dependency directories (remove the comment below to include it) # vendor/ +*.log \ No newline at end of file diff --git a/payload.json b/samples/edgedevice-registration-simple.json.in similarity index 100% rename from payload.json rename to samples/edgedevice-registration-simple.json.in diff --git a/scripts/create_output_streams.sh b/scripts/create_output_streams.sh index 4af8d62..4d33b8c 100755 --- a/scripts/create_output_streams.sh +++ b/scripts/create_output_streams.sh @@ -1,7 +1,11 @@ #!/bin/bash -touch ${TEST_DIR}/${DEVICE_ID}_register.out -touch ${TEST_DIR}/${DEVICE_ID}_register.err -touch ${TEST_DIR}/${DEVICE_ID}_get_updates.err -touch ${TEST_DIR}/${DEVICE_ID}_get_updates.out -touch ${TEST_DIR}/${DEVICE_ID}_hearthbeat.out -touch ${TEST_DIR}/${DEVICE_ID}_hearthbeat.err \ No newline at end of file +mkdir -p ${REGISTRATION_FOLDER} +mkdir -p ${GET_UPDATES_FOLDER} +mkdir -p ${HEARTBEAT_FOLDER} + +touch ${REGISTRATION_FOLDER}/${DEVICE_ID}_register.out +touch ${REGISTRATION_FOLDER}/${DEVICE_ID}_register.err +touch ${GET_UPDATES_FOLDER}/${DEVICE_ID}_get_updates.err +touch ${GET_UPDATES_FOLDER}/${DEVICE_ID}_get_updates.out +touch ${HEARTBEAT_FOLDER}/${DEVICE_ID}_heartbeat.out +touch ${HEARTBEAT_FOLDER}/${DEVICE_ID}_heartbeat.err \ No newline at end of file diff --git a/scripts/generate_certs.sh b/scripts/generate_certs.sh index ea026aa..3ad62a7 100755 --- a/scripts/generate_certs.sh +++ b/scripts/generate_certs.sh @@ -1,8 +1,13 @@ #!/bin/bash +if [[ -z "${CERTS_FOLDER}" ]]; then + export CERTS_FOLDER="${test_dir}/certs" + echo "CERTS_FOLDER no defined, setting it to ${CERTS_FOLDER}" +fi +mkdir -p $CERTS_FOLDER # make get-certs -kubectl -n flotta get secrets flotta-ca --template="{{index .data \"ca.crt\" | base64decode}}" >${test_dir}/${DEVICE_ID}_ca.pem +kubectl -n flotta get secrets flotta-ca --template="{{index .data \"ca.crt\" | base64decode}}" > ${CERTS_FOLDER}/${DEVICE_ID}_ca.pem export REG_SECRET_NAME=$(kubectl get secrets -n flotta -l reg-client-ca=true --sort-by=.metadata.creationTimestamp | tail -1 | awk '{print $1}') -kubectl -n flotta get secret ${REG_SECRET_NAME} --template="{{index .data \"client.crt\" | base64decode}}" > ${test_dir}/${DEVICE_ID}_cert.pem -kubectl -n flotta get secret ${REG_SECRET_NAME} --template="{{index .data \"client.key\" | base64decode}}" > ${test_dir}/${DEVICE_ID}_key.pem +kubectl -n flotta get secret ${REG_SECRET_NAME} --template="{{index .data \"client.crt\" | base64decode}}" > ${CERTS_FOLDER}/${DEVICE_ID}_cert.pem +kubectl -n flotta get secret ${REG_SECRET_NAME} --template="{{index .data \"client.key\" | base64decode}}" > ${CERTS_FOLDER}/${DEVICE_ID}_key.pem # make get-certs END diff --git a/scripts/get_device_update.sh b/scripts/get_device_update.sh index ddb012c..3a1bb01 100755 --- a/scripts/get_device_update.sh +++ b/scripts/get_device_update.sh @@ -1,17 +1,17 @@ #!/bin/bash echo "curl -XGET \\ - --cacert ${test_dir}/default_ca.pem \\ - --cert ${test_dir}/${DEVICE_ID}.pem \\ - --key ${test_dir}/${DEVICE_ID}.key -v \\ + --cacert ${CERTS_FOLDER}/default_ca.pem \\ + --cert ${CERTS_FOLDER}/${DEVICE_ID}.pem \\ + --key ${CERTS_FOLDER}/${DEVICE_ID}.key -v \\ -H \"Content-Type: application/json\" \\ -H \"Cache-Control: no-cache\" \\ https://${HTTP_SERVER}:${HTTP_SERVER_PORT}/${REQUEST_PATH}" curl -XGET \ - --cacert ${test_dir}/default_ca.pem \ - --cert ${test_dir}/${DEVICE_ID}.pem \ - --key ${test_dir}/${DEVICE_ID}.key -v \ + --cacert ${CERTS_FOLDER}/default_ca.pem \ + --cert ${CERTS_FOLDER}/${DEVICE_ID}.pem \ + --key ${CERTS_FOLDER}/${DEVICE_ID}.key -v \ -H "Content-Type: application/json" \ -H "Cache-Control: no-cache" \ https://${HTTP_SERVER}:${HTTP_SERVER_PORT}/${REQUEST_PATH} diff --git a/scripts/jmeter.log b/scripts/jmeter.log deleted file mode 100644 index 2258c08..0000000 --- a/scripts/jmeter.log +++ /dev/null @@ -1,149 +0,0 @@ -2022-04-22 16:38:13,913 INFO o.a.j.u.JMeterUtils: Setting Locale to en_GB -2022-04-22 16:38:13,925 INFO o.a.j.JMeter: Loading user properties from: /home/test/apache-jmeter-5.4.1/bin/user.properties -2022-04-22 16:38:13,925 INFO o.a.j.JMeter: Loading system properties from: /home/test/apache-jmeter-5.4.1/bin/system.properties -2022-04-22 16:38:13,925 INFO o.a.j.JMeter: Setting JMeter property: EDGE_DEVICES_COUNT=1 -2022-04-22 16:38:13,925 INFO o.a.j.JMeter: Setting JMeter property: EDGE_DEPLOYMENTS_PER_DEVICE=5 -2022-04-22 16:38:13,925 INFO o.a.j.JMeter: Setting JMeter property: RAMP_UP_TIME=2 -2022-04-22 16:38:13,925 INFO o.a.j.JMeter: Setting JMeter property: ITERATIONS=1 -2022-04-22 16:38:13,925 INFO o.a.j.JMeter: Setting JMeter property: OCP_API_SERVER=api.mycluster.redhat.com -2022-04-22 16:38:13,925 INFO o.a.j.JMeter: Setting JMeter property: K8S_BEARER_TOKEN=eyJhbGciOiJSUzI1NiIsImtpZCI6IlhscnBTQjdRcXo0UjhWN01IZ05zdVh2WnFFajh5UTAzTk5uTjNDdnR3N0kifQ.eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9uYW1lc3BhY2UiOiJkZWZhdWx0Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9zZWNyZXQubmFtZSI6ImZsb3R0YS1zY2FsZS10b2tlbi1ybmR6diIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VydmljZS1hY2NvdW50Lm5hbWUiOiJmbG90dGEtc2NhbGUiLCJrdWJlcm5ldGVzLmlvL3NlcnZpY2VhY2NvdW50L3NlcnZpY2UtYWNjb3VudC51aWQiOiJiMWRhNzRmZi1jNzYzLTRkMDktODVlNS1hMjNhYmEwNjU2MWQiLCJzdWIiOiJzeXN0ZW06c2VydmljZWFjY291bnQ6ZGVmYXVsdDpmbG90dGEtc2NhbGUifQ.oR3nTYDlV0b-kghIJK3wKLei6KpGLYq1bPZei6jQDI8j76wiTbxso8O75xhele30Ss8sbRimMV3qj9QJhIcupVlBlWit7U8ENVr_7RHrh9O6F4KwNJTiW9TetOSOt7puS7hx7eDTRLIzyMbf6pfNXUUiBhIvALxnHyn2mkXoApYxkVvM7s0nWeVECx4JXJHnSh9vUje3imphOcz1hkm1H1r6vdZpjefBJPBC7ip0Ypoheud2ijKJf81cZI40FnPzny0Vl1hnPdHMtt4_sHWD_zGJIjuRbwo5h-rB7iXfAXxTf1ZpDvgbMn0p-D1AbybsIcyoHKxXZki9uG5hfOSoz1QZmvVYOEXSaHQ8tV60DJtKZfeXfyItkqvSuzl6t-ulxTJp2S5it9r_v-NIWO5CUyjsQDkYMcsA2hZqv_TGcR70bz_BjQa91dawb1b1Tj9eavmMreDqAStCQSjSB0pea5ju2D999gvYxxddUpyqOzsBfw5qMPg84JwQVrKKl5KmboQtlRqdmwyT7VJupge6HR_DhYoa7yg9hGbPdz4ZUSTje2DrqRGSfbtalYDk3vESIiHjlg2Uri9bm4K5in0Z5Dr5S95ik2SDoJmub5fATWTETMqGmzGfi0FPqkLtoMU34kCWLAi-4aHzZO8XCLlObWB0e0falK3n_o7c_I7itg4 -2022-04-22 16:38:13,926 INFO o.a.j.JMeter: Setting JMeter property: HTTP_SERVER=project-flotta.io -2022-04-22 16:38:13,926 INFO o.a.j.JMeter: Setting JMeter property: HTTP_SERVER_PORT=30043 -2022-04-22 16:38:13,926 INFO o.a.j.JMeter: Setting JMeter property: TEST_DIR=/root/gabriel-folder/flotta-scale-tests/scripts/test-run-delete_me -2022-04-22 16:38:13,926 INFO o.a.j.JMeter: Setting JMeter property: SCRIPTS_DIR=/root/gabriel-folder/flotta-scale-tests/scripts -2022-04-22 16:38:13,926 INFO o.a.j.JMeter: Setting JMeter property: NAMESPACES_COUNT=10 -2022-04-22 16:38:13,932 INFO o.a.j.JMeter: Copyright (c) 1998-2021 The Apache Software Foundation -2022-04-22 16:38:13,932 INFO o.a.j.JMeter: Version 5.4.1 -2022-04-22 16:38:13,932 INFO o.a.j.JMeter: java.version=1.8.0_302 -2022-04-22 16:38:13,932 INFO o.a.j.JMeter: java.vm.name=OpenJDK 64-Bit Server VM -2022-04-22 16:38:13,932 INFO o.a.j.JMeter: os.name=Linux -2022-04-22 16:38:13,932 INFO o.a.j.JMeter: os.arch=amd64 -2022-04-22 16:38:13,932 INFO o.a.j.JMeter: os.version=4.18.0-339.el8.x86_64 -2022-04-22 16:38:13,932 INFO o.a.j.JMeter: file.encoding=UTF-8 -2022-04-22 16:38:13,932 INFO o.a.j.JMeter: java.awt.headless=true -2022-04-22 16:38:13,933 INFO o.a.j.JMeter: Max memory =61084270592 -2022-04-22 16:38:13,933 INFO o.a.j.JMeter: Available Processors =40 -2022-04-22 16:38:13,936 INFO o.a.j.JMeter: Default Locale=English (United Kingdom) -2022-04-22 16:38:13,937 INFO o.a.j.JMeter: JMeter Locale=English (United Kingdom) -2022-04-22 16:38:13,937 INFO o.a.j.JMeter: JMeterHome=/home/test/apache-jmeter-5.4.1 -2022-04-22 16:38:13,937 INFO o.a.j.JMeter: user.dir =/root/gabriel-folder/flotta-scale-tests/scripts -2022-04-22 16:38:13,937 INFO o.a.j.JMeter: PWD =/root/gabriel-folder/flotta-scale-tests/scripts -2022-04-22 16:38:13,938 INFO o.a.j.JMeter: IP: 10.46.41.62 Name: helios05.lab.eng.tlv2.redhat.com FullName: helios05.lab.eng.tlv2.redhat.com -2022-04-22 16:38:13,941 INFO o.a.j.JMeter: Setting property 'jmeter.reportgenerator.outputdir' to:'/root/gabriel-folder/flotta-scale-tests/scripts/test-run-delete_me/results' -2022-04-22 16:38:13,943 INFO o.a.j.s.FileServer: Default base='/root/gabriel-folder/flotta-scale-tests/scripts' -2022-04-22 16:38:13,944 INFO o.a.j.s.FileServer: Set new base='/root/gabriel-folder/flotta-scale-tests/scripts/../test_plans' -2022-04-22 16:38:14,041 INFO o.a.j.s.SaveService: Testplan (JMX) version: 2.2. Testlog (JTL) version: 2.2 -2022-04-22 16:38:14,057 INFO o.a.j.s.SaveService: Using SaveService properties file encoding UTF-8 -2022-04-22 16:38:14,061 INFO o.a.j.s.SaveService: Using SaveService properties version 5.0 -2022-04-22 16:38:14,066 INFO o.a.j.s.SaveService: Loading file: ../test_plans/flotta_test_plan_edge_devices_only.jmx -2022-04-22 16:38:14,114 INFO o.a.j.p.h.s.HTTPSamplerBase: Parser for text/html is org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser -2022-04-22 16:38:14,114 INFO o.a.j.p.h.s.HTTPSamplerBase: Parser for application/xhtml+xml is org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser -2022-04-22 16:38:14,114 INFO o.a.j.p.h.s.HTTPSamplerBase: Parser for application/xml is org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser -2022-04-22 16:38:14,114 INFO o.a.j.p.h.s.HTTPSamplerBase: Parser for text/xml is org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser -2022-04-22 16:38:14,114 INFO o.a.j.p.h.s.HTTPSamplerBase: Parser for text/vnd.wap.wml is org.apache.jmeter.protocol.http.parser.RegexpHTMLParser -2022-04-22 16:38:14,114 INFO o.a.j.p.h.s.HTTPSamplerBase: Parser for text/css is org.apache.jmeter.protocol.http.parser.CssParser -2022-04-22 16:38:14,146 INFO o.a.j.JMeter: Creating summariser -2022-04-22 16:38:14,150 INFO o.a.j.r.d.ReportGenerator: ReportGenerator will use for Parsing the separator: ',' -2022-04-22 16:38:14,150 INFO o.a.j.r.d.ReportGenerator: Will generate report at end of test from results file: /root/gabriel-folder/flotta-scale-tests/scripts/test-run-delete_me/results.csv -2022-04-22 16:38:14,150 INFO o.a.j.r.d.ReportGenerator: Reading report generator properties from: /home/test/apache-jmeter-5.4.1/bin/reportgenerator.properties -2022-04-22 16:38:14,150 INFO o.a.j.r.d.ReportGenerator: Merging with JMeter properties -2022-04-22 16:38:14,154 INFO o.a.j.r.c.ReportGeneratorConfiguration: Property 'jmeter.reportgenerator.temp_dir' not found, using default value 'temp' instead. -2022-04-22 16:38:14,157 INFO o.a.j.r.c.ReportGeneratorConfiguration: Property 'jmeter.reportgenerator.apdex_per_transaction' not found, using default value 'null' instead. -2022-04-22 16:38:14,158 INFO o.a.j.r.c.ReportGeneratorConfiguration: apdex_per_transaction is empty, not APDEX per transaction customization -2022-04-22 16:38:14,158 INFO o.a.j.r.c.ReportGeneratorConfiguration: Property 'jmeter.reportgenerator.sample_filter' not found, using default value 'null' instead. -2022-04-22 16:38:14,158 INFO o.a.j.r.c.ReportGeneratorConfiguration: Property 'jmeter.reportgenerator.report_title' not found, using default value 'null' instead. -2022-04-22 16:38:14,158 INFO o.a.j.r.c.ReportGeneratorConfiguration: Property 'jmeter.reportgenerator.start_date' not found, using default value 'null' instead. -2022-04-22 16:38:14,158 INFO o.a.j.r.c.ReportGeneratorConfiguration: Property 'jmeter.reportgenerator.end_date' not found, using default value 'null' instead. -2022-04-22 16:38:14,158 INFO o.a.j.r.c.ReportGeneratorConfiguration: Property 'jmeter.reportgenerator.date_format' not found, using default value 'null' instead. -2022-04-22 16:38:14,158 INFO o.a.j.r.c.ReportGeneratorConfiguration: Will use date range start date: null, end date: null -2022-04-22 16:38:14,162 INFO o.a.j.r.c.ReportGeneratorConfiguration: Property 'jmeter.reportgenerator.graph.totalTPS.exclude_controllers' not found, using default value 'false' instead. -2022-04-22 16:38:14,162 INFO o.a.j.r.c.ReportGeneratorConfiguration: Property 'jmeter.reportgenerator.graph.activeThreadsOverTime.exclude_controllers' not found, using default value 'false' instead. -2022-04-22 16:38:14,162 INFO o.a.j.r.c.ReportGeneratorConfiguration: Property 'jmeter.reportgenerator.graph.timeVsThreads.exclude_controllers' not found, using default value 'false' instead. -2022-04-22 16:38:14,162 INFO o.a.j.r.c.ReportGeneratorConfiguration: Property 'jmeter.reportgenerator.graph.responseTimeDistribution.exclude_controllers' not found, using default value 'false' instead. -2022-04-22 16:38:14,162 INFO o.a.j.r.c.ReportGeneratorConfiguration: Property 'jmeter.reportgenerator.graph.transactionsPerSecond.exclude_controllers' not found, using default value 'false' instead. -2022-04-22 16:38:14,163 INFO o.a.j.r.c.ReportGeneratorConfiguration: Property 'jmeter.reportgenerator.graph.responseTimePercentiles.exclude_controllers' not found, using default value 'false' instead. -2022-04-22 16:38:14,163 INFO o.a.j.r.c.ReportGeneratorConfiguration: Property 'jmeter.reportgenerator.graph.responseTimePercentilesOverTime.exclude_controllers' not found, using default value 'false' instead. -2022-04-22 16:38:14,163 INFO o.a.j.r.c.ReportGeneratorConfiguration: Property 'jmeter.reportgenerator.graph.responseTimesOverTime.exclude_controllers' not found, using default value 'false' instead. -2022-04-22 16:38:14,164 INFO o.a.j.r.c.ReportGeneratorConfiguration: Property 'jmeter.reportgenerator.graph.connectTimeOverTime.exclude_controllers' not found, using default value 'false' instead. -2022-04-22 16:38:14,164 INFO o.a.j.r.c.ReportGeneratorConfiguration: Property 'jmeter.reportgenerator.graph.latenciesOverTime.exclude_controllers' not found, using default value 'false' instead. -2022-04-22 16:38:14,164 INFO o.a.j.r.c.ReportGeneratorConfiguration: Property 'jmeter.reportgenerator.exporter.json.filters_only_sample_series' not found, using default value 'true' instead. -2022-04-22 16:38:14,164 INFO o.a.j.r.c.ReportGeneratorConfiguration: Property 'jmeter.reportgenerator.exporter.json.series_filter' not found, using default value '' instead. -2022-04-22 16:38:14,165 INFO o.a.j.r.c.ReportGeneratorConfiguration: Property 'jmeter.reportgenerator.exporter.json.show_controllers_only' not found, using default value 'false' instead. -2022-04-22 16:38:14,165 INFO o.a.j.r.c.ReportGeneratorConfiguration: Property 'jmeter.reportgenerator.exporter.html.filters_only_sample_series' not found, using default value 'true' instead. -2022-04-22 16:38:14,165 INFO o.a.j.r.c.ReportGeneratorConfiguration: Property 'jmeter.reportgenerator.exporter.html.series_filter' not found, using default value '' instead. -2022-04-22 16:38:14,165 INFO o.a.j.r.c.ReportGeneratorConfiguration: Property 'jmeter.reportgenerator.exporter.html.show_controllers_only' not found, using default value 'false' instead. -2022-04-22 16:38:14,169 INFO o.a.j.e.StandardJMeterEngine: Running the test! -2022-04-22 16:38:14,184 INFO o.a.j.s.SampleEvent: List of sample_variables: [] -2022-04-22 16:38:14,184 INFO o.a.j.s.SampleEvent: List of sample_variables: [] -2022-04-22 16:38:14,189 INFO o.a.j.e.u.CompoundVariable: Note: Function class names must contain the string: '.functions.' -2022-04-22 16:38:14,189 INFO o.a.j.e.u.CompoundVariable: Note: Function class names must not contain the string: '.gui.' -2022-04-22 16:38:14,474 INFO o.a.j.JMeter: Running test (1650634694474) -2022-04-22 16:38:14,541 INFO o.a.j.e.StandardJMeterEngine: Starting ThreadGroup: 1 : Edge Devices -2022-04-22 16:38:14,541 INFO o.a.j.e.StandardJMeterEngine: Starting 1 threads for group Edge Devices. -2022-04-22 16:38:14,541 INFO o.a.j.e.StandardJMeterEngine: Thread will start next loop on error -2022-04-22 16:38:14,542 INFO o.a.j.t.ThreadGroup: Starting thread group... number=1 threads=1 ramp-up=2 delayedStart=false -2022-04-22 16:38:14,545 INFO o.a.j.t.ThreadGroup: Started thread group number 1 -2022-04-22 16:38:14,545 INFO o.a.j.e.StandardJMeterEngine: All thread groups have been started -2022-04-22 16:38:14,548 INFO o.a.j.t.JMeterThread: Thread started: Edge Devices 1-1 -2022-04-22 16:38:14,552 INFO o.a.j.s.SampleResult: Note: Sample TimeStamps are START times -2022-04-22 16:38:14,552 INFO o.a.j.s.SampleResult: sampleresult.default.encoding is set to ISO-8859-1 -2022-04-22 16:38:14,552 INFO o.a.j.s.SampleResult: sampleresult.useNanoTime=true -2022-04-22 16:38:14,552 INFO o.a.j.s.SampleResult: sampleresult.nanoThreadSleep=5000 -2022-04-22 16:38:14,791 INFO o.a.j.p.h.s.HTTPHCAbstractImpl: Local host = helios05.lab.eng.tlv2.redhat.com -2022-04-22 16:38:14,796 INFO o.a.j.p.h.s.HTTPHC4Impl: HTTP request retry count = 1 -2022-04-22 16:38:14,869 INFO o.a.j.p.h.s.h.LazyLayeredConnectionSocketFactory: Setting up HTTPS TrustAll Socket Factory -2022-04-22 16:38:14,873 INFO o.a.j.u.JsseSSLManager: Using default SSL protocol: TLS -2022-04-22 16:38:14,873 INFO o.a.j.u.JsseSSLManager: SSL session context: per-thread -2022-04-22 16:38:14,919 INFO o.a.j.u.SSLManager: JmeterKeyStore Location: type JKS -2022-04-22 16:38:14,922 INFO o.a.j.u.SSLManager: KeyStore created OK -2022-04-22 16:38:14,922 WARN o.a.j.u.SSLManager: Keystore file not found, loading empty keystore -2022-04-22 16:38:30,144 INFO o.a.j.r.Summariser: summary + 4 in 00:00:16 = 0.3/s Avg: 124 Min: 14 Max: 249 Err: 0 (0.00%) Active: 1 Started: 1 Finished: 0 -2022-04-22 16:39:00,218 INFO o.a.j.r.Summariser: summary + 2 in 00:00:30 = 0.1/s Avg: 35 Min: 34 Max: 36 Err: 0 (0.00%) Active: 1 Started: 1 Finished: 0 -2022-04-22 16:39:00,219 INFO o.a.j.r.Summariser: summary = 6 in 00:00:46 = 0.1/s Avg: 94 Min: 14 Max: 249 Err: 0 (0.00%) -2022-04-22 16:39:15,318 INFO o.a.j.t.JMeterThread: Thread is done: Edge Devices 1-1 -2022-04-22 16:39:15,318 INFO o.a.j.t.JMeterThread: Thread finished: Edge Devices 1-1 -2022-04-22 16:39:15,322 INFO o.a.j.e.StandardJMeterEngine: Notifying test listeners of end of test -2022-04-22 16:39:15,323 INFO o.a.j.r.Summariser: summary + 3 in 00:00:15 = 0.2/s Avg: 31 Min: 23 Max: 36 Err: 0 (0.00%) Active: 0 Started: 1 Finished: 1 -2022-04-22 16:39:15,324 INFO o.a.j.r.Summariser: summary = 9 in 00:01:01 = 0.1/s Avg: 73 Min: 14 Max: 249 Err: 0 (0.00%) -2022-04-22 16:39:15,325 INFO o.a.j.JMeter: Generating Dashboard -2022-04-22 16:39:15,325 INFO o.a.j.r.d.ReportGenerator: Flushing result collector before report Generation -2022-04-22 16:39:15,341 INFO o.a.j.r.p.NormalizerSampleConsumer: Using format, 'ms', to parse timeStamp field -2022-04-22 16:39:15,391 INFO o.a.j.r.p.AbstractSampleConsumer: class org.apache.jmeter.report.processor.AggregateConsumer#stopProducing(): beginDate produced 0 samples -2022-04-22 16:39:15,391 INFO o.a.j.r.p.AbstractSampleConsumer: class org.apache.jmeter.report.processor.AggregateConsumer#stopProducing(): endDate produced 0 samples -2022-04-22 16:39:15,392 INFO o.a.j.r.p.AbstractSampleConsumer: class org.apache.jmeter.report.processor.ApdexSummaryConsumer#stopProducing(): apdexSummary produced 0 samples -2022-04-22 16:39:15,393 INFO o.a.j.r.p.AbstractSampleConsumer: class org.apache.jmeter.report.processor.RequestsSummaryConsumer#stopProducing(): requestsSummary produced 0 samples -2022-04-22 16:39:15,398 INFO o.a.j.r.p.AbstractSampleConsumer: class org.apache.jmeter.report.processor.StatisticsSummaryConsumer#stopProducing(): statisticsSummary produced 0 samples -2022-04-22 16:39:15,401 INFO o.a.j.r.p.AbstractSampleConsumer: class org.apache.jmeter.report.processor.Top5ErrorsBySamplerConsumer#stopProducing(): top5ErrorsBySampler produced 0 samples -2022-04-22 16:39:15,401 INFO o.a.j.r.p.AbstractSampleConsumer: class org.apache.jmeter.report.processor.ErrorsSummaryConsumer#stopProducing(): errorsSummary produced 0 samples -2022-04-22 16:39:15,401 INFO o.a.j.r.p.AbstractSampleConsumer: class org.apache.jmeter.report.processor.graph.impl.HitsPerSecondGraphConsumer#stopProducing(): hitsPerSecond produced 0 samples -2022-04-22 16:39:15,406 INFO o.a.j.r.p.AbstractSampleConsumer: class org.apache.jmeter.report.processor.graph.impl.LatencyVSRequestGraphConsumer#stopProducing(): latencyVsRequest produced 0 samples -2022-04-22 16:39:15,406 INFO o.a.j.r.p.AbstractSampleConsumer: class org.apache.jmeter.report.processor.graph.impl.SyntheticResponseTimeDistributionGraphConsumer#stopProducing(): syntheticResponseTimeDistribution produced 0 samples -2022-04-22 16:39:15,407 INFO o.a.j.r.p.AbstractSampleConsumer: class org.apache.jmeter.report.processor.graph.impl.BytesThroughputGraphConsumer#stopProducing(): bytesThroughputOverTime produced 0 samples -2022-04-22 16:39:15,407 INFO o.a.j.r.p.AbstractSampleConsumer: class org.apache.jmeter.report.processor.graph.impl.CodesPerSecondGraphConsumer#stopProducing(): codesPerSecond produced 0 samples -2022-04-22 16:39:15,408 INFO o.a.j.r.p.AbstractSampleConsumer: class org.apache.jmeter.report.processor.graph.impl.ResponseTimeVSRequestGraphConsumer#stopProducing(): responseTimeVsRequest produced 0 samples -2022-04-22 16:39:15,408 INFO o.a.j.r.p.AbstractSampleConsumer: class org.apache.jmeter.report.processor.FilterConsumer#stopProducing(): startIntervalControlerFilter produced 70 samples -2022-04-22 16:39:15,408 INFO o.a.j.r.p.AbstractSampleConsumer: class org.apache.jmeter.report.processor.graph.impl.TotalTPSGraphConsumer#stopProducing(): totalTPS produced 0 samples -2022-04-22 16:39:15,408 INFO o.a.j.r.p.AbstractSampleConsumer: class org.apache.jmeter.report.processor.graph.impl.ActiveThreadsGraphConsumer#stopProducing(): activeThreadsOverTime produced 0 samples -2022-04-22 16:39:15,408 INFO o.a.j.r.p.AbstractSampleConsumer: class org.apache.jmeter.report.processor.graph.impl.TimeVSThreadGraphConsumer#stopProducing(): timeVsThreads produced 0 samples -2022-04-22 16:39:15,409 INFO o.a.j.r.p.AbstractSampleConsumer: class org.apache.jmeter.report.processor.graph.impl.ResponseTimeDistributionGraphConsumer#stopProducing(): responseTimeDistribution produced 0 samples -2022-04-22 16:39:15,409 INFO o.a.j.r.p.AbstractSampleConsumer: class org.apache.jmeter.report.processor.graph.impl.TransactionsPerSecondGraphConsumer#stopProducing(): transactionsPerSecond produced 0 samples -2022-04-22 16:39:15,409 INFO o.a.j.r.p.AbstractSampleConsumer: class org.apache.jmeter.report.processor.graph.impl.ResponseTimePercentilesGraphConsumer#stopProducing(): responseTimePercentiles produced 0 samples -2022-04-22 16:39:15,411 INFO o.a.j.r.p.AbstractSampleConsumer: class org.apache.jmeter.report.processor.graph.impl.ResponseTimePercentilesOverTimeGraphConsumer#stopProducing(): responseTimePercentilesOverTime produced 0 samples -2022-04-22 16:39:15,411 INFO o.a.j.r.p.AbstractSampleConsumer: class org.apache.jmeter.report.processor.graph.impl.ResponseTimeOverTimeGraphConsumer#stopProducing(): responseTimesOverTime produced 0 samples -2022-04-22 16:39:15,411 INFO o.a.j.r.p.AbstractSampleConsumer: class org.apache.jmeter.report.processor.graph.impl.ConnectTimeOverTimeGraphConsumer#stopProducing(): connectTimeOverTime produced 0 samples -2022-04-22 16:39:15,411 INFO o.a.j.r.p.AbstractSampleConsumer: class org.apache.jmeter.report.processor.graph.impl.LatencyOverTimeGraphConsumer#stopProducing(): latenciesOverTime produced 0 samples -2022-04-22 16:39:15,411 INFO o.a.j.r.p.AbstractSampleConsumer: class org.apache.jmeter.report.processor.FilterConsumer#stopProducing(): nameFilter produced 150 samples -2022-04-22 16:39:15,411 INFO o.a.j.r.p.AbstractSampleConsumer: class org.apache.jmeter.report.processor.FilterConsumer#stopProducing(): dateRangeFilter produced 30 samples -2022-04-22 16:39:15,411 INFO o.a.j.r.p.AbstractSampleConsumer: class org.apache.jmeter.report.processor.NormalizerSampleConsumer#stopProducing(): normalizer produced 10 samples -2022-04-22 16:39:15,412 INFO o.a.j.r.p.CsvFileSampleSource: produce(): 10 samples produced in 50ms on channel 0 -2022-04-22 16:39:15,412 INFO o.a.j.r.d.ReportGenerator: Exporting data using exporter:'json' of className:'org.apache.jmeter.report.dashboard.JsonExporter' -2022-04-22 16:39:15,500 INFO o.a.j.r.d.JsonExporter: Found data for consumer statisticsSummary in context -2022-04-22 16:39:15,500 INFO o.a.j.r.d.JsonExporter: Creating statistics for overall -2022-04-22 16:39:15,500 INFO o.a.j.r.d.JsonExporter: Creating statistics for other transactions -2022-04-22 16:39:15,501 INFO o.a.j.r.d.JsonExporter: Checking output folder -2022-04-22 16:39:15,501 INFO o.a.j.r.d.JsonExporter: Writing statistics JSON to /root/gabriel-folder/flotta-scale-tests/scripts/test-run-delete_me/results/statistics.json -2022-04-22 16:39:15,531 INFO o.a.j.r.d.ReportGenerator: Exporting data using exporter:'html' of className:'org.apache.jmeter.report.dashboard.HtmlTemplateExporter' -2022-04-22 16:39:15,533 INFO o.a.j.r.d.HtmlTemplateExporter: Will generate dashboard in folder: /root/gabriel-folder/flotta-scale-tests/scripts/test-run-delete_me/results -2022-04-22 16:39:15,611 INFO o.a.j.r.d.HtmlTemplateExporter: Report will be generated in: /root/gabriel-folder/flotta-scale-tests/scripts/test-run-delete_me/results, creating folder structure -2022-04-22 16:39:15,613 INFO o.a.j.r.d.TemplateVisitor: Copying folder from '/home/test/apache-jmeter-5.4.1/bin/report-template' to '/root/gabriel-folder/flotta-scale-tests/scripts/test-run-delete_me/results', got message: /root/gabriel-folder/flotta-scale-tests/scripts/test-run-delete_me/results, found non empty folder with following content [/root/gabriel-folder/flotta-scale-tests/scripts/test-run-delete_me/results/statistics.json], will be ignored -2022-04-22 16:39:15,767 INFO o.a.j.JMeter: Dashboard generated diff --git a/scripts/register_device.sh b/scripts/register_device.sh index 6f8f712..0f417be 100755 --- a/scripts/register_device.sh +++ b/scripts/register_device.sh @@ -1,48 +1,49 @@ #!/bin/bash -openssl ecparam -name prime256v1 -genkey -noout -out ${test_dir}/${DEVICE_ID}.key -openssl req -new -subj '/CN=${DEVICE_ID}' -key ${test_dir}/${DEVICE_ID}.key -out ${test_dir}/${DEVICE_ID}.csr -export CERTIFICATE_REQUEST=$(cat ${test_dir}/${DEVICE_ID}.csr | sed 's/$/\\n/' | tr -d '\n') +openssl ecparam -name prime256v1 -genkey -noout -out ${CERTS_FOLDER}/${DEVICE_ID}.key +openssl req -new -subj '/CN=${DEVICE_ID}' -key ${CERTS_FOLDER}/${DEVICE_ID}.key -out ${CERTS_FOLDER}/${DEVICE_ID}.csr +export CERTIFICATE_REQUEST=$(cat ${CERTS_FOLDER}/${DEVICE_ID}.csr | sed 's/$/\\n/' | tr -d '\n') UUID=$(uuidgen) -echo "${PAYLOAD}" | sed -e 's/"content": {/"content": {\n "certificate_request": "$CERTIFICATE_REQUEST",/g' | envsubst > ${test_dir}/${DEVICE_ID}_payload.json + +echo "${PAYLOAD}" | sed -e 's/"content": {/"content": {\n "certificate_request": "$CERTIFICATE_REQUEST",/g' | envsubst > ${REGISTRATION_FOLDER}/${DEVICE_ID}_payload.json #Verify! -cat ${test_dir}/${DEVICE_ID}_payload.json | jq . +cat ${REGISTRATION_FOLDER}/${DEVICE_ID}_payload.json | jq . if [ $? -ne 0 ]; then - echo "Error when checking ${test_dir}/${DEVICE_ID}_payload.json" + echo "Error when checking ${REGISTRATION_FOLDER}/${DEVICE_ID}_payload.json" exit -1 fi echo "curl \ - --cacert ${test_dir}/default_ca.pem \\ - --cert ${test_dir}/default_cert.pem \\ - --key ${test_dir}/default_key.pem -v \\ - -d @${test_dir}/${DEVICE_ID}_payload.json \\ + --cacert ${CERTS_FOLDER}/default_ca.pem \\ + --cert ${CERTS_FOLDER}/default_cert.pem \\ + --key ${CERTS_FOLDER}/default_key.pem -v \\ + -d @${REGISTRATION_FOLDER}/${DEVICE_ID}_payload.json \\ -X POST \\ -H \"Content-Type: application/json\" \ - -o ${test_dir}/${DEVICE_ID}_response.json \\ + -o ${REGISTRATION_FOLDER}/${DEVICE_ID}_response.json \\ https://${HTTP_SERVER}:${HTTP_SERVER_PORT}/api/flotta-management/v1/data/${DEVICE_ID}/out" curl \ - --cacert ${test_dir}/default_ca.pem \ - --cert ${test_dir}/default_cert.pem \ - --key ${test_dir}/default_key.pem -v \ - -d @${test_dir}/${DEVICE_ID}_payload.json \ + --cacert ${CERTS_FOLDER}/default_ca.pem \ + --cert ${CERTS_FOLDER}/default_cert.pem \ + --key ${CERTS_FOLDER}/default_key.pem -v \ + -d @${REGISTRATION_FOLDER}/${DEVICE_ID}_payload.json \ -X POST \ -H "Content-Type: application/json" \ - -o ${test_dir}/${DEVICE_ID}_response.json \ + -o ${REGISTRATION_FOLDER}/${DEVICE_ID}_response.json \ https://${HTTP_SERVER}:${HTTP_SERVER_PORT}/api/flotta-management/v1/data/${DEVICE_ID}/out if [ $? -ne 0 ]; then - echo "Error when sending registration request, see ${test_dir}/${DEVICE_ID}_register.out" + echo "Error when sending registration request, see ${REGISTRATION_FOLDER_dir}/${DEVICE_ID}_register.out" exit -1 fi -cat ${test_dir}/${DEVICE_ID}_response.json | jq '.content.certificate' | sed -e 's/\\n/\n/g' | sed -e 's/"//g' > ${test_dir}/${DEVICE_ID}.pem +cat ${REGISTRATION_FOLDER}/${DEVICE_ID}_response.json | jq '.content.certificate' | sed -e 's/\\n/\n/g' | sed -e 's/"//g' > ${CERTS_FOLDER}/${DEVICE_ID}.pem -#openssl x509 -in ${test_dir}/${DEVICE_ID}.pem --text +#openssl x509 -in ${CERTS_FOLDER}/${DEVICE_ID}.pem --text if [ $? -ne 0 ]; then - echo "Error when extracting ${test_dir}/${DEVICE_ID}_response.json to ${test_dir}/${DEVICE_ID}.pem" + echo "Error when extracting ${REGISTRATION_FOLDER}/${DEVICE_ID}_response.json to ${CERTS_FOLDER}/${DEVICE_ID}.pem" exit -1 fi diff --git a/scripts/request_operator.sh b/scripts/request_operator.sh index 0d5553a..94b7a20 100755 --- a/scripts/request_operator.sh +++ b/scripts/request_operator.sh @@ -1,17 +1,17 @@ #!/bin/bash echo "curl -XPOST \\ - --cacert ${test_dir}/default_ca.pem \\ - --cert ${test_dir}/${DEVICE_ID}.pem \\ - --key ${test_dir}/${DEVICE_ID}.key -v \\ + --cacert ${CERTS_FOLDER}/default_ca.pem \\ + --cert ${CERTS_FOLDER}/${DEVICE_ID}.pem \\ + --key ${CERTS_FOLDER}/${DEVICE_ID}.key -v \\ -H \"Content-Type: application/json\" \\ --data ${POST_BODY} \\ https://${HTTP_SERVER}:${HTTP_SERVER_PORT}/${REQUEST_PATH}" curl -XPOST \ - --cacert ${test_dir}/default_ca.pem \ - --cert ${test_dir}/${DEVICE_ID}.pem \ - --key ${test_dir}/${DEVICE_ID}.key -v \ + --cacert ${CERTS_FOLDER}/default_ca.pem \ + --cert ${CERTS_FOLDER}/${DEVICE_ID}.pem \ + --key ${CERTS_FOLDER}/${DEVICE_ID}.key -v \ -H "Content-Type: application/json" \ --data ${POST_BODY} \ https://${HTTP_SERVER}:${HTTP_SERVER_PORT}/${REQUEST_PATH} diff --git a/scripts/run_test_plan.sh b/scripts/run_test_plan.sh index 20be33e..c85e1c8 100755 --- a/scripts/run_test_plan.sh +++ b/scripts/run_test_plan.sh @@ -57,7 +57,7 @@ while getopts "c:d:e:f:g:h:i:j:k:l:m:n:o:p:q:r:s:t:u:v" option; do l) LOG_LEVEL=${OPTARG};; m) MUST_GATHER=${OPTARG};; n) TEST_ID=${OPTARG};; - o) edgeworkloadMENT_CONCURRENCY=${OPTARG};; + o) EDGEWORKLOAD_CONCURRENCY=${OPTARG};; p) EDGE_DEPLOYMENTS_PER_DEVICE=${OPTARG};; q) NAMESPACES_COUNT=${OPTARG};; r) RAMP_UP_TIME=${OPTARG};; @@ -86,9 +86,9 @@ if [[ -z $REPLICAS ]]; then echo "INFO: Number of replicas not specified. Using default value: $REPLICAS" fi -if [[ -z $edgeworkloadMENT_CONCURRENCY ]]; then - edgeworkloadMENT_CONCURRENCY=5 - echo "INFO: Edge deployment concurrency not specified. Using default value: $edgeworkloadMENT_CONCURRENCY" +if [[ -z $EDGEWORKLOAD_CONCURRENCY ]]; then + EDGEWORKLOAD_CONCURRENCY=5 + echo "INFO: Edge deployment concurrency not specified. Using default value: $EDGEWORKLOAD_CONCURRENCY" fi if [[ -z $TEST_ID ]]; then @@ -229,7 +229,10 @@ echo "Before test: There are $edgedevices edge devices and $edgeworkload edge wo run_test() { -echo "INFO: Running test" +SCRIPT=$(readlink -f "$0") +SCRIPT_DIR=$(dirname "$SCRIPT") + +echo "INFO: Running test located in ${SCRIPT_DIR}" JVM_ARGS="-Xms4g -Xmx64g -Xss250k -XX:MaxMetaspaceSize=1g" $JMETER_HOME/bin/jmeter.sh -n -l $test_dir/results.csv \ -f -e -o $test_dir/results/ -t $TEST_PLAN \ -JEDGE_DEVICES_COUNT=$EDGE_DEVICES_COUNT \ @@ -241,7 +244,11 @@ JVM_ARGS="-Xms4g -Xmx64g -Xss250k -XX:MaxMetaspaceSize=1g" $JMETER_HOME/bin/jmet -JHTTP_SERVER=$HTTP_SERVER \ -JHTTP_SERVER_PORT=$HTTP_SERVER_PORT \ -JTEST_DIR=$test_dir \ - -JSCRIPTS_DIR=`pwd` \ + -JSCRIPTS_DIR=$SCRIPT_DIR \ + -JCERTS_FOLDER=$CERTS_FOLDER \ + -JREGISTRATION_FOLDER="${logs_dir}/registration" \ + -JGET_UPDATES_FOLDER="${logs_dir}/get_updates" \ + -JHEARTBEAT_FOLDER="${logs_dir}/heartbeat" \ -JNAMESPACES_COUNT=$NAMESPACES_COUNT|& tee -a $test_dir/summary.txt } @@ -299,7 +306,7 @@ kubectl patch cm -n flotta flotta-operator-manager-config --type merge --patch ' "LOG_LEVEL": "'$LOG_LEVEL'", "OBC_AUTO_CREATE": "false", "MAX_CONCURRENT_RECONCILES": "'$MAX_CONCURRENT_RECONCILES'", - "edgeworkloadMENT_CONCURRENCY": "'$edgeworkloadMENT_CONCURRENCY'", + "EDGEWORKLOAD_CONCURRENCY": "'$EDGEWORKLOAD_CONCURRENCY'", "NAMESPACES_COUNT": "'$NAMESPACES_COUNT'"} }' @@ -394,15 +401,16 @@ kubectl scale --replicas=$REPLICAS deployment flotta-operator-controller-manager kubectl wait --for=condition=available -n flotta deployment.apps/flotta-operator-controller-manager count=0 +export CERTS_FOLDER="${test_dir}/certs" DEVICE_ID='default' DEVICE_ID=$DEVICE_ID sh generate_certs.sh echo "Waiting for HTTP server to be ready at $HTTP_SERVER" until [[ count -gt 100 ]] do curl \ - --cacert ${test_dir}/${DEVICE_ID}_ca.pem \ - --cert ${test_dir}/${DEVICE_ID}_cert.pem \ - --key ${test_dir}/${DEVICE_ID}_key.pem -v \ + --cacert ${CERTS_FOLDER}/${DEVICE_ID}_ca.pem \ + --cert ${CERTS_FOLDER}/${DEVICE_ID}_cert.pem \ + --key ${CERTS_FOLDER}/${DEVICE_ID}_key.pem -v \ -m 5 -s -i \ https://${HTTP_SERVER}:${HTTP_SERVER_PORT} | grep 404 > /dev/null if [ "$?" == "1" ]; then @@ -430,35 +438,11 @@ kubectl top pods -n flotta --use-protocol-buffers } >> $test_dir/summary.txt } -setup() -{ - sysctl -w net.core.somaxconn=50000 - sysctl -w net.core.netdev_max_backlog=50000 - sysctl -w net.ipv4.tcp_max_syn_backlog=50000 - sysctl -w net.ipv4.ip_local_port_range="15000 65000" - sysctl -w net.ipv4.tcp_fin_timeout=10 - sysctl -w vm.max_map_count=999999 - sysctl -w kernel.threads-max=4113992 - - if [ -z $(grep "* soft nofile 999999" "/etc/security/limits.conf") ]; then - cat "* soft nofile 999999" >> /etc/security/limits.conf - fi - if [ -z $(grep "* hard nofile 999999" "/etc/security/limits.conf") ]; then - cat "* hard nofile 999999" >> /etc/security/limits.conf - fi - - - ifconfig br-ex txqueuelen 5000 - ifconfig cni-podman0 txqueuelen 5000 - ifconfig ens3 txqueuelen 5000 - ifconfig ens4 txqueuelen 5000 - ifconfig ovn-k8s-mp0 txqueuelen 5000 -} parse_args "$@" log_run_details -setup +sh setup patch_flotta_operator log_pods_details run_test diff --git a/scripts/service.yaml b/scripts/service.yaml deleted file mode 100644 index c453c02..0000000 --- a/scripts/service.yaml +++ /dev/null @@ -1,16 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: flotta-svc - namespace: flotta -spec: - type: NodePort - selector: - control-plane: controller-manager - ports: - # By default and for convenience, the `targetPort` is set to the same value as the `port` field. - - port: 8043 - targetPort: 8043 - # Optional field - # By default and for convenience, the Kubernetes control plane will allocate a port from a range (default: 30000-32767) - nodePort: 30043 diff --git a/test_plans/flotta_test_plan.jmx b/test_plans/flotta_test_plan.jmx index 2d25c27..a0fba88 100644 --- a/test_plans/flotta_test_plan.jmx +++ b/test_plans/flotta_test_plan.jmx @@ -10,7 +10,7 @@ HTTP_SERVER - localhost:8084 + localhost:8083 = @@ -30,9 +30,13 @@ DEPLOYMENTS_PER_DEVICE TEST_DIR SCRIPTS_DIR + REGISTRATION_FOLDER + GET_UPDATES_FOLDER + HEARTBEAT_FOLDER + CERTS_FOLDER - + ${__P(HTTP_SERVER,flotta-operator-controller-manager-flotta-operator-system.apps.mycluster.redhat.com)} ${__P(HTTP_SERVER_PORT,80)} ${__P(OCP_API_SERVER,api.mycluster.redhat.com)} @@ -43,6 +47,10 @@ ${__P(DEPLOYMENTS_PER_DEVICE,5)} ${__P(TEST_DIR,test_dir_delete_me)} ${__P(SCRIPTS_DIR,.)} + ${__P(REGISTRATION_FOLDER,./registration)} + ${__P(GET_UPDATES_FOLDER,./get_updates)} + ${__P(HEARTBEAT_FOLDER,./heartbeat)} + ${__P(CERTS_FOLDER,./certs)} false @@ -81,7 +89,28 @@ - + + + REGISTRATION_FOLDER + ${REGISTRATION_FOLDER} + = + + + GET_UPDATES_FOLDER + ${GET_UPDATES_FOLDER} + = + + + HEARTBEAT_FOLDER + ${HEARTBEAT_FOLDER} + = + + + DEVICE_ID + ${DEVICE_ID} + = + + @@ -161,11 +190,21 @@ { "content": { "hardware": { "cpu": { "architecture": "x86_64", "flags": [], "model_name": "Intel(R) Core(TM) i7-6820HQ CPU @ 2.70GHz" }, "hostname": "${HOSTNAME}", "system_vendor": { "manufacturer": "LENOVO", "product_name": "${PRODUCT_NAME}", "serial_number": "${SERIAL_NAME}" } }, "os_image_id": "unknown" }, "directive": "registration", "message_id": "${__UUID()}", "sent": "2021-11-21T14:45:25.271+02:00", "type": "data", "version": 1 } = + + REGISTRATION_FOLDER + ${REGISTRATION_FOLDER} + = + + + CERTS_FOLDER + ${CERTS_FOLDER} + = + - ${TEST_DIR}/${DEVICE_ID}_register.out - ${TEST_DIR}/${DEVICE_ID}_register.err + ${REGISTRATION_FOLDER}/${DEVICE_ID}_register.out + ${REGISTRATION_FOLDER}/${DEVICE_ID}_register.err @@ -485,11 +524,16 @@ ${HTTP_SERVER_PORT} = + + CERTS_FOLDER + ${CERTS_FOLDER} + = + - ${TEST_DIR}/${DEVICE_ID}_get_updates.out - ${TEST_DIR}/${DEVICE_ID}_get_updates.err + ${GET_UPDATES_FOLDER}/${DEVICE_ID}_get_updates.out + ${GET_UPDATES_FOLDER}/${DEVICE_ID}_get_updates.err @@ -543,11 +587,16 @@ ${HTTP_SERVER_PORT} = + + CERTS_FOLDER + ${CERTS_FOLDER} + = + - ${TEST_DIR}/${DEVICE_ID}_hearthbeat.out - ${TEST_DIR}/${DEVICE_ID}_hearthbeat.err + ${HEARTBEAT_FOLDER}/${DEVICE_ID}_heartbeat.out + ${HEARTBEAT_FOLDER}/${DEVICE_ID}_heartbeat.err diff --git a/test_plans/flotta_test_plan_edge_devices_only.jmx b/test_plans/flotta_test_plan_edge_devices_only.jmx index ad8c987..3174388 100644 --- a/test_plans/flotta_test_plan_edge_devices_only.jmx +++ b/test_plans/flotta_test_plan_edge_devices_only.jmx @@ -30,9 +30,13 @@ DEPLOYMENTS_PER_DEVICE TEST_DIR SCRIPTS_DIR + REGISTRATION_FOLDER + GET_UPDATES_FOLDER + HEARTBEAT_FOLDER + CERTS_FOLDER - + ${__P(HTTP_SERVER,flotta-operator-controller-manager-flotta-operator-system.apps.mycluster.redhat.com)} ${__P(HTTP_SERVER_PORT,80)} ${__P(OCP_API_SERVER,api.mycluster.redhat.com)} @@ -43,6 +47,10 @@ ${__P(DEPLOYMENTS_PER_DEVICE,10)} ${__P(TEST_DIR,test_dir_delete_me)} ${__P(SCRIPTS_DIR,.)} + ${__P(REGISTRATION_FOLDER,./registration)} + ${__P(GET_UPDATES_FOLDER,./get_updates)} + ${__P(HEARTBEAT_FOLDER,./heartbeat)} + ${__P(CERTS_FOLDER,./certs)} false @@ -81,7 +89,28 @@ - + + + REGISTRATION_FOLDER + ${REGISTRATION_FOLDER} + = + + + GET_UPDATES_FOLDER + ${GET_UPDATES_FOLDER} + = + + + HEARTBEAT_FOLDER + ${HEARTBEAT_FOLDER} + = + + + DEVICE_ID + ${DEVICE_ID} + = + + @@ -156,11 +185,21 @@ { "content": { "hardware": { "boot": { "current_boot_mode": "bios" }, "cpu": { "architecture": "x86_64", "count": 8, "flags": [ "fpu", "vme", "de", "pse", "tsc", "msr", "pae", "mce", "cx8", "apic", "sep", "mtrr", "pge", "mca", "cmov", "pat", "pse36", "clflush", "dts", "acpi", "mmx", "fxsr", "sse", "sse2", "ss", "ht", "tm", "pbe", "syscall", "nx", "pdpe1gb", "rdtscp", "lm", "constant_tsc", "art", "arch_perfmon", "pebs", "bts", "rep_good", "nopl", "xtopology", "nonstop_tsc", "cpuid", "aperfmperf", "pni", "pclmulqdq", "dtes64", "monitor", "ds_cpl", "vmx", "smx", "est", "tm2", "ssse3", "sdbg", "fma", "cx16", "xtpr", "pdcm", "pcid", "sse4_1", "sse4_2", "x2apic", "movbe", "popcnt", "tsc_deadline_timer", "aes", "xsave", "avx", "f16c", "rdrand", "lahf_lm", "abm", "3dnowprefetch", "cpuid_fault", "epb", "invpcid_single", "pti", "ssbd", "ibrs", "ibpb", "stibp", "tpr_shadow", "vnmi", "flexpriority", "ept", "vpid", "ept_ad", "fsgsbase", "tsc_adjust", "bmi1", "hle", "avx2", "smep", "bmi2", "erms", "invpcid", "rtm", "mpx", "rdseed", "adx", "smap", "clflushopt", "intel_pt", "xsaveopt", "xsavec", "xgetbv1", "xsaves", "dtherm", "ida", "arat", "pln", "pts", "hwp", "hwp_notify", "hwp_act_window", "hwp_epp", "md_clear", "flush_l1d" ], "frequency": 3600, "model_name": "Intel(R) Core(TM) i7-6820HQ CPU @ 2.70GHz" }, "disks": [ { "drive_type": "SSD", "id": "/dev/dm-0", "name": "dm-0", "path": "/dev/dm-0", "size_bytes": 511032950784, "smart": "{\"json_format_version\":[1,0],\"smartctl\":{\"version\":[7,2],\"svn_revision\":\"5155\",\"platform_info\":\"x86_64-linux-5.13.14-100.fc33.x86_64\",\"build_info\":\"(local build)\",\"argv\":[\"smartctl\",\"--xall\",\"--json=c\",\"/dev/dm-0\"],\"messages\":[{\"string\":\"/dev/dm-0: Unable to detect device type\",\"severity\":\"error\"}],\"exit_status\":1}}" }, { "drive_type": "SSD", "id": "/dev/dm-1", "name": "dm-1", "path": "/dev/dm-1", "size_bytes": 117440512, "smart": "{\"json_format_version\":[1,0],\"smartctl\":{\"version\":[7,2],\"svn_revision\":\"5155\",\"platform_info\":\"x86_64-linux-5.13.14-100.fc33.x86_64\",\"build_info\":\"(local build)\",\"argv\":[\"smartctl\",\"--xall\",\"--json=c\",\"/dev/dm-1\"],\"messages\":[{\"string\":\"/dev/dm-1: Unable to detect device type\",\"severity\":\"error\"}],\"exit_status\":1}}" }, { "drive_type": "SSD", "id": "/dev/dm-10", "name": "dm-10", "path": "/dev/dm-10", "size_bytes": 6576668672, "smart": "{\"json_format_version\":[1,0],\"smartctl\":{\"version\":[7,2],\"svn_revision\":\"5155\",\"platform_info\":\"x86_64-linux-5.13.14-100.fc33.x86_64\",\"build_info\":\"(local build)\",\"argv\":[\"smartctl\",\"--xall\",\"--json=c\",\"/dev/dm-10\"],\"messages\":[{\"string\":\"/dev/dm-10: Unable to detect device type\",\"severity\":\"error\"}],\"exit_status\":1}}" }, { "drive_type": "SSD", "id": "/dev/dm-2", "name": "dm-2", "path": "/dev/dm-2", "size_bytes": 477232103424, "smart": "{\"json_format_version\":[1,0],\"smartctl\":{\"version\":[7,2],\"svn_revision\":\"5155\",\"platform_info\":\"x86_64-linux-5.13.14-100.fc33.x86_64\",\"build_info\":\"(local build)\",\"argv\":[\"smartctl\",\"--xall\",\"--json=c\",\"/dev/dm-2\"],\"messages\":[{\"string\":\"/dev/dm-2: Unable to detect device type\",\"severity\":\"error\"}],\"exit_status\":1}}" }, { "drive_type": "SSD", "id": "/dev/dm-3", "name": "dm-3", "path": "/dev/dm-3", "size_bytes": 477232103424, "smart": "{\"json_format_version\":[1,0],\"smartctl\":{\"version\":[7,2],\"svn_revision\":\"5155\",\"platform_info\":\"x86_64-linux-5.13.14-100.fc33.x86_64\",\"build_info\":\"(local build)\",\"argv\":[\"smartctl\",\"--xall\",\"--json=c\",\"/dev/dm-3\"],\"messages\":[{\"string\":\"/dev/dm-3: Unable to detect device type\",\"severity\":\"error\"}],\"exit_status\":1}}" }, { "drive_type": "SSD", "id": "/dev/dm-4", "name": "dm-4", "path": "/dev/dm-4", "size_bytes": 107374182400, "smart": "{\"json_format_version\":[1,0],\"smartctl\":{\"version\":[7,2],\"svn_revision\":\"5155\",\"platform_info\":\"x86_64-linux-5.13.14-100.fc33.x86_64\",\"build_info\":\"(local build)\",\"argv\":[\"smartctl\",\"--xall\",\"--json=c\",\"/dev/dm-4\"],\"messages\":[{\"string\":\"/dev/dm-4: Unable to detect device type\",\"severity\":\"error\"}],\"exit_status\":1}}" }, { "drive_type": "SSD", "id": "/dev/dm-5", "name": "dm-5", "path": "/dev/dm-5", "size_bytes": 16609443840, "smart": "{\"json_format_version\":[1,0],\"smartctl\":{\"version\":[7,2],\"svn_revision\":\"5155\",\"platform_info\":\"x86_64-linux-5.13.14-100.fc33.x86_64\",\"build_info\":\"(local build)\",\"argv\":[\"smartctl\",\"--xall\",\"--json=c\",\"/dev/dm-5\"],\"messages\":[{\"string\":\"/dev/dm-5: Unable to detect device type\",\"severity\":\"error\"}],\"exit_status\":1}}" }, { "drive_type": "SSD", "id": "/dev/dm-6", "name": "dm-6", "path": "/dev/dm-6", "size_bytes": 477232103424, "smart": "{\"json_format_version\":[1,0],\"smartctl\":{\"version\":[7,2],\"svn_revision\":\"5155\",\"platform_info\":\"x86_64-linux-5.13.14-100.fc33.x86_64\",\"build_info\":\"(local build)\",\"argv\":[\"smartctl\",\"--xall\",\"--json=c\",\"/dev/dm-6\"],\"messages\":[{\"string\":\"/dev/dm-6: Unable to detect device type\",\"severity\":\"error\"}],\"exit_status\":1}}" }, { "drive_type": "SSD", "id": "/dev/dm-7", "name": "dm-7", "path": "/dev/dm-7", "size_bytes": 369857921024, "smart": "{\"json_format_version\":[1,0],\"smartctl\":{\"version\":[7,2],\"svn_revision\":\"5155\",\"platform_info\":\"x86_64-linux-5.13.14-100.fc33.x86_64\",\"build_info\":\"(local build)\",\"argv\":[\"smartctl\",\"--xall\",\"--json=c\",\"/dev/dm-7\"],\"messages\":[{\"string\":\"/dev/dm-7: Unable to detect device type\",\"severity\":\"error\"}],\"exit_status\":1}}" }, { "drive_type": "SSD", "id": "/dev/dm-8", "name": "dm-8", "path": "/dev/dm-8", "size_bytes": 511705088, "smart": "{\"json_format_version\":[1,0],\"smartctl\":{\"version\":[7,2],\"svn_revision\":\"5155\",\"platform_info\":\"x86_64-linux-5.13.14-100.fc33.x86_64\",\"build_info\":\"(local build)\",\"argv\":[\"smartctl\",\"--xall\",\"--json=c\",\"/dev/dm-8\"],\"messages\":[{\"string\":\"/dev/dm-8: Unable to detect device type\",\"severity\":\"error\"}],\"exit_status\":1}}" }, { "drive_type": "SSD", "id": "/dev/dm-9", "name": "dm-9", "path": "/dev/dm-9", "size_bytes": 6576668672, "smart": "{\"json_format_version\":[1,0],\"smartctl\":{\"version\":[7,2],\"svn_revision\":\"5155\",\"platform_info\":\"x86_64-linux-5.13.14-100.fc33.x86_64\",\"build_info\":\"(local build)\",\"argv\":[\"smartctl\",\"--xall\",\"--json=c\",\"/dev/dm-9\"],\"messages\":[{\"string\":\"/dev/dm-9: Unable to detect device type\",\"severity\":\"error\"}],\"exit_status\":1}}" }, { "bootable": true, "by_id": "/dev/disk/by-id/nvme-eui.002538c571b05d4b", "by_path": "/dev/disk/by-path/pci-0000:3e:00.0-nvme-1", "drive_type": "SSD", "id": "/dev/disk/by-id/nvme-eui.002538c571b05d4b", "model": "SAMSUNG MZVKW512HMJP-000L7", "name": "nvme0n1", "path": "/dev/nvme0n1", "serial": "S35BNX0J505918", "size_bytes": 512110190592, "smart": "{\"json_format_version\":[1,0],\"smartctl\":{\"version\":[7,2],\"svn_revision\":\"5155\",\"platform_info\":\"x86_64-linux-5.13.14-100.fc33.x86_64\",\"build_info\":\"(local build)\",\"argv\":[\"smartctl\",\"--xall\",\"--json=c\",\"/dev/nvme0n1\"],\"exit_status\":0},\"device\":{\"name\":\"/dev/nvme0n1\",\"info_name\":\"/dev/nvme0n1\",\"type\":\"nvme\",\"protocol\":\"NVMe\"},\"model_name\":\"SAMSUNG MZVKW512HMJP-000L7\",\"serial_number\":\"S35BNX0J505918\",\"firmware_version\":\"7L6QCXA7\",\"nvme_pci_vendor\":{\"id\":5197,\"subsystem_id\":5197},\"nvme_ieee_oui_identifier\":9528,\"nvme_total_capacity\":512110190592,\"nvme_unallocated_capacity\":0,\"nvme_controller_id\":2,\"nvme_version\":{\"string\":\"1.2\",\"value\":66048},\"nvme_number_of_namespaces\":1,\"nvme_namespaces\":[{\"id\":1,\"size\":{\"blocks\":1000215216,\"bytes\":512110190592},\"capacity\":{\"blocks\":1000215216,\"bytes\":512110190592},\"utilization\":{\"blocks\":1000215216,\"bytes\":512110190592},\"formatted_lba_size\":512,\"eui64\":{\"oui\":9528,\"ext_id\":848015940939}}],\"user_capacity\":{\"blocks\":1000215216,\"bytes\":512110190592},\"logical_block_size\":512,\"local_time\":{\"time_t\":1637498725,\"asctime\":\"Sun Nov 21 14:45:25 2021 IST\"},\"smart_status\":{\"passed\":true,\"nvme\":{\"value\":0}},\"nvme_smart_health_information_log\":{\"critical_warning\":0,\"temperature\":27,\"available_spare\":100,\"available_spare_threshold\":10,\"percentage_used\":15,\"data_units_read\":17934599,\"data_units_written\":97148210,\"host_reads\":463356329,\"host_writes\":2453263768,\"controller_busy_time\":15671,\"power_cycles\":1517,\"power_on_hours\":11110,\"unsafe_shutdowns\":261,\"media_errors\":0,\"num_err_log_entries\":495,\"warning_temp_time\":0,\"critical_comp_time\":0,\"temperature_sensors\":[27,40]},\"temperature\":{\"current\":27},\"power_cycle_count\":1517,\"power_on_time\":{\"hours\":11110}}", "wwn": "eui.002538c571b05d4b" }, { "drive_type": "SSD", "id": "/dev/zram0", "name": "zram0", "path": "/dev/zram0", "size_bytes": 4294967296, "smart": "{\"json_format_version\":[1,0],\"smartctl\":{\"version\":[7,2],\"svn_revision\":\"5155\",\"platform_info\":\"x86_64-linux-5.13.14-100.fc33.x86_64\",\"build_info\":\"(local build)\",\"argv\":[\"smartctl\",\"--xall\",\"--json=c\",\"/dev/zram0\"],\"messages\":[{\"string\":\"/dev/zram0: Unable to detect device type\",\"severity\":\"error\"}],\"exit_status\":1}}" } ], "gpus": [ { "address": "0000:01:00.0", "device_id": "13b1", "name": "GM107GLM [Quadro M1000M]", "vendor": "NVIDIA Corporation", "vendor_id": "10de" } ], "hostname": "${HOSTNAME}", "interfaces": [ { "biosdevname": "em1", "flags": [ "up", "broadcast", "multicast" ], "has_carrier": true, "ipv4_addresses": [ "10.100.102.22/24" ], "ipv6_addresses": [], "mac_address": "${MAC_ADDRESS2}", "mtu": 1500, "name": "enp0s31f6", "product": "0x15b7", "speed_mbps": 1000, "vendor": "0x8086" }, { "biosdevname": "p2p1", "flags": [ "broadcast", "multicast" ], "ipv4_addresses": [], "ipv6_addresses": [], "mac_address": "${MAC_ADDRESS2}", "mtu": 1500, "name": "wlp4s0", "product": "0x24f3", "vendor": "0x8086" } ], "memory": { "physical_bytes": 34359738368, "usable_bytes": 33084645376 }, "system_vendor": { "manufacturer": "LENOVO", "product_name": "${PRODUCT_NAME}", "serial_number": "${SERIAL_NAME}" } }, "os_image_id": "unknown" }, "directive": "registration", "message_id": "${__UUID()}", "sent": "2021-11-21T14:45:25.271+02:00", "type": "data", "version": 1 } = + + REGISTRATION_FOLDER + ${REGISTRATION_FOLDER} + = + + + CERTS_FOLDER + ${CERTS_FOLDER} + = + - ${TEST_DIR}/${DEVICE_ID}_register.out - ${TEST_DIR}/${DEVICE_ID}_register.err + ${REGISTRATION_FOLDER}/${DEVICE_ID}_register.out + ${REGISTRATION_FOLDER}/${DEVICE_ID}_register.err @@ -587,7 +626,7 @@ 4 - + true 0 /bin/bash @@ -627,11 +666,16 @@ ${HTTP_SERVER_PORT} = + + CERTS_FOLDER + ${CERTS_FOLDER} + = + - ${TEST_DIR}/${DEVICE_ID}_get_updates.out - ${TEST_DIR}/${DEVICE_ID}_get_updates.err + ${GET_UPDATES_FOLDER}/${DEVICE_ID}_get_updates.out + ${GET_UPDATES_FOLDER}/${DEVICE_ID}_get_updates.err @@ -704,11 +748,16 @@ ${HTTP_SERVER_PORT} = + + CERTS_FOLDER + ${CERTS_FOLDER} + = + - ${TEST_DIR}/${DEVICE_ID}_hearthbeat.out - ${TEST_DIR}/${DEVICE_ID}_hearthbeat.err + ${HEARTBEAT_FOLDER}/${DEVICE_ID}_heartbeat.out + ${HEARTBEAT_FOLDER}/${DEVICE_ID}_heartbeat.err diff --git a/test_plans/flotta_test_plan_multiple_namespaces.jmx b/test_plans/flotta_test_plan_multiple_namespaces.jmx index 6b632d2..07565ae 100644 --- a/test_plans/flotta_test_plan_multiple_namespaces.jmx +++ b/test_plans/flotta_test_plan_multiple_namespaces.jmx @@ -25,6 +25,10 @@ NAMESPACES_COUNT TEST_DIR SCRIPTS_DIR + REGISTRATION_FOLDER + GET_UPDATES_FOLDER + HEARTBEAT_FOLDER + CERTS_FOLDER @@ -39,6 +43,10 @@ ${__P(NAMESPACES_COUNT,5)} ${__P(TEST_DIR,test_dir_delete_me)} ${__P(SCRIPTS_DIR,.)} + ${__P(REGISTRATION_FOLDER,./registration)} + ${__P(GET_UPDATES_FOLDER,./get_updates)} + ${__P(HEARTBEAT_FOLDER,./heartbeat)} + ${__P(CERTS_FOLDER,./certs)} false @@ -154,7 +162,28 @@ - + + + REGISTRATION_FOLDER + ${REGISTRATION_FOLDER} + = + + + GET_UPDATES_FOLDER + ${GET_UPDATES_FOLDER} + = + + + HEARTBEAT_FOLDER + ${HEARTBEAT_FOLDER} + = + + + DEVICE_ID + ${DEVICE_ID} + = + + @@ -258,11 +287,21 @@ vars.put("NAMESPACE", ns); { "content": { "hardware": { "cpu": { "architecture": "x86_64", "flags": [], "model_name": "Intel(R) Core(TM) i7-6820HQ CPU @ 2.70GHz" }, "hostname": "${HOSTNAME}", "system_vendor": { "manufacturer": "LENOVO", "product_name": "${PRODUCT_NAME}", "serial_number": "${SERIAL_NAME}" } }, "os_image_id": "unknown" }, "directive": "registration", "message_id": "${__UUID()}", "sent": "2021-11-21T14:45:25.271+02:00", "type": "data", "version": 1 } = + + REGISTRATION_FOLDER + ${REGISTRATION_FOLDER} + = + + + CERTS_FOLDER + ${CERTS_FOLDER} + = + - ${TEST_DIR}/${DEVICE_ID}_register.out - ${TEST_DIR}/${DEVICE_ID}_register.err + ${REGISTRATION_FOLDER}/${DEVICE_ID}_register.out + ${REGISTRATION_FOLDER}/${DEVICE_ID}_register.err @@ -577,11 +616,16 @@ vars.put("NAMESPACE", ns); ${HTTP_SERVER_PORT} = + + CERTS_FOLDER + ${CERTS_FOLDER} + = + - ${TEST_DIR}/${DEVICE_ID}_get_updates.out - ${TEST_DIR}/${DEVICE_ID}_get_updates.err + ${GET_UPDATES_FOLDER}/${DEVICE_ID}_get_updates.out + ${GET_UPDATES_FOLDER}/${DEVICE_ID}_get_updates.err @@ -655,11 +699,16 @@ vars.put("NAMESPACE", ns); ${HTTP_SERVER_PORT} = + + CERTS_FOLDER + ${CERTS_FOLDER} + = + - ${TEST_DIR}/${DEVICE_ID}_hearthbeat.out - ${TEST_DIR}/${DEVICE_ID}_hearthbeat.err + ${HEARTBEAT_FOLDER}/${DEVICE_ID}_heartbeat.out + ${HEARTBEAT_FOLDER}/${DEVICE_ID}_heartbeat.err