Infrastructure: Flexible docker mounts for backend to test-runner transfer
Infrastructure: Flexible docker mounts for backend to test-runner transfer
Currently, the mount paths in backend , host and test-runner have to be identical. Change that for more flexible configurations.
Oh no!
You are trying to upload something other than an image. Please upload a .png, .jpg, .jpeg, .gif, .bmp, .tiff or .ico.Incoming!
Drop your designs to start your upload.
Tasks
0assigned to @miguel.munoz-gil
- Author Maintainer
// Set path of temporary directory on host _and_ inside our container, _must_ be identical this.testTmpPathHost = Paths.get(env.getProperty("host.tests.tmp.dir"));
Is this issue as simple to solve as just adding another env property, one for the host path and another for the container? something like:
// Path on the host system just as it is String hostTmpDir = env.getProperty("host.tests.dir"); // Path for the container String containerTmpDir = env.getProperty("container.tests.dir"); //Get both paths as needed this.testTmpPathHost = Paths.get(hostTmpDir); this.testTmpPathContainer = Paths.get(containerTmpDir);
Then in the docker-compose I would add something to bind the desired directory to the one we have in the container, someting like this:
volumes: - "${HOST_DIR}:/container/tmp/tests"
or even:
volumes: - "${HOST_DIR}:${CONTAINER_DIR}"
And include the needed properties and environment variables
My question then would be, how do we define the correct folder in which the user needs to provide writing permits? I assume we need to provide writing permits in the desired $HOST_DIR folder to the docker group, how then do we ensure that the group has such permits and the user has done the set up properly?
Edited by mamunozgil added InProgress label
- Author Maintainer
At my current point, I have setted flexible paths for the host and backend container, but when the host path is set outside the /tmp folder, I dont think the docker permits are aplying correctly, as I am not able to have the data written on them.
If that was the only problem, I could just keep the host path withing the tmp folder. But I am also facing the following:
Despite having submitted (and sucessfully tested the assignment, the cota-backend container has the result.json generated), on the fontend there is a submission recognised, but when you click on view all submissions or grade action, there is a division by 0 error. Which I have no clue where does it come from.
@01kuni1bif @32khsa1mst @gero.lueckemeyer any ideas?
- Owner
Good that you test thoroughly! To my shame, I must admit I do not remember ever having tested clicking on "grade"... so unfortunately, I have no idea.
- Author Maintainer
It´s already giving a bad smell since after the submission it does not move to the results view. Then, the button of "view all submissions" and "grade", both have a divison by 0 error. I assume its related to the db somehow. But what´s confuising to me is that it recognises the 1 assignment submitted, and then when trying to visualize the results, it does not anymore.
I´ll try to keep debugging and change the host path to a folder within the tmp folder again.
Please register or sign in to replyadded Test label
removed InProgress label
- Owner
Latest idea: use a docker volume mount on the host side.
For that, replace ExecuteTestUtil, line 123ff
dockerUtil.runContainer( image, new Bind(testPathHost.toAbsolutePath().toString(), new Volume("/data/test")), new Bind(srcPathHost.toAbsolutePath().toString(), new Volume("/data/src")), new Bind(resultPathHost.toAbsolutePath().toString(), new Volume("/data/result")) );
by new Volumes based on the directories. Then, we could dispense with the directory envirmonment variable and make the runner mount target(s) constants in the backend.
added InProgress label and removed Test label
created branch
amg-dev-volumes
to address this issue- Owner
Unfinished. Final state pushed to branch backend/amg-dev-volumes.
- You're only seeing other activity in the feed. To add a comment, switch to one of the following options.