Closed m8pple closed 3 years ago
Does it work if you change the load command to:
load /app = +"plate_3x3.xml"
(Note the plus before the file name). The syntax of the commands has changed to be that the plus means append to the set path, no plus is absolute.
Ah, I had mis-read the document about +
. So I had interpreted it as "relative to the current
directory", and not noticed the "configured directory". I thought '+' was something new,
rather than providing the old behaviour.
I actually tried using + before and it also got Cannot find file
:
dt10@joxer:/mnt/e/dt10_all/POETS/Orchestrator$ rlwrap -r -H .orchestrate-cmd-history.txt ./orchestrate.sh
[WARN] Launcher: Not running on a POETS box, and found no motherships running on alternative machines, so we're not spawning any mothership processes.
POETS> 12:05:22.06: 20(I) The microlog for the command 'load /engine = "../Config/POETSHardwareOneBox.ocfg"' will be written to '../Output/Microlog/Microlog_2021_05_16T12_05_22p0.plog'.
POETS> 12:05:22.06: 140(I) Topology loaded from file ||../Config/POETSHardwareOneBox.ocfg||.
POETS>path /apps = "/mnt/e/dt10_all/POETS/Orchestrator_examples/plate_heat/pregen"
POETS> 12:05:29.12: 23(I) path /apps = "/mnt/e/dt10_all/POETS/Orchestrator_examples/plate_heat/pregen"
POETS> 12:05:29.12: 20(I) The microlog for the command 'path /apps = "/mnt/e/dt10_all/POETS/Orchestrator_examples/plate_heat/pregen"' will be written to '../Output/Microlog/Microlog_2021_05_16T12_05_29p0.plog'.
POETS>load /app = +"plate_3x3.xml"
POETS> 12:05:36.64: 23(I) load /app = +"plate_3x3.xml"
POETS> 12:05:36.64: 20(I) The microlog for the command 'load /app = +"plate_3x3.xml"' will be written to '../Output/Microlog/Microlog_2021_05_16T12_05_36p0.plog'.
POETS> 12:05:36.64: 112(E) Cannot find file /mnt/e/dt10_all/POETS/Orchestrator_examples/plate_heat/pregenplate_3x3.xml
However, I didn't notice that it is because of a missing trailing slash when configuring the directory.
The documentation does describe things correctly, and I think without memories of the old approach I would have read it more carefully and avoided the problem.
To make it more user-friendly could I suggest:
Change the discussion in orchestrator-documentation
from:
The + operator informs the Orchestrator to look in the configured directory (the root directory of the Orchestrator in the default configuration) for the application file.
to:
The + operator informs the Orchestrator to look for the application file in the directory configured using
path /apps
; by default this is the Orchestrator's root directory.
Make the default application path the current working directory when orchestrate.sh
was launched. Assuming most people will be users of the orchestrator, they will be
calling it as /usr/local/Orchestrator/orchestrate
or something, and probably don't have
the ability to write files in the orchestrator root directory. I'm currently trying to use the orchestrator,
so my working directory is where the application files I'm developing are. (Also, there are
no xml files anywhere in the orchestrator root folder).
Allow configured directories to be set with or without trailing slashes. It is explicitly defined as a
directory rather than a prefix, so it should be possible to add a slash if it doesn't already
exist. The older version of the orchestrator interface also allowed trailing slashes to be omitted
for task /path
.
Going through suggestions:
1.
I disagree with this phrasing, but I think we can come to a compromise... a PR is inbound.
2.
It already is.
3.
Good one.
Reading #193, I now understand that, by your second point, you mean people might call orchestrator.sh
from a different directory. One thing at a time, I reckon.
This is in "1.0.0-alpha", commit 6c6daa6f29eabebed4516bad25540a51ffde1504.
I've got the orchestrator examples repo cloned to
/mnt/e/dt10_all/POETS/Orchestrator_examples
:If I then try to set the search path using
path /apps
and then loadplate_3x3.xml
it can't find the file:However, if I give the absolute path then it can find the file:
(No idea why it is failing to validate, but it can at least find the file).