Will k3s and rke2 w/sqlite honor SQLITE_TMPDIR env...
# general
r
Will k3s and rke2 w/sqlite honor SQLITE_TMPDIR env var?
c
kine doesn’t use temp tables for anything so I doubt it… why do you ask?
r
Even for a compact? We're (for reasons) stuck on a older version of RKE2/kine where compacts aren't happening properly (as I understand). As a workaround we're running
sqlite3 VACUUM
out of band and it appears to use
/var/tmp
as TMPDIR is not set in our environment. See https://www.sqlite.org/tempfiles.html
c
but we don’t explicitly set any of the temp dir pragmas or globals either so if there is something that would cause it to create a temp file it would just do as it does upstream
if you’re using the sqlite cli to vacuum the db then it doesn’t matter what you have the env var set to for k3s/rke2, it only matters what you have it set to for the sqlite cli tool
r
If kine isn't using any temp dir for anything then we're good to go I believe.
c
my understanding was that the vacuum uses a temporary database file that is in the same directory as the active database file so that the rename is atomic, but maybe thats not always the case
but you certainly shouldn’t be vacuuming the sqlite db while it is in use by k3s/rke2 anyways, so it shouldn’t matter