New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
made vgrid_files_readonly ro volume #43
Conversation
docker-compose_production.yml
Outdated
@@ -260,6 +272,13 @@ volumes: | |||
device: ${DOCKER_MIGRID_ROOT}/state | |||
o: bind | |||
|
|||
state-ro: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would choose another name cause this is not the state directory but the vgrid_files dir.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@benibr i don't have any good ideas to what else it should be named. All the dirs are in the migrid_root directory, and this also plays with the state dir.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest vgrid_files_readonly
as thats what it is now. state-ro is misleading.
docker-compose_production.yml
Outdated
driver_opts: | ||
type: none | ||
device: ${DOCKER_MIGRID_ROOT}/state/vgrid_files_writable | ||
o: bind |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's better if we add the read only option here so that the volume it self is read only.
Otherwise a container could mount it writeable due to a config error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with the new change its reported as:
{
"Type": "volume",
"Name": "docker-migrid_state-ro",
"Source": "/var/lib/docker/volumes/docker-migrid_state-ro/_data",
"Destination": "/home/mig/state/vgrid_files_readonly",
"Driver": "local",
"Mode": "z",
"RW": false,
"Propagation": ""
},
The new volume should also be used in the other environments |
looks good to me! The |
Thanks for the contribution. |
this is the docker-compose.override vi currently use: |
For the record, this PR broke the Test CI as you can see here: https://github.com/ucphhpc/docker-migrid/actions/runs/8345752910/job/22841385858?pr=45#step:6:35 I cannot see though why it was not run for this PR. I open a Issue for that. |
I can confirm that using the
It runs fine using the previous reversion b79a882 of that same compose file. |
The initial crash could be removed by removing the space in the volume mount options and switching to the new |
@jonasbardino can you please add a PR for this so that we can see the diff and have a discussion there? Please do not commit testing configs to the master branch. We have so many unused config files in Migrid and it just makes things confusing. |
@jonasbardino yes, please continue this in a new PR. Its alot easier for us to see the diff and then relate to what you changed. |
You're probably right that it would have been better to either make this as a branch in the first place or to initiate a full revert of this PR with a follow-up retry if needed. Either would introduce breakage or extra work somewhere. Anyway, I've made a PR #55 to do what I intend to do. Namely, replace the current |
The way the vgrid_files_readonly was implemented does not honor the way we use docker-compose.override in ansibl-docker-migrid, so now i have changed it so i can override the mountpoint correctly.