Is it possible to see from a support bundle what versions were deployed and when?
A support dump should contain a copy of the KOTS Application Manager database, and a Postgres pod can be reconstructed from the database dump. This would be a great idea for an analyzer that will generate a nicely formatted report, but in the meantime you can create a Postgres pod and load the database dump into it and examine the data it contains:
cd ./<support-bundle-folder>/kots/admin_console/<namespace>/kotsadm-postgres-0
# `ls` should list a file named kotsadm-postgres-db-stdout.txt
# start a postgres pod
kubectl run postgres --image postgres --env="POSTGRES_PASSWORD=password"
# copy the file into the pod
kubectl cp kotsadm-postgres-db-stdout.txt postgres:/tmp
# exec into the pod and load file into the database
kubectl exec -it postgres bash
# inside the pod, start a postgres client
psql -U postgres -f /tmp/kotsadm-postgres-db-stdout.txt
# examine the database
psql -U postgres
# postgres=#
select app_id, sequence, update_cursor, channel_name, upstream_released_at, created_at, version_label from app_version;
app_id | sequence | update_cursor | channel_name | upstream_released_at | created_at | version_label
-----------------------------+----------+---------------+---------------+----------------------+----------------------------+---------------
abcdefg1234567890 | 0 | 1 | Stable-10.5.2 | 2022-04-05 12:51:29 | 2022-06-24 22:40:21.710572 | 10.5.2_303
abcdefg1234567890 | 1 | 1 | Stable-10.5.2 | | 2022-07-25 17:59:02.251215 | 10.5.2_303
abcdefg1234567890 | 2 | 33 | Stable | 2022-06-30 19:32:04 | 2022-07-25 17:59:14.357903 | 10.8.1_381
(3 rows)
1 Like
@adamancini I’m guessing this is no longer possible any more since the rqlite switch?
If you’re using a build with rqlite, we can do the same with a sqlite
client (I’m using sqlite3
installed on my workstation because I couldn’t find an official sqlite image):
cd ./<support-bundle-folder>/kots/admin_console/<namespace>/kotsadm-rqlite-0
sqlite3
and in the interactive console in sqlite
:
sqlite> .read kotsadm-rqlite-db-stdout.txt
sqlite> .headers ON
sqlite> select app_id, sequence, update_cursor, channel_name, upstream_released_at, created_at, version_label from app_version;
app_id|sequence|update_cursor|channel_name|upstream_released_at|created_at|version_label
2G071ai0BPUtXYerTRmyFT1Rqjs|0|1|Unstable||1665519449|Unstable-602b66b-dirty
2G071ai0BPUtXYerTRmyFT1Rqjs|1|2|Unstable|1665636684|1665636924|Unstable-602b66b-dirty
2G071ai0BPUtXYerTRmyFT1Rqjs|2|3|Unstable|1670611262|1670616607|Unstable-602b66b-dirty