Web Interface update available - failed with 'Could not update local repository'

I'm on branch v5.0 for pihole and 'CNAME_inspection_details' for web and FTL. Update yesterday evening went without issues. This morning a new update for web interface was announced by 'pihole -up' but the update failed.

Debug: https://tricorder.pi-hole.net/j24afk7f00

in /var/log/pihole-FTL.log I get

[2020-02-05 12:56:54.792 16291] Blocking status is enabled
[2020-02-05 12:56:57.446 16291] gravityDB_count(SELECT count(DISTINCT domain) FROM vw_regex_blacklist) - SQL error step (5): database is locked
[2020-02-05 12:56:57.448 16291] WARN: Database query failed, assuming there are no regex blacklist entries
[2020-02-05 12:56:57.448 16291] gravityDB_count(4): Gravity database not available
[2020-02-05 12:56:57.448 16291] WARN: Database query failed, assuming there are no regex whitelist entries
[2020-02-05 12:56:57.448 16291] get_client_groupids(): Gravity database not available
[2020-02-05 12:56:57.448 16291] get_client_groupids(): Gravity database not available
[2020-02-05 12:56:57.448 16291] get_client_groupids(): Gravity database not available
[2020-02-05 12:56:57.448 16291] get_client_groupids(): Gravity database not available
[2020-02-05 12:56:57.448 16291] get_client_groupids(): Gravity database not available
[2020-02-05 12:56:57.448 16291] get_client_groupids(): Gravity database not available
[2020-02-05 12:56:57.448 16291] get_client_groupids(): Gravity database not available
[2020-02-05 12:56:57.448 16291] get_client_groupids(): Gravity database not available
[2020-02-05 12:56:57.448 16291] get_client_groupids(): Gravity database not available
[2020-02-05 12:56:57.449 16291] get_client_groupids(): Gravity database not available
[2020-02-05 12:56:57.449 16291] get_client_groupids(): Gravity database not available
[2020-02-05 12:56:57.449 16291] get_client_groupids(): Gravity database not available
[2020-02-05 12:56:57.449 16291] get_client_groupids(): Gravity database not available
[2020-02-05 12:56:57.449 16291] get_client_groupids(): Gravity database not available
[2020-02-05 12:56:57.449 16291] get_client_groupids(): Gravity database not available
[2020-02-05 12:56:57.449 16291] get_client_groupids(): Gravity database not available
[2020-02-05 12:56:57.449 16291] get_client_groupids(): Gravity database not available
[2020-02-05 12:56:57.449 16291] get_client_groupids(): Gravity database not available
[2020-02-05 12:56:57.449 16291] get_client_groupids(): Gravity database not available
[2020-02-05 12:56:57.449 16291] get_client_groupids(): Gravity database not available
[2020-02-05 12:56:57.449 16291] get_client_groupids(): Gravity database not available
[2020-02-05 12:56:57.449 16291] get_client_groupids(): Gravity database not available
[2020-02-05 12:56:57.449 16291] get_client_groupids(): Gravity database not available
[2020-02-05 12:56:57.449 16291] get_client_groupids(): Gravity database not available
[2020-02-05 12:56:57.449 16291] Compiled 0 whitelist and 0 blacklist regex filters in 4.1 msec
[2020-02-05 12:56:57.519 16291] Reloading DNS cache
[2020-02-05 12:56:57.519 16291] Blocking status is enabled
[2020-02-05 12:57:00.177 16291] Compiled 1 whitelist and 20 blacklist regex filters in 12.9 msec
[2020-02-05 12:57:00.921 16291] Reloading DNS cache
[2020-02-05 12:57:00.921 16291] Blocking status is enabled
[2020-02-05 12:57:03.590 16291] Compiled 1 whitelist and 20 blacklist regex filters in 17.4 msec
[2020-02-05 12:57:03.659 16291] Reloading DNS cache
[2020-02-05 12:57:03.660 16291] Blocking status is enabled
[2020-02-05 12:57:06.326 16291] Compiled 1 whitelist and 20 blacklist regex filters in 13.2 msec
[2020-02-05 12:57:19.285 16291] WARN: Regex blacklist evaluation took 25.899 msec
[2020-02-05 12:57:21.309 16291] WARN: Regex blacklist evaluation took 22.061 msec

Does the update fail because the database is locked?

Restartet the whole system and update failed again.

/pihole-FTL.log

[2020-02-05 17:39:07.468 16291] Shutting down...
[2020-02-05 17:39:07.636 16291] Finished final database update
[2020-02-05 17:39:07.650 16291] ########## FTL terminated after 74064480.0 ms! ##########
[2020-02-05 17:39:36.145 1121] Using log file /var/log/pihole-FTL.log
[2020-02-05 17:39:36.145 1121] ########## FTL started! ##########
[2020-02-05 17:39:36.145 1121] FTL branch: new/CNAME_inspection_details
[2020-02-05 17:39:36.145 1121] FTL version: vDev-d648572
[2020-02-05 17:39:36.145 1121] FTL commit: d648572
[2020-02-05 17:39:36.145 1121] FTL date: 2020-02-04 18:31:17 +0100
[2020-02-05 17:39:36.145 1121] FTL user: pihole
[2020-02-05 17:39:36.145 1121] Compiled for aarch64 (compiled on CI) using aarch64-linux-gnu-gcc (Debian 6.3.0-18) 6.3.0 20170516
[2020-02-05 17:39:36.145 1121] Starting config file parsing (/etc/pihole/pihole-FTL.conf)
[2020-02-05 17:39:36.145 1121]    SOCKET_LISTENING: only local
[2020-02-05 17:39:36.145 1121]    AAAA_QUERY_ANALYSIS: Show AAAA queries
[2020-02-05 17:39:36.146 1121]    MAXDBDAYS: max age for stored queries is 365 days
[2020-02-05 17:39:36.146 1121]    RESOLVE_IPV6: Resolve IPv6 addresses
[2020-02-05 17:39:36.146 1121]    RESOLVE_IPV4: Resolve IPv4 addresses
[2020-02-05 17:39:36.146 1121]    DBINTERVAL: saving to DB file every 3600 seconds
[2020-02-05 17:39:36.146 1121]    DBFILE: Using /etc/pihole/pihole-FTL.db
[2020-02-05 17:39:36.146 1121]    MAXLOGAGE: Importing up to 24.0 hours of log data
[2020-02-05 17:39:36.146 1121]    PRIVACYLEVEL: Set to 0
[2020-02-05 17:39:36.146 1121]    IGNORE_LOCALHOST: Show queries from localhost
[2020-02-05 17:39:36.146 1121]    BLOCKINGMODE: Null IPs for blocked domains
[2020-02-05 17:39:36.146 1121]    ANALYZE_ONLY_A_AND_AAAA: Disabled. Analyzing all queries
[2020-02-05 17:39:36.146 1121]    DBIMPORT: Importing history from database
[2020-02-05 17:39:36.146 1121]    PIDFILE: Using /var/run/pihole-FTL.pid
[2020-02-05 17:39:36.146 1121]    PORTFILE: Using /var/run/pihole-FTL.port
[2020-02-05 17:39:36.146 1121]    SOCKETFILE: Using /var/run/pihole/FTL.sock
[2020-02-05 17:39:36.146 1121]    SETUPVARSFILE: Using /etc/pihole/setupVars.conf
[2020-02-05 17:39:36.146 1121]    MACVENDORDB: Using /etc/pihole/macvendor.db
[2020-02-05 17:39:36.147 1121]    GRAVITYDB: Using /etc/pihole/gravity.db
[2020-02-05 17:39:36.147 1121]    PARSE_ARP_CACHE: Active
[2020-02-05 17:39:36.147 1121]    REGEX_IGNORECASE: Disabled. Regex is case sensitive
[2020-02-05 17:39:36.147 1121]    CNAME_DEEP_INSPECT: Active
[2020-02-05 17:39:36.147 1121] Finished config file parsing
[2020-02-05 17:39:36.184 1121] Database version is 5
[2020-02-05 17:39:36.184 1121] Database successfully initialized
[2020-02-05 17:39:36.194 1121] New forward server: 127.0.0.1 (0/128)
[2020-02-05 17:39:36.204 1121] Resizing "/FTL-strings" from 4096 to 8192
[2020-02-05 17:39:36.228 1121] Resizing "/FTL-strings" from 8192 to 12288
[2020-02-05 17:39:36.237 1121] FTL_db warn: STATUS should be within [0,8] but is 10
[2020-02-05 17:39:36.252 1121] Resizing "/FTL-queries" from 262144 to 524288
[2020-02-05 17:39:36.255 1121] Resizing "/FTL-strings" from 12288 to 16384
[2020-02-05 17:39:36.320 1121] Resizing "/FTL-queries" from 524288 to 786432
[2020-02-05 17:39:36.322 1121] Resizing "/FTL-strings" from 16384 to 20480
[2020-02-05 17:39:36.324 1121] FTL_db warn: STATUS should be within [0,8] but is 10
[2020-02-05 17:39:36.325 1121] FTL_db warn: STATUS should be within [0,8] but is 10
[2020-02-05 17:39:36.325 1121] FTL_db warn: STATUS should be within [0,8] but is 10
[2020-02-05 17:39:36.325 1121] FTL_db warn: STATUS should be within [0,8] but is 10
[2020-02-05 17:39:36.326 1121] FTL_db warn: STATUS should be within [0,8] but is 10
[2020-02-05 17:39:36.326 1121] FTL_db warn: STATUS should be within [0,8] but is 10
[2020-02-05 17:39:36.326 1121] FTL_db warn: STATUS should be within [0,8] but is 10
[2020-02-05 17:39:36.326 1121] FTL_db warn: STATUS should be within [0,8] but is 10
[2020-02-05 17:39:36.326 1121] FTL_db warn: STATUS should be within [0,8] but is 10
[2020-02-05 17:39:36.326 1121] FTL_db warn: STATUS should be within [0,8] but is 10
[2020-02-05 17:39:36.327 1121] FTL_db warn: STATUS should be within [0,8] but is 10
[2020-02-05 17:39:36.327 1121] FTL_db warn: STATUS should be within [0,8] but is 10
[2020-02-05 17:39:36.327 1121] FTL_db warn: STATUS should be within [0,8] but is 10
[2020-02-05 17:39:36.327 1121] FTL_db warn: STATUS should be within [0,8] but is 10
[2020-02-05 17:39:36.327 1121] FTL_db warn: STATUS should be within [0,8] but is 10
[2020-02-05 17:39:36.327 1121] FTL_db warn: STATUS should be within [0,8] but is 10
[2020-02-05 17:39:36.327 1121] FTL_db warn: STATUS should be within [0,8] but is 10
[2020-02-05 17:39:36.327 1121] FTL_db warn: STATUS should be within [0,8] but is 10
[2020-02-05 17:39:36.392 1121] Resizing "/FTL-strings" from 20480 to 24576
[2020-02-05 17:39:36.432 1121] Resizing "/FTL-queries" from 786432 to 1048576
[2020-02-05 17:39:36.446 1121] Imported 12929 queries from the long-term database
[2020-02-05 17:39:36.447 1121]  -> Total DNS queries: 12929
[2020-02-05 17:39:36.448 1121]  -> Cached DNS queries: 6814
[2020-02-05 17:39:36.448 1121]  -> Forwarded DNS queries: 3165
[2020-02-05 17:39:36.448 1121]  -> Exactly blocked DNS queries: 2947
[2020-02-05 17:39:36.448 1121]  -> Unknown DNS queries: 3
[2020-02-05 17:39:36.448 1121]  -> Unique domains: 1048
[2020-02-05 17:39:36.448 1121]  -> Unique clients: 12
[2020-02-05 17:39:36.448 1121]  -> Known forward destinations: 1
[2020-02-05 17:39:36.448 1121] Successfully accessed setupVars.conf
[2020-02-05 17:39:36.571 1212] PID of FTL process: 1212
[2020-02-05 17:39:36.571 1212] Listening on port 4711 for incoming IPv4 telnet connections
[2020-02-05 17:39:36.573 1212] Listening on port 4711 for incoming IPv6 telnet connections
[2020-02-05 17:39:36.574 1212] Listening on Unix socket
[2020-02-05 17:39:36.577 1212] Reloading DNS cache
[2020-02-05 17:39:36.577 1212] Blocking status is enabled
[2020-02-05 17:39:39.579 1212] Compiled 1 whitelist and 20 blacklist regex filters in 15.3 msec

I've checked out to the main v5 branch (from CNAME_inspection_details) and update went without issues. No idea what was going wrong...

pihole checkout core release/v5.0
pihole checkout web release/v5.0

Thanks, I wasnt able to pihole -up it was complanhining about FTL not being installed or running. I found this before rebooting and ruining everything. Checked out both again. and all is well.