Skip to content
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

Remove cli_home volume whenever cli image version is updated #787

Open
lmakarov opened this issue Sep 12, 2018 · 3 comments · May be fixed by #1297
Open

Remove cli_home volume whenever cli image version is updated #787

lmakarov opened this issue Sep 12, 2018 · 3 comments · May be fixed by #1297
Assignees
Labels
🏷enhancement size/large Effort in T-Shirt scale

Comments

@lmakarov
Copy link
Member

cli_home is an anonymous volume mounted in the cli service:

- cli_home:/home/docker # Write-heavy directories should be in volumes. See https://github.com/docksal/docksal/issues/325

It was introduced to optimize write heavy operations in /home/docker inside cli. See #325

When a docker compose service configuration (including the image) is updated, volumes are not dropped and are remounted as-is. This is usually desirable, e.g., when updating the db service settings, the database(s) date volume is preserved.

In the case of cli, however, we do want the cli_home volume dropped. That is because this volume contains a bunch of tools and configs that tend to change from one docksal/cli version to another. Without dropping it, the update won't be complete and will miss the changes in /home/docker.

At the same time (and ideally) we don't won't to drop the volume on EVERY configuration update to the cli service. Only image version changes require cli_home to be dropped, which makes this somewhat complicated, since we currently do not have a reliable way to track stack configuration changes.

@lmakarov
Copy link
Member Author

We already instruct users in docs to do fin project reset cli when changing PHP versions:
https://docs.docksal.io/en/master/advanced/stack-settings/#php-versions

The issues is that this stopped working after /home/docker became a named volume (<project>_cli_home). docker-compose rm -vf <container> will only drop anonymous volume and won't touch named once.

Looks like, we'll need a special handling for fin project reset cli and manually drop the <project>_cli_home volume.

@achekulaev achekulaev added this to To do in Docksal 1.11.0 via automation Sep 20, 2018
@achekulaev achekulaev added this to To do in Docksal 1.12.0 via automation Sep 20, 2018
@lmakarov lmakarov moved this from To do to Done in Docksal 1.11.0 Oct 16, 2018
@lmakarov lmakarov mentioned this issue Nov 7, 2018
@achekulaev achekulaev reopened this Nov 16, 2018
@achekulaev
Copy link
Member

Not sure what activities left here but it is in the ToDo column for 1.12.

Docksal 1.12.0 automation moved this from To do to Done Nov 16, 2018
@lmakarov
Copy link
Member Author

This is still a valid issue when the docksal/cli version is updated in the default stacks (like with the 1.11 release, actually). When this happens, <project>_cli_home should be dropped, otherwise updated in /home/docker from the new docksal/cli version won't propagate.

@lmakarov lmakarov reopened this Nov 16, 2018
Docksal 1.12.0 automation moved this from Done to To do Nov 16, 2018
@lmakarov lmakarov added the size/large Effort in T-Shirt scale label Jan 25, 2019
@lmakarov lmakarov removed this from To do in Docksal 1.12.0 Jan 25, 2019
@lmakarov lmakarov added this to To do in Docksal 1.13.0 via automation Jan 25, 2019
@lmakarov lmakarov removed this from To do in Docksal 1.13.0 Oct 8, 2019
@lmakarov lmakarov added this to To do in 1.14.0 via automation Oct 8, 2019
@lmakarov lmakarov removed this from To do in 1.14.0 Jul 2, 2020
@lmakarov lmakarov added this to To do in 1.15.0 via automation Jul 2, 2020
@lmakarov lmakarov removed this from To do in 1.15.0 Nov 20, 2020
@lmakarov lmakarov added this to To do in 1.16.0 via automation Nov 20, 2020
@lmakarov lmakarov removed this from To do in 1.16.0 Jul 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷enhancement size/large Effort in T-Shirt scale
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

3 participants