canonical / charmed-mysql-snap

SNAP for Charmed MySQL charm.
https://snapcraft.io/charmed-mysql
Apache License 2.0
0 stars 4 forks source link

Use symlinks instead of bind mounts for mysqlrouter directories #33

Closed carlcsaposs-canonical closed 1 year ago

carlcsaposs-canonical commented 1 year ago

Issue

Directories that use bind mounts cannot be deleted & re-created (they will not be remounted) The mysql-router vm charm deletes directories to clean up configuration & state when the mysql<->mysqlrouter relation is broken

Solution

Use symlinks instead of bind mounts

Context

https://forum.snapcraft.io/t/snap-layouts/7207/33

taurus-forever commented 1 year ago

Q: will it affect OCI somehow?

carlcsaposs-canonical commented 1 year ago

Q: will it affect OCI somehow?

It shouldn't—the OCI directories like /etc/mysqlrouter are at the actual path /etc/mysqlrouter, not nested inside a folder as it is in the snap