Skip to content

Instantly share code, notes, and snippets.

@rukletsov
rukletsov / expand_roles.sh
Last active June 20, 2022 16:40
[Expand StackRox roles] A script to fetch and expand roles from a running StackRox's Central #redhat #stackrox #tools
#! /usr/bin/env bash
set -uo pipefail
[[ -n "$ROX_HOST" ]] || die "ROX_HOST environment variable required. Example: k8s.demo.stackrox.com"
[[ -n "$ROX_TOKEN" ]] || die "ROX_TOKEN environment variable required"
# Helper functions.
eecho() {
@rukletsov
rukletsov / uuid-to-externalid
Created August 10, 2020 07:45
[Convert UUID to ExternalId] #bryter #tools
import io.bryter.backend.ExternalId
val uuid = "<uuid>"
val eid = ExternalId("220c6636-82b7-4ba3-8f48-6ec556cd9878")
print("$eid")
@rukletsov
rukletsov / prometheus.txt
Last active August 31, 2020 16:40
[prometheus goodies] #bryter #tools #testing
kubectl port-forward -n monitoring deployment/prometheus-server 9090:9090
kubectl port-forward -n openfaas deployment/prometheus 9999:9090
kubectl edit configmaps -n monitoring prometheus-server
sum by (area, id) (jvm_memory_used_bytes{faas_function="alex-weather-test-mo-a58b588c"})
prometheus.io.port: "8080"
@rukletsov
rukletsov / 1.4.x-test-failures-triage.md
Created January 28, 2019 10:47
Triaging of test failures from a recent Mesos 1.4.x build across several distros.

I believe the spike in failures after Sep 27, 2018 was caused by reverting a partial fix for MESOS-9116, which will not be back ported to 1.4.x.

CentOS 6

Poorly written tests that have been fixed starting from Mesos 1.5.0, see r/61982/ and MESOS-8093:

  • PersistentVolumeDefaultExecutor.ROOT_TaskSandboxPersistentVolume/1
  • PersistentVolumeDefaultExecutor.ROOT_TaskSandboxPersistentVolume/2
  • ROOT_VerifyContainerIP/1
  • ROOT_INTERNET_CURL_NestedSimpleCommand

Failing due to some docker registries trying to talk HTTP/2 to us; fixed starting Mesos 1.5.2, see MESOS-8907:

{"timestamp": "2018.12.13 22:24", "xfailflakes": [{"file": "/packages/dcos-integration-test/extra/test_metronome.py", "test": "test_metronome", "ticket": "DCOS-40611", "repo": "https://github.com/dcos/dcos.git", "branch": "master"}, {"file": "/packages/dcos-integration-test/extra/test_metrics.py", "test": "test_metrics_containers", "ticket": "DCOS_OSS-4486", "repo": "https://github.com/dcos/dcos.git", "branch": "master"}, {"file": "/packages/dcos-integration-test/extra/test_networking.py", "test": "test_ipv6", "ticket": "DCOS-46146", "repo": "https://github.com/dcos/dcos.git", "branch": "master"}, {"file": "/packages/dcos-integration-test/extra/test_networking.py", "test": "test_if_overlay_ok", "ticket": "DCOS-46146", "repo": "https://github.com/dcos/dcos.git", "branch": "master"}, {"file": "/packages/dcos-integration-test/extra/test_dcos_diagnostics.py", "test": "test_dcos_diagnostics_bundle_create_download_delete", "ticket": "DCOS-44935", "repo": "https://github.com/dcos/dcos.git", "branch": "master"}, {"fi
import json, os, re, shutil, sys, time
dcos_oss_dir = "dcos"
dcos_oss_repo = "https://github.com/dcos/dcos.git"
#dcos_ee_dir = "dcos-ee"
#dcos_ee_repo = "https://github.com/mesosphere/dcos-enterprise.git"
# Clone DC/OS OSS repo.
os.system("git clone {} {}".format(dcos_oss_repo, dcos_oss_dir))
@rukletsov
rukletsov / delay-with-health.txt
Created September 5, 2018 09:12
Benchmark with 200ms delay querying '/health' as indicator.
// Batching
[ RUN ] AgentFrameworkTaskCount/MasterActorResponsivenessDelay_BENCHMARK_Test.WithV0StateLoad/0
Test setup: 100 agents with a total of 10000 running tasks and 10000 completed tasks; 50 '/state' and '/health' requests will be sent with 200ms interval
Launching 50 '/health' requests
'/health' response [min, p25, p50, p75, p90, max]: [622959ns, 1.494656ms, 1.605218ms, 1.663084ms, 1.705237ms, 1.772696ms] from 50 measurements
Launching 50 '/state' requests in background
Launching 50 '/health' requests
'/state' response [min, p25, p50, p75, p90, max]: ['/health' response [min, p25, p50, p75, p90, max]: [131.229127ms, 153.756259ms, 174.671836ms, 1.050759ms, 189.301492ms, 1.175045ms, 208.441576ms, 1.533433ms, 234.150482ms] from 50 measurements1.672179ms,
1.813927ms, 1.92152ms] from 50 measurements
[ OK ] AgentFrameworkTaskCount/MasterActorResponsivenessDelay_BENCHMARK_Test.WithV0StateLoad/0 (21093 ms)
@rukletsov
rukletsov / multiclient-with-health.txt
Created September 5, 2018 09:11
Benchmark with 5 parallel clients querying '/health' as indicator.
// Batching
[----------] 2 tests from AgentFrameworkTaskCount/MasterActorResponsivenessMulticlient_BENCHMARK_Test
[ RUN ] AgentFrameworkTaskCount/MasterActorResponsivenessMulticlient_BENCHMARK_Test.WithV0StateLoad/0
Test setup: 100 agents with a total of 10000 running tasks and 10000 completed tasks; 50 '/state' requests will be sent while constantly probing '/health'
Launching 50 '/health' requests
'/health' response [min, p25, p50, p75, p90, max]: [471312ns, 526136ns, 550777ns, 577803ns, 596056ns, 790455ns] from 50 measurements
Launching 5 * 50 '/state' requests in background
Launching 50 '/health' requests
'/health' response [min, p25, p50, p75, p90, max]: [156.599993ms, 171.324777ms, 180.105329ms, 216.092973ms, 238.826894ms, 313.303898ms] from 75 measurements
'/state' response [min, p25, p50, p75, p90, max]: [107.083018ms, 265.769455ms, 299.848309ms, 333.216036ms, 381.40314ms, 449.103044ms] from 240 measurements
@rukletsov
rukletsov / delay-with-flags.txt
Created September 5, 2018 09:10
Benchmark with 200ms delay querying '/flags' as indicator.
// Batching
[ RUN ] AgentFrameworkTaskCount/MasterActorResponsivenessDelay_BENCHMARK_Test.WithV0StateLoad/0
Test setup: 100 agents with a total of 10000 running tasks and 10000 completed tasks; 50 '/state' and '/flags' requests will be sent with 200ms interval
Launching 50 '/flags' requests
'/flags' response [min, p25, p50, p75, p90, max]: [1.15973ms, 2.302591ms, 2.362946ms, 2.41298ms, 2.458206ms, 2.484077ms] from 50 measurements
Launching 50 '/state' requests in background
Launching 50 '/flags' requests
'/flags' response [min, p25, p50, p75, p90, max]: ['/state' response [min, p25, p50, p75, p90, max]: [1.443493ms, 1.777761ms, 2.069149ms, 2.346175ms, 2.670701ms, 134.609853ms, 109.871186ms] from 168.95479150ms measurements,
178.374138ms, 191.819582ms, 210.266854ms, 230.050357ms] from 50 measurements
[ OK ] AgentFrameworkTaskCount/MasterActorResponsivenessDelay_BENCHMARK_Test.WithV0StateLoad/0 (21084 ms)
@rukletsov
rukletsov / multiclient-with-flags.txt
Created September 5, 2018 09:09
Benchmark with 5 parallel clients querying '/flags' as indicator.
// Batching
[----------] 2 tests from AgentFrameworkTaskCount/MasterActorResponsivenessMulticlient_BENCHMARK_Test
[ RUN ] AgentFrameworkTaskCount/MasterActorResponsivenessMulticlient_BENCHMARK_Test.WithV0StateLoad/0
Test setup: 100 agents with a total of 10000 running tasks and 10000 completed tasks; 50 '/state' requests will be sent while constantly probing '/flags'
Launching 50 '/flags' requests
'/flags' response [min, p25, p50, p75, p90, max]: [842645ns, 900749ns, 924365ns, 953417ns, 989962ns, 1.334275ms] from 50 measurements
Launching 5 * 50 '/state' requests in background
Launching 50 '/flags' requests
'/flags' response [min, p25, p50, p75, p90, max]: [90.556232ms, 166.335271ms, 176.443218ms, 184.869225ms, 189.584356ms, 238.326095ms] from 74 measurements
'/state' response [min, p25, p50, p75, p90, max]: [97.821815ms, 246.317104ms, 264.7029ms, 277.405458ms, 289.703801ms, 340.738042ms] from 242 measurements