Skip to content

Introduce a variant without the VOLUME declaration #416

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

Closed
wants to merge 1 commit into from
Closed

Introduce a variant without the VOLUME declaration #416

wants to merge 1 commit into from

Conversation

HoloRin
Copy link
Contributor

@HoloRin HoloRin commented Jun 10, 2020

While ideal in most cases, the inclusion of the VOLUME prevents further modification of the RABBITMQ_DATA_DIR by derivative Dockerfiles. This is an attempt at the lightest weight option for maintaining the behavior of the existing images, but providing flexibility when necessary.

While ideal in most cases, the inclusion of the VOLUME prevents further
modification of the RABBITMQ_DATA_DIR by derivative Dockerfiles. This is
an attempt at the lightest weight option for maintaining the behavior
of the existing images, but providing flexibility when necessary.
@HoloRin
Copy link
Contributor Author

HoloRin commented Jun 10, 2020

The Rabbit team would like change the default location of the enabled_plugins file to the $RABBITMQ_DATA_DIR. The motivating factor is that the current location in /etc/rabbitmq/ is often mounted read only in k8s contexts, leading to other difficulties. This would however break the current management images (See rabbitmq/rabbitmq-server#2234 for the extended discussion). Moving the VOLUME declaration to the end of the Dockerfiles via this change would allow us proceed.

@HoloRin
Copy link
Contributor Author

HoloRin commented Jun 10, 2020

#368 is another example of read only config files causing difficulties.

@tianon
Copy link
Member

tianon commented Jun 19, 2020

Reading through rabbitmq/rabbitmq-server#2234, I'm not exactly convinced this is the correct solution -- there are a lot of good points in that thread, but what strikes me the most is that installing plugins requires not only adding the plugin to enabled_plugins, but also installing the plugin itself, which wouldn't be persistent in most containers (and doesn't get installed to /var/lib/rabbitmq as far as I know).

So I guess I'm not sure I understand completely the use case here -- the only use case I can see which would be helped by these changes is that of an image that's FROM rabbitmq, pre-installs a bunch of plugins, but doesn't enable them, and then expecting users to enable them at runtime? I feel like I'm missing something important.

There are a lot of great points in that thread about configuration vs state that I fully agree with -- state belongs in a VOLUME, configuration does not, but I don't see how shifting the volume choice onto users helps them. 😕

@HoloRin
Copy link
Contributor Author

HoloRin commented Jul 3, 2020

@tianon thanks for your comments.

I didn't see this as shifting a volume choice onto users per-sey, which is why all the existing variants retain their VOLUME. If it were possible to have images that were abstract in the sense of the Java keyword, then I would have made the volumeless image one of them.

I think I see the change in this way: We have come to view the enabled_plugins as less so config, and more so seed data. My impression is that seed data is a little tricky in docker (#410 (comment)), but we are balancing that against the difficulty for users that arises when they (not unreasonably) provide enabled_plugins in a read-only fashion. There are some plugins which are helpful to enable at runtime to inspect the system, but not all the time.

Having just made the comparison of enabled_plugins to seed data, it does occur to me that it could probably be built just in time by the docker-entrypoint.sh. If that's considered a substantially superior approach, I could close this an open a new PR to that effect. Another option would be to give the -volumeless variants a special entrypoint that would instruct users not to use it directly, where it would be "runtime abstract".

@HoloRin HoloRin closed this Aug 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants