Closed bgrounds closed 5 years ago
Actually, I guess a better workaround is to not publish the config before adding it.
I can just psconfig remote add /full/path/to/psconfig.json
.
That removes the need to yum -y install perfsonar-psconfig-publisher
.
Now I just need to figure out why the archive defined in my psconfig template isn't being picked up by the system.
Not sure where the right place for this question is... but here's the issue:
I use psconfig remote add /path/to/this/file
on a config template that's basically like this:
{
"addresses": {
"host1": {
"address": "host1.dc.something.com"
},
"host2": {
"address": "host2.dc.something.com"
}
},
"groups": {
"g1": {
"type": "mesh",
"addresses": [
{"name": "host1"},
{"name": "host2"}
]
}
},
"tests": {
"latency_test": {
"type": "latencybg",
"spec": {
"source": "{% address[0] %}",
"dest": "{% address[1] %}",
"packet-interval": 0.1,
"packet-count": 600
}
}
},
"archives": {
"a1": {
"archiver": "http",
"data": {
"schema": 1,
"_url": "http://localhost:8081",
"op": "post"
},
"transform": {
"script": ".test.type as $test_type | {\"results\": ., \"type\": \"\\($test_type)\" }"
}
}
},
"tasks": {
"latency_task": {
"group": "g1",
"test": "latency_test",
"archives": ["a1"]
}
}
}
But when I run psconfig pscheduler-tasks
, I get a list of tasks where each task object has an empty array for the archives section.
So the tests are actually running, but they aren't being sent to my archive.
I have a proxy server running at http://localhost:8081
to handle the test results.
Also, the following command works fine:
docker exec perfsonar bash -c 'pscheduler task --format=json --archive="$(jq -c .archives.a1 ./psconfig.json)" latency --dest=host2.dc.something.com
Where perfsonar is the name of my docker container running perfsonar, and the file ./psconfig.json
is the config file described above.
Also note that my psconfig file validates successfully:
# psconfig validate ./psconfig.json
pSConfig JSON is valid
Ah - I think I got it.
Looks like I just needed to add the --configure-archives
switch, like this:
psconfig remote add --configure-archives /full/path/to/psconfig.json
Perhaps it would be helpful to emit some kind of warning in case there are archives defined in a psconfig.json
file, but the --configure-archives
switch is not passed to the psconfig remote add
command.
I'm trying to create a custom image based off of the official perfsonar image.
I want to build my custom image such that it's already configured to run my recurring tests.
When trying to do this using the official perfsonar/testpoint image as a base, I get the following error:
publish: Unknown command. Use --help for help.
after trying to run:
psconfig publish psconfig.json
To work around this, I've added the following line to my build
RUN yum -y install perfsonar-psconfig-publisher
That resolves the problem - but I wonder if
perfsonar-psconfig-publisher
should be installed by default, or if maybe it's been intentionally left out.