diff --git a/payload.json b/payload.json new file mode 100644 index 0000000..43b3061 --- /dev/null +++ b/payload.json @@ -0,0 +1,24 @@ +{ + "content": { + "certificate_request": "$CERTIFICATE_REQUEST", + "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 +} diff --git a/samples/edgedeployment.json.in b/samples/edgeworkload.json.in similarity index 97% rename from samples/edgedeployment.json.in rename to samples/edgeworkload.json.in index 19c9af8..ae7903a 100644 --- a/samples/edgedeployment.json.in +++ b/samples/edgeworkload.json.in @@ -1,6 +1,6 @@ { "apiVersion": "management.project-flotta.io/v1alpha1", - "kind": "EdgeDeployment", + "kind": "EdgeWorkload", "name": "${DEPLOYMENT_NAME}-${DEPLOYMENT_SUFFIX}", "namespace": "${NAMESPACE}", }, diff --git a/scripts/create_output_streams.sh b/scripts/create_output_streams.sh new file mode 100755 index 0000000..4af8d62 --- /dev/null +++ b/scripts/create_output_streams.sh @@ -0,0 +1,7 @@ +#!/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 diff --git a/scripts/generate_certs.sh b/scripts/generate_certs.sh new file mode 100755 index 0000000..ea026aa --- /dev/null +++ b/scripts/generate_certs.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +# make get-certs +kubectl -n flotta get secrets flotta-ca --template="{{index .data \"ca.crt\" | base64decode}}" >${test_dir}/${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 +# make get-certs END diff --git a/scripts/get_device_update.sh b/scripts/get_device_update.sh new file mode 100755 index 0000000..ddb012c --- /dev/null +++ b/scripts/get_device_update.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +echo "curl -XGET \\ + --cacert ${test_dir}/default_ca.pem \\ + --cert ${test_dir}/${DEVICE_ID}.pem \\ + --key ${test_dir}/${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 \ + -H "Content-Type: application/json" \ + -H "Cache-Control: no-cache" \ + https://${HTTP_SERVER}:${HTTP_SERVER_PORT}/${REQUEST_PATH} + +if [ $? -ne 0 ]; then + echo "Error getting device updates" + exit -1 +fi; + +exit 0 diff --git a/scripts/jmeter.log b/scripts/jmeter.log new file mode 100644 index 0000000..2258c08 --- /dev/null +++ b/scripts/jmeter.log @@ -0,0 +1,149 @@ +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 new file mode 100755 index 0000000..6f8f712 --- /dev/null +++ b/scripts/register_device.sh @@ -0,0 +1,50 @@ +#!/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') +UUID=$(uuidgen) +echo "${PAYLOAD}" | sed -e 's/"content": {/"content": {\n "certificate_request": "$CERTIFICATE_REQUEST",/g' | envsubst > ${test_dir}/${DEVICE_ID}_payload.json + +#Verify! +cat ${test_dir}/${DEVICE_ID}_payload.json | jq . + +if [ $? -ne 0 ]; then + echo "Error when checking ${test_dir}/${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 \\ + -X POST \\ + -H \"Content-Type: application/json\" \ + -o ${test_dir}/${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 \ + -X POST \ + -H "Content-Type: application/json" \ + -o ${test_dir}/${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" + 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 + + +#openssl x509 -in ${test_dir}/${DEVICE_ID}.pem --text + +if [ $? -ne 0 ]; then + echo "Error when extracting ${test_dir}/${DEVICE_ID}_response.json to ${test_dir}/${DEVICE_ID}.pem" + exit -1 +fi + +exit 0 + diff --git a/scripts/request_operator.sh b/scripts/request_operator.sh new file mode 100755 index 0000000..0d5553a --- /dev/null +++ b/scripts/request_operator.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +echo "curl -XPOST \\ + --cacert ${test_dir}/default_ca.pem \\ + --cert ${test_dir}/${DEVICE_ID}.pem \\ + --key ${test_dir}/${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 \ + -H "Content-Type: application/json" \ + --data ${POST_BODY} \ + https://${HTTP_SERVER}:${HTTP_SERVER_PORT}/${REQUEST_PATH} + +if [ $? -ne 0 ]; then + echo "Error posting device" + exit -1 +fi; + +exit 0 diff --git a/scripts/run_test_plan.sh b/scripts/run_test_plan.sh index 59ebc1d..20be33e 100755 --- a/scripts/run_test_plan.sh +++ b/scripts/run_test_plan.sh @@ -20,7 +20,7 @@ OPTIONS: -m Run must-gather to collect logs (default: false) -n Test run ID -o Edge deployment updates concurrency (default: 5) - -p Total of edge deployments per device + -p Total of edge workloads per device -q Number of namespaces (default: 10). Requires hacked version of flotta-operator and specific test plan. -r Ramp-up time in seconds to create all edge devices -s Address of OCP API server @@ -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) EDGEDEPLOYMENT_CONCURRENCY=${OPTARG};; + o) edgeworkloadMENT_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 $EDGEDEPLOYMENT_CONCURRENCY ]]; then - EDGEDEPLOYMENT_CONCURRENCY=5 - echo "INFO: Edge deployment concurrency not specified. Using default value: $EDGEDEPLOYMENT_CONCURRENCY" +if [[ -z $edgeworkloadMENT_CONCURRENCY ]]; then + edgeworkloadMENT_CONCURRENCY=5 + echo "INFO: Edge deployment concurrency not specified. Using default value: $edgeworkloadMENT_CONCURRENCY" fi if [[ -z $TEST_ID ]]; then @@ -104,7 +104,7 @@ if [[ -z $EDGE_DEVICES_COUNT ]]; then fi if [[ -z $EDGE_DEPLOYMENTS_PER_DEVICE ]]; then - echo "ERROR: Edge deployments per device is required" + echo "ERROR: edge workloads per device is required" usage exit 1 fi @@ -189,7 +189,7 @@ if [[ -n $VERBOSE ]]; then set -xv fi -test_dir="./test-run-${TEST_ID}" +export test_dir="$(pwd)/test-run-${TEST_ID}" if [ -d "$test_dir" ]; then echo "ERROR: Test directory $test_dir already exists" exit 1 @@ -209,7 +209,7 @@ echo "Target folder: $test_dir" echo "Test ID: ${TEST_ID}" echo "Test plan: ${TEST_PLAN}" echo "Total of edge devices: ${EDGE_DEVICES_COUNT}" -echo "Edge deployments per device: ${EDGE_DEPLOYMENTS_PER_DEVICE}" +echo "edge workloads per device: ${EDGE_DEPLOYMENTS_PER_DEVICE}" echo "Ramp-up time: ${RAMP_UP_TIME}" echo "Iterations: ${ITERATIONS}" echo "OCP API server: ${OCP_API_SERVER}" @@ -223,8 +223,8 @@ echo "----------------------------------------------------" cp $TEST_PLAN $test_dir/ edgedevices=$(kubectl get edgedevices --all-namespaces | wc -l) -edgedeploy=$(kubectl get edgedeployments --all-namespaces | wc -l) -echo "Before test: There are $edgedevices edge devices and $edgedeploy edge deployments" >> $test_dir/summary.txt +edgeworkload=$(kubectl get edgeworkloads --all-namespaces | wc -l) +echo "Before test: There are $edgedevices edge devices and $edgeworkload edge workloads" >> $test_dir/summary.txt } run_test() @@ -240,6 +240,8 @@ JVM_ARGS="-Xms4g -Xmx64g -Xss250k -XX:MaxMetaspaceSize=1g" $JMETER_HOME/bin/jmet -JK8S_BEARER_TOKEN=$K8S_BEARER_TOKEN \ -JHTTP_SERVER=$HTTP_SERVER \ -JHTTP_SERVER_PORT=$HTTP_SERVER_PORT \ + -JTEST_DIR=$test_dir \ + -JSCRIPTS_DIR=`pwd` \ -JNAMESPACES_COUNT=$NAMESPACES_COUNT|& tee -a $test_dir/summary.txt } @@ -253,13 +255,13 @@ echo "After test:" >> $test_dir/summary.txt if [[ -z $RUN_WITHOUT_NAMESPACES ]]; then edgedevices=$(kubectl get edgedevices --all-namespaces | wc -l) - edgedeploy=$(kubectl get edgedeployments --all-namespaces | wc -l) - echo "There are $edgedevices edge devices and $edgedeploy edge deployments" >> $test_dir/summary.txt + edgeworkload=$(kubectl get edgeworkloads --all-namespaces | wc -l) + echo "There are $edgedevices edge devices and $edgeworkload edge workloads" >> $test_dir/summary.txt else for i in $(seq 1 $NAMESPACES_COUNT); do edgedevices=$(kubectl get edgedevices -n $i | wc -l) - edgedeploy=$(kubectl get edgedeployments -n $i | wc -l) - echo "There are $edgedevices edge devices and $edgedeploy edge deployments in namespace $i" >> $test_dir/summary.txt + edgeworkload=$(kubectl get edgeworkloads -n $i | wc -l) + echo "There are $edgedevices edge devices and $edgeworkload edge workloads in namespace $i" >> $test_dir/summary.txt done fi @@ -297,7 +299,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'", - "EDGEDEPLOYMENT_CONCURRENCY": "'$EDGEDEPLOYMENT_CONCURRENCY'", + "edgeworkloadMENT_CONCURRENCY": "'$edgeworkloadMENT_CONCURRENCY'", "NAMESPACES_COUNT": "'$NAMESPACES_COUNT'"} }' @@ -392,11 +394,17 @@ kubectl scale --replicas=$REPLICAS deployment flotta-operator-controller-manager kubectl wait --for=condition=available -n flotta deployment.apps/flotta-operator-controller-manager count=0 - +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 -m 5 -s -i "$HTTP_SERVER":"$HTTP_SERVER_PORT" | grep 404 > /dev/null + curl \ + --cacert ${test_dir}/${DEVICE_ID}_ca.pem \ + --cert ${test_dir}/${DEVICE_ID}_cert.pem \ + --key ${test_dir}/${DEVICE_ID}_key.pem -v \ + -m 5 -s -i \ + https://${HTTP_SERVER}:${HTTP_SERVER_PORT} | grep 404 > /dev/null if [ "$?" == "1" ]; then echo -n "." count=$((count+1)) @@ -422,8 +430,35 @@ 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 patch_flotta_operator log_pods_details run_test diff --git a/scripts/service.yaml b/scripts/service.yaml new file mode 100644 index 0000000..c453c02 --- /dev/null +++ b/scripts/service.yaml @@ -0,0 +1,16 @@ +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/scripts/setup.sh b/scripts/setup.sh new file mode 100755 index 0000000..b68ee09 --- /dev/null +++ b/scripts/setup.sh @@ -0,0 +1,22 @@ +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 \ No newline at end of file diff --git a/scripts/teardown.sh b/scripts/teardown.sh index f10c7a6..bca618f 100755 --- a/scripts/teardown.sh +++ b/scripts/teardown.sh @@ -5,15 +5,15 @@ if [ $# -eq 1 ]; then do NS=$((i - 1)) kubectl get edgedevices -n $NS --no-headers | awk -v ns=$NS '{print $1 " --namespace=" ns}' | xargs -P 20 -n 2 kubectl patch edgedevice -p '{"metadata":{"finalizers":null}}' --type=merge - kubectl get edgedeployment -n $NS --no-headers | awk -v ns=$NS '{print $1 " --namespace=" ns}' | xargs -P 20 -n 2 kubectl patch edgedeployment -p '{"metadata":{"finalizers":null}}' --type=merge + kubectl get edgeworkload -n $NS --no-headers | awk -v ns=$NS '{print $1 " --namespace=" ns}' | xargs -P 20 -n 2 kubectl patch edgeworkload -p '{"metadata":{"finalizers":null}}' --type=merge kubectl delete edgedevice --all -n $NS - kubectl delete edgedeployments --all -n $NS + kubectl delete edgeworkloads --all -n $NS kubectl delete ns $NS done exit 0 fi kubectl get edgedevices --all-namespaces --no-headers | awk '{print $2 " --namespace=" $1}' | xargs -P 20 -n 2 kubectl patch edgedevice -p '{"metadata":{"finalizers":null}}' --type=merge -kubectl get edgedeployment --all-namespaces --no-headers | awk '{print $2 " --namespace=" $1}' | xargs -P 20 -n 2 kubectl patch edgedeployment -p '{"metadata":{"finalizers":null}}' --type=merge +kubectl get edgeworkload --all-namespaces --no-headers | awk '{print $2 " --namespace=" $1}' | xargs -P 20 -n 2 kubectl patch edgeworkload -p '{"metadata":{"finalizers":null}}' --type=merge kubectl delete edgedevice --all --all-namespaces -kubectl delete edgedeployments --all --all-namespaces +kubectl delete edgeworkloads --all --all-namespaces diff --git a/test_plans/flotta_test_plan.jmx b/test_plans/flotta_test_plan.jmx index 64b2f0a..2d25c27 100644 --- a/test_plans/flotta_test_plan.jmx +++ b/test_plans/flotta_test_plan.jmx @@ -1,5 +1,5 @@ - + @@ -10,7 +10,7 @@ HTTP_SERVER - localhost:8888 + localhost:8084 = @@ -28,17 +28,21 @@ LABEL_VALUE NAMESPACE DEPLOYMENTS_PER_DEVICE + TEST_DIR + SCRIPTS_DIR - - ${__P(HTTP_SERVER,flotta-operator-controller-manager-flotta-operator-system.apps.mycluster.redhat.com)} + + ${__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)} - ${__P(OCP_API_PORT,6443)} + ${__P(OCP_API_PORT,6443)} region emea default ${__P(DEPLOYMENTS_PER_DEVICE,5)} + ${__P(TEST_DIR,test_dir_delete_me)} + ${__P(SCRIPTS_DIR,.)} false @@ -58,6 +62,30 @@ true + + true + 0 + /bin/bash + + + + + -c + = + + + + ${SCRIPTS_DIR}/create_output_streams.sh + = + + + + + + + + + @@ -83,7 +111,64 @@ The device ID to be used for the entire scenario of a specific device and additional device properties - + + true + 0 + /bin/bash + + + + + -c + = + + + + ${SCRIPTS_DIR}/register_device.sh + = + + + + + + + DEVICE_ID + ${DEVICE_ID} + = + + + HTTP_SERVER + ${HTTP_SERVER} + = + + + HTTP_SERVER_PORT + ${HTTP_SERVER_PORT} + = + + + PRODUCT_NAME + ${PRODUCT_NAME} + = + + + SERIAL_NAME + ${SERIAL_NAME} + = + + + PAYLOAD + { "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 } + = + + + + + ${TEST_DIR}/${DEVICE_ID}_register.out + ${TEST_DIR}/${DEVICE_ID}_register.err + + + true @@ -218,9 +303,9 @@ - + - + true ${DEPLOYMENTS_PER_DEVICE} @@ -235,7 +320,7 @@ true - + true @@ -243,7 +328,7 @@ false { "apiVersion": "management.project-flotta.io/v1alpha1", - "kind": "EdgeDeployment", + "kind": "EdgeWorkload", "metadata": { "name": "${DEVICE_ID}-${NameSuffix}", "namespace": "default" @@ -290,7 +375,7 @@ ${OCP_API_PORT} https UTF-8 - /apis/management.project-flotta.io/v1alpha1/namespaces/${NAMESPACE}/edgedeployments + /apis/management.project-flotta.io/v1alpha1/namespaces/${NAMESPACE}/edgeworkloads POST true false @@ -300,7 +385,7 @@ HttpClient4 - Create Edge Deployment with labels matching for device + Create Edge Workload with labels matching for device @@ -328,8 +413,8 @@ - - Add delays between edgedeployments creation of the same device + + Add delays between edgeworkloads creation of the same device 1000 @@ -340,7 +425,7 @@ 4 - + @@ -360,13 +445,112 @@ + + true + 0 + /bin/bash + + + + + -c + = + + + + ${SCRIPTS_DIR}/get_device_update.sh + = + + + + + + + REQUEST_PATH + api/flotta-management/v1/data/${DEVICE_ID}/in + = + + + DEVICE_ID + ${DEVICE_ID} + = + + + HTTP_SERVER + ${HTTP_SERVER} + = + + + HTTP_SERVER_PORT + ${HTTP_SERVER_PORT} + = + + + + + ${TEST_DIR}/${DEVICE_ID}_get_updates.out + ${TEST_DIR}/${DEVICE_ID}_get_updates.err + + Add delays between Get Updates requests 15000 - + + true + 0 + /bin/bash + + + + + -c + = + + + + ${SCRIPTS_DIR}/request_operator.sh + = + + + + + + + REQUEST_PATH + api/flotta-management/v1/data/${DEVICE_ID}/out + = + + + POST_BODY + { "content": { "events": [ { "message": "error starting container f8433cc4b0c963ce95625ab3b1811382f852432f61a2d087422210e9d34bc2bc: cannot listen on the TCP port: listen tcp4 :11000: bind: address already in use,error starting container 7cd64802bde9d6b9dd425d79ea68eb49546e5fc87d0dce474c7515e81f448d50: a dependency of container 7cd64802bde9d6b9dd425d79ea68eb49546e5fc87d0dce474c7515e81f448d50 failed to start: container state improper", "reason": "Failed", "type": "warn" }, { "message": "error starting container f8433cc4b0c963ce95625ab3b1811382f852432f61a2d087422210e9d34bc2bc: cannot listen on the TCP port: listen tcp4 :11000: bind: address already in use,error starting container 7cd64802bde9d6b9dd425d79ea68eb49546e5fc87d0dce474c7515e81f448d50: a dependency of container 7cd64802bde9d6b9dd425d79ea68eb49546e5fc87d0dce474c7515e81f448d50 failed to start: container state improper", "reason": "Failed", "type": "warn" }, { "message": "error starting container f8433cc4b0c963ce95625ab3b1811382f852432f61a2d087422210e9d34bc2bc: cannot listen on the TCP port: listen tcp4 :11000: bind: address already in use,error starting container 7cd64802bde9d6b9dd425d79ea68eb49546e5fc87d0dce474c7515e81f448d50: a dependency of container 7cd64802bde9d6b9dd425d79ea68eb49546e5fc87d0dce474c7515e81f448d50 failed to start: container state improper", "reason": "Failed", "type": "warn" }, { "message": "error starting container f8433cc4b0c963ce95625ab3b1811382f852432f61a2d087422210e9d34bc2bc: cannot listen on the TCP port: listen tcp4 :11000: bind: address already in use,error starting container 7cd64802bde9d6b9dd425d79ea68eb49546e5fc87d0dce474c7515e81f448d50: a dependency of container 7cd64802bde9d6b9dd425d79ea68eb49546e5fc87d0dce474c7515e81f448d50 failed to start: container state improper", "reason": "Failed", "type": "warn" } ], "status": "up", "time": "${__time(yyyy-MM-dd'T'HH:mm:ss.SSS'Z')}", "version": "278650", "workloads": [ { "last_data_upload": "0001-01-01T00:00:00.000Z", "name": "${DEVICE_ID}-1", "status": "Running" }, { "last_data_upload": "0001-01-01T00:00:00.000Z", "name": "${DEVICE_ID}-2", "status": "Created" }, { "last_data_upload": "0001-01-01T00:00:00.000Z", "name": "${DEVICE_ID}-3", "status": "Running" }, { "last_data_upload": "0001-01-01T00:00:00.000Z", "name": "${DEVICE_ID}-4", "status": "Created" }, { "last_data_upload": "0001-01-01T00:00:00.000Z", "name": "${DEVICE_ID}-5", "status": "Running" }, { "last_data_upload": "0001-01-01T00:00:00.000Z", "name": "${DEVICE_ID}-6", "status": "Created" }, { "last_data_upload": "0001-01-01T00:00:00.000Z", "name": "${DEVICE_ID}-7", "status": "Running" }, { "last_data_upload": "0001-01-01T00:00:00.000Z", "name": "${DEVICE_ID}-8", "status": "Created" }, { "last_data_upload": "0001-01-01T00:00:00.000Z", "name": "${DEVICE_ID}-9", "status": "Running" } ] }, "directive": "heartbeat", "message_id": "${__UUID()}", "type": "data", "version": 1 } + = + + + DEVICE_ID + ${DEVICE_ID} + = + + + HTTP_SERVER + ${HTTP_SERVER} + = + + + HTTP_SERVER_PORT + ${HTTP_SERVER_PORT} + = + + + + + ${TEST_DIR}/${DEVICE_ID}_hearthbeat.out + ${TEST_DIR}/${DEVICE_ID}_hearthbeat.err + + + true diff --git a/test_plans/flotta_test_plan_edge_devices_only.jmx b/test_plans/flotta_test_plan_edge_devices_only.jmx index 3ddac93..ad8c987 100644 --- a/test_plans/flotta_test_plan_edge_devices_only.jmx +++ b/test_plans/flotta_test_plan_edge_devices_only.jmx @@ -1,5 +1,5 @@ - + The test plan will not include edge deployments creation @@ -10,7 +10,7 @@ HTTP_SERVER - localhost:8888 + localhost:8084 = @@ -28,17 +28,21 @@ LABEL_VALUE NAMESPACE DEPLOYMENTS_PER_DEVICE + TEST_DIR + SCRIPTS_DIR - - flotta-operator-controller-manager-flotta-operator-system.apps.mycluster.redhat.com - + + ${__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)} - 6443 + ${__P(OCP_API_PORT,6443)} region emea default - 10 + ${__P(DEPLOYMENTS_PER_DEVICE,10)} + ${__P(TEST_DIR,test_dir_delete_me)} + ${__P(SCRIPTS_DIR,.)} false @@ -58,6 +62,30 @@ true + + true + 0 + /bin/bash + + + + + -c + = + + + + ${SCRIPTS_DIR}/create_output_streams.sh + = + + + + + + + + + @@ -70,7 +98,7 @@ MAC_ADDRESS2 - + ${__UUID()} ${__RandomString(10,abcdefg)} ${__RandomString(10,abcdefg)} @@ -83,7 +111,59 @@ The device ID to be used for the entire scenario of a specific device and additional device properties - + + true + 0 + /bin/bash + + + + + -c + = + + + + ${SCRIPTS_DIR}/register_device.sh + = + + + + + + + REQUEST_PATH + api/flotta-management/v1/data/${DEVICE_ID}/in + = + + + DEVICE_ID + ${DEVICE_ID} + = + + + HTTP_SERVER + ${HTTP_SERVER} + = + + + HTTP_SERVER_PORT + ${HTTP_SERVER_PORT} + = + + + PAYLOAD + { "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 } + = + + + + + ${TEST_DIR}/${DEVICE_ID}_register.out + ${TEST_DIR}/${DEVICE_ID}_register.err + + + true @@ -507,7 +587,54 @@ 4 - + + true + 0 + /bin/bash + + + + + -c + = + + + + ${SCRIPTS_DIR}/get_device_update.sh + = + + + + + + + REQUEST_PATH + api/flotta-management/v1/data/${DEVICE_ID}/in + = + + + DEVICE_ID + ${DEVICE_ID} + = + + + HTTP_SERVER + ${HTTP_SERVER} + = + + + HTTP_SERVER_PORT + ${HTTP_SERVER_PORT} + = + + + + + ${TEST_DIR}/${DEVICE_ID}_get_updates.out + ${TEST_DIR}/${DEVICE_ID}_get_updates.err + + + @@ -532,7 +659,59 @@ - + + true + 0 + /bin/bash + + + + + -c + = + + + + ${SCRIPTS_DIR}/request_operator.sh + = + + + + + + + REQUEST_PATH + api/flotta-management/v1/data/${DEVICE_ID}/out + = + + + POST_BODY + { "content": { "events": [], "status": "up", "time": "2021-11-23T02:16:37.697+02:00", "version": "278650", "workloads": [] }, "directive": "heartbeat", "message_id": "${__UUID()}", "type": "data", "version": 1 } + = + + + DEVICE_ID + ${DEVICE_ID} + = + + + HTTP_SERVER + ${HTTP_SERVER} + = + + + HTTP_SERVER_PORT + ${HTTP_SERVER_PORT} + = + + + + + ${TEST_DIR}/${DEVICE_ID}_hearthbeat.out + ${TEST_DIR}/${DEVICE_ID}_hearthbeat.err + + + true diff --git a/test_plans/flotta_test_plan_multiple_namespaces.jmx b/test_plans/flotta_test_plan_multiple_namespaces.jmx index 2e8d8a0..6b632d2 100644 --- a/test_plans/flotta_test_plan_multiple_namespaces.jmx +++ b/test_plans/flotta_test_plan_multiple_namespaces.jmx @@ -1,5 +1,5 @@ - + @@ -23,10 +23,11 @@ DEFAULT_NAMESPACE DEPLOYMENTS_PER_DEVICE NAMESPACES_COUNT - + TEST_DIR + SCRIPTS_DIR - + ${__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)} @@ -36,7 +37,8 @@ default ${__P(DEPLOYMENTS_PER_DEVICE,5)} ${__P(NAMESPACES_COUNT,5)} - + ${__P(TEST_DIR,test_dir_delete_me)} + ${__P(SCRIPTS_DIR,.)} false @@ -90,7 +92,7 @@ HttpClient4 - Create Edge Deployment with labels matching for device + Create Edge Workload with labels matching for device @@ -133,6 +135,30 @@ true + + true + 0 + /bin/bash + + + + + -c + = + + + + ${SCRIPTS_DIR}/create_output_streams.sh + = + + + + + + + + + @@ -182,7 +208,64 @@ vars.put("NAMESPACE", ns); The device ID to be used for the entire scenario of a specific device and additional device properties - + + true + 0 + /bin/bash + + + + + -c + = + + + + ${SCRIPTS_DIR}/register_device.sh + = + + + + + + + DEVICE_ID + ${DEVICE_ID} + = + + + HTTP_SERVER + ${HTTP_SERVER} + = + + + HTTP_SERVER_PORT + ${HTTP_SERVER_PORT} + = + + + PRODUCT_NAME + ${PRODUCT_NAME} + = + + + SERIAL_NAME + ${SERIAL_NAME} + = + + + PAYLOAD + { "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 } + = + + + + + ${TEST_DIR}/${DEVICE_ID}_register.out + ${TEST_DIR}/${DEVICE_ID}_register.err + + + true @@ -327,9 +410,9 @@ vars.put("NAMESPACE", ns); - + - + true ${DEPLOYMENTS_PER_DEVICE} @@ -344,7 +427,7 @@ vars.put("NAMESPACE", ns); true - + true @@ -352,7 +435,7 @@ vars.put("NAMESPACE", ns); false { "apiVersion": "management.project-flotta.io/v1alpha1", - "kind": "EdgeDeployment", + "kind": "EdgeWorkload", "metadata": { "name": "${DEVICE_ID}-${NameSuffix}", "namespace": "${NAMESPACE}" @@ -399,7 +482,7 @@ vars.put("NAMESPACE", ns); ${OCP_API_PORT} https UTF-8 - /apis/management.project-flotta.io/v1alpha1/namespaces/${NAMESPACE}/edgedeployments + /apis/management.project-flotta.io/v1alpha1/namespaces/${NAMESPACE}/edgeworkloads POST true false @@ -409,7 +492,7 @@ vars.put("NAMESPACE", ns); HttpClient4 - Create Edge Deployment with labels matching for device + Create Edge Workload with labels matching for device @@ -437,8 +520,8 @@ vars.put("NAMESPACE", ns); - - Add delays between edgedeployments creation of the same device + + Add delays between edgeworkloads creation of the same device 1000 @@ -454,7 +537,54 @@ vars.put("NAMESPACE", ns); 4 - + + true + 0 + /bin/bash + + + + + -c + = + + + + ${SCRIPTS_DIR}/get_device_update.sh + = + + + + + + + REQUEST_PATH + api/flotta-management/v1/data/${DEVICE_ID}/in + = + + + DEVICE_ID + ${DEVICE_ID} + = + + + HTTP_SERVER + ${HTTP_SERVER} + = + + + HTTP_SERVER_PORT + ${HTTP_SERVER_PORT} + = + + + + + ${TEST_DIR}/${DEVICE_ID}_get_updates.out + ${TEST_DIR}/${DEVICE_ID}_get_updates.err + + + @@ -480,7 +610,59 @@ vars.put("NAMESPACE", ns); - + + true + 0 + /bin/bash + + + + + -c + = + + + + ${SCRIPTS_DIR}/request_operator.sh + = + + + + + + + REQUEST_PATH + api/flotta-management/v1/data/${DEVICE_ID}/out + = + + + POST_BODY + { "content": { "events": [ { "message": "error starting container f8433cc4b0c963ce95625ab3b1811382f852432f61a2d087422210e9d34bc2bc: cannot listen on the TCP port: listen tcp4 :11000: bind: address already in use,error starting container 7cd64802bde9d6b9dd425d79ea68eb49546e5fc87d0dce474c7515e81f448d50: a dependency of container 7cd64802bde9d6b9dd425d79ea68eb49546e5fc87d0dce474c7515e81f448d50 failed to start: container state improper", "reason": "Failed", "type": "warn" }, { "message": "error starting container f8433cc4b0c963ce95625ab3b1811382f852432f61a2d087422210e9d34bc2bc: cannot listen on the TCP port: listen tcp4 :11000: bind: address already in use,error starting container 7cd64802bde9d6b9dd425d79ea68eb49546e5fc87d0dce474c7515e81f448d50: a dependency of container 7cd64802bde9d6b9dd425d79ea68eb49546e5fc87d0dce474c7515e81f448d50 failed to start: container state improper", "reason": "Failed", "type": "warn" }, { "message": "error starting container f8433cc4b0c963ce95625ab3b1811382f852432f61a2d087422210e9d34bc2bc: cannot listen on the TCP port: listen tcp4 :11000: bind: address already in use,error starting container 7cd64802bde9d6b9dd425d79ea68eb49546e5fc87d0dce474c7515e81f448d50: a dependency of container 7cd64802bde9d6b9dd425d79ea68eb49546e5fc87d0dce474c7515e81f448d50 failed to start: container state improper", "reason": "Failed", "type": "warn" }, { "message": "error starting container f8433cc4b0c963ce95625ab3b1811382f852432f61a2d087422210e9d34bc2bc: cannot listen on the TCP port: listen tcp4 :11000: bind: address already in use,error starting container 7cd64802bde9d6b9dd425d79ea68eb49546e5fc87d0dce474c7515e81f448d50: a dependency of container 7cd64802bde9d6b9dd425d79ea68eb49546e5fc87d0dce474c7515e81f448d50 failed to start: container state improper", "reason": "Failed", "type": "warn" } ], "status": "up", "time": "${__time(yyyy-MM-dd'T'HH:mm:ss.SSS'Z')}", "version": "278650", "workloads": [ { "last_data_upload": "0001-01-01T00:00:00.000Z", "name": "${DEVICE_ID}-1", "status": "Running" }, { "last_data_upload": "0001-01-01T00:00:00.000Z", "name": "${DEVICE_ID}-2", "status": "Created" }, { "last_data_upload": "0001-01-01T00:00:00.000Z", "name": "${DEVICE_ID}-3", "status": "Running" }, { "last_data_upload": "0001-01-01T00:00:00.000Z", "name": "${DEVICE_ID}-4", "status": "Created" }, { "last_data_upload": "0001-01-01T00:00:00.000Z", "name": "${DEVICE_ID}-5", "status": "Running" }, { "last_data_upload": "0001-01-01T00:00:00.000Z", "name": "${DEVICE_ID}-6", "status": "Created" }, { "last_data_upload": "0001-01-01T00:00:00.000Z", "name": "${DEVICE_ID}-7", "status": "Running" }, { "last_data_upload": "0001-01-01T00:00:00.000Z", "name": "${DEVICE_ID}-8", "status": "Created" }, { "last_data_upload": "0001-01-01T00:00:00.000Z", "name": "${DEVICE_ID}-9", "status": "Running" } ] }, "directive": "heartbeat", "message_id": "${__UUID()}", "type": "data", "version": 1 } + = + + + DEVICE_ID + ${DEVICE_ID} + = + + + HTTP_SERVER + ${HTTP_SERVER} + = + + + HTTP_SERVER_PORT + ${HTTP_SERVER_PORT} + = + + + + + ${TEST_DIR}/${DEVICE_ID}_hearthbeat.out + ${TEST_DIR}/${DEVICE_ID}_hearthbeat.err + + + true