A question about upgrading to 4.7.0; I get the fol...
# fleet
t
A question about upgrading to 4.7.0; I get the following when I did docker-compose run fleetdm fleet prepare db Missing migrations: tables=[20211116184030 20211202092042 20211202181033 20211207161856], data=[]. 2021/12/16 092334 FAIL 20211202092042_RemovePolicyHistory.go (create policy membership table: Error 1005: Can't create table
fleet
.
policy_membership
(errno: 121 "Duplicate key on write or update")), quitting migration.
l
Hi Tor! I don't think it's related to file carving, let me take a look.
Q: Did you upgrade from v4.6.2?
When you ran
prepare db
did you get a prompt after the
Missing migrations: tables=...
text?
Press Enter to continue, or Control-c to exit.
If so the WARNING message with the missing migrations is expected, now checking what might have caused the
FAIL
.
Also, what MySQL database are you using and which version?
t
Hoi Lucas! Yes, upgrading from 4.6.2; and yep, I got a prompt (and didn't press ctrl c :)).
The version is mysqld 10.3.31-MariaDB-0+deb10u1
l
OK, thanks for the info, I'll create an issue right away. It could be an incompatibility issue with MariaDB.
t
at this point i have no idea if i can attempt to start fleet or not (i left it on the floor in case there were things you wanted me to manually do in the db). is it ok to attempt a start? or should i just hold fast.
l
No, a start will cause issue due to the failed migrations.
👍 1
The team will try to reproduce and will respond on the issue as soon as we can.
t
Cool beans. Thanks!
w
Im seeing this same issue, running with docker, im using Mariadb:10.6, the official container, upgrading from the last latest version to the most current one
👍 1
t
Can confirm that doing MariaDB [fleet]> ALTER TABLE policy_membership_history DROP FOREIGN KEY fk_policy_membership_policy_id, DROP FOREIGN KEY fk_policy_membership_host_id; then $ docker-compose run fleetdm fleet prepare db results in "Migrations completed." (but does report # Missing migrations: tables=[20211202092042 20211202181033 20211207161856], data=[]. ). fleetdm appears to start normally after this.