Skip to Content.
Sympa Menu

perfsonar-user - [perfsonar-user] PerfSonar limits file and perfSonar toolkit

Subject: perfSONAR User Q&A and Other Discussion

List archive

[perfsonar-user] PerfSonar limits file and perfSonar toolkit


Chronological Thread 
  • From: Tadeja Saje <>
  • To:
  • Subject: [perfsonar-user] PerfSonar limits file and perfSonar toolkit
  • Date: Fri, 19 Jul 2019 11:23:46 +0200

Hi!
We would like to allow doing test by certain IPs on our testpoint by , and we do not allow others doing tests.

Debbuging by schedular:
Hints:
requester: 127.0.0.1
server: 12.34.56.78
Identified as local-interfaces
Classified as friendlies
Application: Hosts we trust to do everything
Group 1: Limit 'always' passed
Group 1: Want all, 1/1 passed, 0/1 failed: PASS
Application PASSES
Proposal meets limits

For task starting at 2019-09-12T05:12:56 lasting PT30S:

Hints:
requester: 9.0.9.0
server: 12.34.56.78
Made no identifications.

Is this wright way?


We also installed perfsonar toolkit.
We configured tests in web interface. Is possible configure test between two different host or just between toolkit and other host?

Best regards,
Tadeja Saje
{
"#":
"-------------------------------------------------------------------",
"#": " PSCHEDULER LIMIT CONFIGURATION
",
"#": "
",
"#": "This file is a sample which contains fairly sane defaults. It
",
"#": "should be customized according to the needs of your site.
",
"#":
"-------------------------------------------------------------------",

"schema": 2,

"#":
"-------------------------------------------------------------------",
"#": "IDENTIFIERS: WHO'S ASKING?
",
"#": "
",
"#": "These identify who's asking to run the test. One requester can
",
"#": "map to zero or more identifiers.
",
"#":
"-------------------------------------------------------------------",

"identifiers": [

{
"name": "local-interfaces",
"description": "Requests coming from this system",
"type": "localif",
"data": { }
},
{
"#": "NOTE: This only works if the host can resolve DNS",
"#": "on the public Internet.",

"name": "bogons",
"description": "Bogon/Martian IPv4 addresses without private
networks",
"type": "ip-cymru-bogon",
"data": {
"exclude": [
"10.0.0.0/8",
"127.0.0.0/8",
"172.16.0.0/12",
"192.168.0.0/16",
"169.254.0.0/16",
"::/8",
"fe80::/10"
],
"timeout": "PT1S",
"fail-result": false
}
},
{
"name": "hackers",
"description": "Blocks that have tried to hack us (actually
TEST-NET-2)",
"type": "ip-cidr-list",
"data": {
"cidrs": [
"198.51.100.0/24"
]
}
},
{
"name": "r-and-e",
"description": "Requests from research and education networks",
"type": "ip-cidr-list-url",
"data": {
"source": "http://stats.es.net/sample_configs/pscheduler/ren";,
"update": "P1D",
"retry": "PT4H",
"fail-state": false
}
},
{
"name": "r-and-e1",
"description": "Requests from research and education networks",
"type": "ip-cidr-list-url",
"data": {
"source":
"http://stats.es.net/sample_configs/pscheduler/collaborators";,
"update": "P1D",
"retry": "PT4H",
"fail-state": false
}
},

{
"name": "r-and-e2",
"description": "Requests from research and education networks",
"type": "ip-cidr-list-url",
"data": {
"source": "http://stats.es.net/sample_configs/pscheduler/esnet";,
"update": "P1D",
"retry": "PT4H",
"fail-state": false
}
},

{
"name": "r-and-e3",
"description": "Requests from research and education networks",
"type": "ip-cidr-list-url",
"data": {
"source": "http://stats.es.net/sample_configs/pscheduler/sites";,
"update": "P1D",
"retry": "PT4H",
"fail-state": false
}
}

],


"#":
"-------------------------------------------------------------------",
"#": "CLASSIFIERS: HOW DO WE CLASSIFY THE IDENTIFIERS?
",
"#": "
",
"#": "These collect identifiers into groups.
",
"#":
"-------------------------------------------------------------------",

"classifiers": [
{
"name": "friendlies",
"description": "Identifiers we find friendly",
"identifiers": [ "local-interfaces","r-and-e",
"r-and-e1","r-and-e2","r-and-e3"]
},
{
"name": "hostiles",
"description": "Identifiers we find unfriendly",
"identifiers": [ "hackers", "bogons"]
}
],


"#":
"-------------------------------------------------------------------",
"#": "REWRITE: WHAT CHANGES ARE MADE TO INCOMING TASKS?
",
"#": "
",
"#": "This is a jq transform that makes changes to incoming tasks prior
",
"#": "to limit enforcement.
",
"#":
"-------------------------------------------------------------------",

"rewrite": {
"script": [
"import \"pscheduler/iso8601\" as iso;",

"# This does nothing but is recommended so the statements below",
"# all begin with |. (This makes editing easier.)",
".",

"# Hold this for use later.",
"| .test.type as $testtype",

"# Throttle non-friendlies wanting UDP throughput to 50 Mb/s",
"| if $testtype == \"throughput\"",
" and .test.spec.udp",
" and (",
" (.test.spec.bandwidth == null)",
" or (.test.spec.bandwidth > 50000000)",
" )",
" and (classifiers | contains([\"friendlies\"]) | not)",
" then",
" .test.spec.bandwidth = 50000000",
" | change(\"Throttled UDP bandwidth to 50 Mb/s\")",
" else",
" .",
" end",

"# Make some tests run a minimum of 5 seconds",
"| if ( [\"idle\", \"idlebgm\", \"idleex\", \"latency\",
\"latencybg\", \"throughput\" ]",
" | contains([$testtype]) )",
" and .test.spec.duration != null",
" and iso::duration_as_seconds(.test.spec.duration) < 5",
" then",
" .test.spec.duration = \"PT5S\"",
" | change(\"Bumped duration to 5-second minimum\")",
" else",
" .",
" end",

"# The end. (This takes care of the no-comma-at-end problem)"
]
},



"#":
"-------------------------------------------------------------------",
"#": "LIMITS: WHAT ARE THE RESTRICTIONS?
",
"#": "
",
"#": "These are comparisons made against the type of test being
proposed,",
"#": "the paramaters for the run and when it is proposed to be run.
",
"#":
"-------------------------------------------------------------------",

"limits": [
{
"name": "always",
"description": "Always passes",
"type": "pass-fail",
"data": {
"pass": true
}
},
{
"name": "never",
"description": "Always fails",
"type": "pass-fail",
"data": {
"pass": false
}
},
{
"#": "This prevents denial of service by scheduling long tasks.",
"name": "idleex-default",
"description": "Default limits for idleex",
"type": "test",
"data": {
"test": "idleex",
"limit": {
"duration": {
"range": {
"lower": "PT1S",
"upper": "PT2S"
}
}
}
}
},

{
"name": "innocuous-tests",
"description": "Tests considered harmless",
"type": "test-type",
"data": {
"#": "Resource hogs, which will be inverted below",
"types": [ "throughput", "idleex" ]
},
"invert": true
},
{
"name": "throughput-default-time",
"description": "Throughput time limits",
"type": "test",
"data": {
"test": "throughput",
"limit": {
"duration": {
"range": {
"lower": "PT5S",
"upper": "PT60S"
}
}
}
}
}
],


"#":
"-------------------------------------------------------------------",
"#": "APPLICATIONS: TO WHOM DO WE APPLY THE LIMITS?
",
"#": "
",
"#": "These are processed in order until one passes all of the
",
"#": "requirements. The run will be rejected if one fails with
",
"#": "stop-on-failure set to true or none of them passes.
",
"#":
"-------------------------------------------------------------------",

"applications": [
{
"description": "Hosts we trust to do everything",
"classifier": "friendlies",
"apply": [
{ "require": "all", "limits": [ "always" ] }
]
},
{
"description": "Hosts we don't want running any tests",
"classifier": "hostiles",
"apply": [
{ "require": "all", "limits": [ "never" ] }
],
"stop-on-failure": true
}
]
}


Archive powered by MHonArc 2.6.19.

Top of Page