Open potchin opened 5 months ago
Not ideal but I managed to get around it by running the migration in a separate container and then copying all the new files back to the pvc inside k8s. There are some hidden files which the app uses to determine the version of the config.
Can you post those files here? and the diff
there was no diff between the config files, that's what was confusing me. Theres a .version
file which needs to contain 0.14
for the migration to be skipped. Not sure what the other files are needed for but I copied them over from another container and it works..
# ls -lrthA
total 1.6M
drwxr-xr-x. 2 root root 4.0K May 25 20:33 model_cache
-rw-r--r--. 1 root root 0 May 25 20:37 backup_config.yaml
-rw-r--r--. 1 root root 8.0K May 25 20:39 backup.db
-rw-r--r--. 1 root root 140K May 25 20:39 frigate.db
-rw-r--r--. 1 root root 17 May 25 20:40 .vacuum
-rw-r--r--. 1 root root 16 May 25 20:40 .timeline
-rw-r--r--. 1 root root 128 May 25 20:40 .jwt_secret
-rw-r--r--. 1 root root 17 May 25 20:40 .exports
-rw-r--r--. 1 root root 4 May 25 20:40 .version
-rwxr-xr-x. 1 root root 0 May 25 20:40 config.yml
-rw-r--r--. 1 root root 32K May 25 20:57 frigate.db-shm
-rw-r--r--. 1 root root 1.4M May 25 20:57 frigate.db-wal
# cat .version
0.14
yeah i can see i dont have version file in mine and it can write all files in /config beside config.yml :-D
so basicly could be solved by adding to values. versionsfile: enabled: true version: 0.14
that makes that file?
ah reading hes changes, i can see he have changes to mask coordinates etc. so i will be hit by it
As a temporary solution I did the following with the current 7.5.1 Helm chart:
@blakeblackshear is there any possibility to print the content of the new config.yml to console when file is read only and frigate fail with error ? This will make the change smooth even with the automatic migration process of keys in config.yaml for 0.14.0.
I took a copy of my config and just ran it up in docker and it fails but it rewrites it, all good;
docker run -it -v $(pwd)/frigate.yaml:/config/config.yaml ghcr.io/blakeblackshear/frigate:0.14.1
and then to see if it did anything;
$ diff frigate.yaml original_config.yaml
4c4
< enabled: true
---
> enabled: True
37c37
< enabled: true
---
> enabled: True
39c39
< timestamp: true
---
> timestamp: True
41c41
< bounding_box: true
---
> bounding_box: True
66c66
< enabled: true
---
> enabled: True
68c68
< timestamp: false
---
> timestamp: False
70,71c70,71
< bounding_box: false
< crop: true
---
> bounding_box: False
> crop: True
128,129c128,129
< user: '{FRIGATE_MQTT_USER}'
< password: '{FRIGATE_MQTT_PASSWORD}'
---
> user: "{FRIGATE_MQTT_USER}"
> password: "{FRIGATE_MQTT_PASSWORD}"
140c140
< enabled: true
---
> enabled: True
190c190
< enabled: true
---
> enabled: True
192c192
< clean_copy: true
---
> clean_copy: True
194c194
< timestamp: false
---
> timestamp: False
196c196
< bounding_box: false
---
> bounding_box: False
198c198
< crop: false
---
> crop: False
210d209
< version: 0.14
interestingly, this new config file still fails with errors, so it isn't comprehensive;
2024-09-28 05:13:23.731341595 *************************************************************
2024-09-28 05:13:23.731344637 *************************************************************
2024-09-28 05:13:23.731346220 *** Your config file is not valid! ***
2024-09-28 05:13:23.731347637 *** Please check the docs at ***
2024-09-28 05:13:23.731349012 *** https://docs.frigate.video/configuration/index ***
2024-09-28 05:13:23.731350220 *************************************************************
2024-09-28 05:13:23.731351428 *************************************************************
2024-09-28 05:13:23.731352678 *** Config Validation Errors ***
2024-09-28 05:13:23.731354012 *************************************************************
2024-09-28 05:13:23.731356178 record.events.required_zones: Extra inputs are not permitted
2024-09-28 05:13:23.731357595 *************************************************************
2024-09-28 05:13:23.731378845 *** End Config Validation Errors ***
2024-09-28 05:13:23.731379553 *************************************************************
record.events.required_zones was just a '[]' so I just hashed out the key and it was fine after that.
It looks as though having the frigate
config.yml
stored inside a configmap causes a problem for frigate 0.14.0-beta1 since it tries to make changes to the config file. This fails since its readonly..I've tried running frigate separately to generate an updated config file (which is no different)