quickstart icon indicating copy to clipboard operation
quickstart copied to clipboard

persistent mode persists both data and code

Open tamirms opened this issue 3 months ago • 2 comments

In the instructions for persistent mode, we tell users to mount a volume to /opt/stellar in the quickstart container.

This is problematic because that directory contains data, configuration, and code. Different versions of quickstart will have updated configuration and/or code. But, because the entire /opt/stellar directory is persisted, any changes to code and/or configuration will not be applied when running a new version of the quickstart container with the old mounted volume.

This exact situation occurred recently in https://stellarfoundation.slack.com/archives/C098N5WJCL8/p1757101644045819?thread_ts=1757078276.261149&cid=C098N5WJCL8 , where someone was running a quickstart version before soroban-rpc got renamed to stellar-rpc. The script contained within the /opt/stellar directory expected a soroban-rpc binary to be present. But the new quickstart image uses the stellar-rpc binary and no soroban-rpc binary exists.

tamirms avatar Sep 05 '25 20:09 tamirms

The readme recommends against using persistent mode for any other than short lived test and development use cases, and not for long running production workloads where multiple image versions are required. The readme calls out this limitation that there's no guarantee one version of the image will work with the files of a future version. It's quite challenging and restrictive otherwise.

Maybe we need to store in the volume the version of quickstart (it knows its own version) and compare on startup to make sure it doesn't change. When it does change we can output warning messages to the logs. This would help operators understand what's going on. Wdyt?

In the linked case where this became a problem it's a long running production workload which isn't the use case the image is maintained for. If there's a need for single image multi-service production deployments, that might be something we should explore independent of quickstart.

leighmcculloch avatar Sep 06 '25 03:09 leighmcculloch

ok, I definitely agree that we should not recommend running production workloads using quickstart. I'm fine with closing this issue or implementing your suggestion of logging a warning message when a persistent volume is used by multiple versions of quickstart

tamirms avatar Sep 06 '25 17:09 tamirms