Bug 2238590 - RFE: Upgrade databases on update
Summary: RFE: Upgrade databases on update
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: buildbot
Version: rawhide
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Gwyn Ciesla
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-09-12 15:49 UTC by Orion Poplawski
Modified: 2023-11-03 18:25 UTC (History)
8 users (show)

Fixed In Version: buildbot-3.9.2-3.fc37 buildbot-3.9.2-3.fc38 buildbot-3.9.2-3.fc39
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-10-08 02:09:12 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Orion Poplawski 2023-09-12 15:49:10 UTC
After updating to buildbot 3.9.0, the buildbot master service would not start:

2023-09-12 05:12:05-0700 [-] Starting BuildMaster -- buildbot.version: 3.9.0
2023-09-12 05:12:05-0700 [-] Loading configuration from '/var/lib/buildbot/master/gpsii/master.cfg'
2023-09-12 05:12:05-0700 [-] Setting up database with URL 'sqlite:/state.sqlite'
2023-09-12 05:12:05-0700 [-] setting database journal mode to 'wal'
2023-09-12 05:12:05-0700 [-] The Buildmaster database needs to be upgraded before this version of
2023-09-12 05:12:05-0700 [-] buildbot can run.  Use the following command-line
2023-09-12 05:12:05-0700 [-] 
2023-09-12 05:12:05-0700 [-]     buildbot upgrade-master /var/lib/buildbot/master/gpsii
2023-09-12 05:12:05-0700 [-] 
2023-09-12 05:12:05-0700 [-] to upgrade the database, and try starting the buildmaster again.  You may
2023-09-12 05:12:05-0700 [-] want to make a backup of your buildmaster before doing so.
2023-09-12 05:12:05-0700 [-] BuildMaster startup failed

Perhaps a scheme for automatically updating the configured services could be created?

Reproducible: Always

Comment 1 Gwyn Ciesla 2023-09-13 19:45:33 UTC
What about something like this?

We compile a list of master enabled with the following:

find /etc/systemd/system/multi-user.target.wants/ -type l -name 'buildbot-master*service' | cut -d '@' -f 2 | cut -d '.' -f 1

We can then loop over that to stop the master, upgrade, and start it again.

We could do something similar with workers.

Comment 2 Orion Poplawski 2023-09-14 03:27:51 UTC
Can we use systemctl commands?

systemctl list-units 'buildbot-master@*.service' --all --plain --no-legend

buildbot-master loaded active running Buildbot master instance

I don't think anything needs to be done for the workers, but I may be wrong there.

Otherwise, seems like a good plan.

Comment 3 Gwyn Ciesla 2023-09-28 21:25:21 UTC
Good idea.

The workers need a restart, but no DB upgrade.

Comment 4 Fedora Update System 2023-09-29 14:56:41 UTC
FEDORA-2023-36f36e6ed3 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-36f36e6ed3

Comment 5 Fedora Update System 2023-09-29 14:56:43 UTC
FEDORA-2023-5b38626e43 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2023-5b38626e43

Comment 6 Fedora Update System 2023-09-30 03:31:18 UTC
FEDORA-2023-830604bbe5 has been pushed to the Fedora 39 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-830604bbe5`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-830604bbe5

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 7 Fedora Update System 2023-09-30 04:46:08 UTC
FEDORA-2023-36f36e6ed3 has been pushed to the Fedora 38 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-36f36e6ed3`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-36f36e6ed3

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 8 Fedora Update System 2023-09-30 05:54:29 UTC
FEDORA-2023-5b38626e43 has been pushed to the Fedora 37 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-5b38626e43`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-5b38626e43

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 9 Fedora Update System 2023-10-08 02:09:12 UTC
FEDORA-2023-5b38626e43 has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 10 Fedora Update System 2023-10-08 02:47:34 UTC
FEDORA-2023-36f36e6ed3 has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 11 Fedora Update System 2023-11-03 18:25:20 UTC
FEDORA-2023-830604bbe5 has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.