Skip to content

Mariadb enable auto upgrade#1

Open
imonshome77 wants to merge 5 commits intoletsencrypt-certbot-dns-multifrom
mariadb-enable-auto-upgrade
Open

Mariadb enable auto upgrade#1
imonshome77 wants to merge 5 commits intoletsencrypt-certbot-dns-multifrom
mariadb-enable-auto-upgrade

Conversation

@imonshome77
Copy link
Owner

No description provided.

agners and others added 5 commits April 16, 2024 09:13
After a major update, the mariadb-upgrade tool should be run (see
https://mariadb.com/kb/en/mariadb-upgrade/). However, we don't have
a specific post-upgrade script we can run.

Luckily, MariaDB has a feature to run the upgrade on it's own when
needed. Enable the feature using the MARIADB_AUTO_UPGRADE environment
variable.
…tant#4412)

In some cases, OTBR creates temporary settings files [1]. If the RCP becomes
unavailable (seems to happen particularly for network connected adapters), file
with a newer timestamp containing ephemeral data is created and incorrectly
migrated as configuration for the reconnected adapter later:

```
Settings file for adapter 187a3efffe0182dd already exists at /data/thread/0_187a3efffe0182dd.data but appears to be old, archiving
Wrote new settings file to /data/thread/0_187a3efffe0182dd.data
```

This is how the thread folder looks like after the migration:

```
-rw------- 1 kpt kpt  32 Feb 11 09:57 0_0-tmp.data
-rw------- 1 kpt kpt  73 Feb 11 09:58 0_187a3efffe0182dd.data
-rw------- 1 kpt kpt 278 Feb 11 09:47 0_187a3efffe0182dd.data.backup-20260211095840
```

The new data file is clearly migrated from the 0_0-tmp.data, creating a new
configuration out of ephemeral data which is invalid and prevents correct
initialization of the OTBR app.

This change adds a check that the file to be migrated is matching a valid name
created by [2], effectively ignoring the temporary files.

[1] https://github.com/openthread/openthread/blob/thread-reference-20250612/src/posix/platform/tmp_storage.cpp
[2] https://github.com/openthread/openthread/blob/thread-reference-20250612/src/posix/platform/settings.cpp#L93
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants