Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Playbooks missing in MM6.0 #18723

Closed
nt7 opened this issue Oct 16, 2021 · 5 comments · Fixed by mattermost/mattermost-plugin-playbooks#822
Closed

Playbooks missing in MM6.0 #18723

nt7 opened this issue Oct 16, 2021 · 5 comments · Fixed by mattermost/mattermost-plugin-playbooks#822

Comments

@nt7
Copy link

nt7 commented Oct 16, 2021

A second report about this here: https://forum.mattermost.org/t/playbooks-plugin-not-visible-after-upgrade-to-6-0/12319.

Originally posted by @amyblais in #18681 (comment)

Hi, this is in reference to the above post, I opened a new thread to keep these 2 issues separated, even though they seem to be related.

I initially posted on the MM forum, but can't uplaod log files there.

I'm using mattermost release-6.0 (docker container from Thursday, 14.10) with MariaDB as the db (https://hub.docker.com/layers/linuxserver/mariadb/110.4.11mariabionic-ls46/images/sha256-18dbf539728227e960f94f1d3ebbb4d9f978d8aedcbd9fb309e6494ccb888d02?context=explore)

Here's my log file
mm.log

And here's the list of my current plugins:
grafik

@lieut-data
Copy link
Member

Hi @nt7! Thanks for the details.

I was able to track this down to an issue between MySQL and MariaDB. Officially speaking, we don't support or test against MariaDB, but I was able to isolate the few required changes to make Playbooks compatible with MariaDB, and I've setup an automated testing regime so we can at least know about these issue in the future.

I expect the fix will land in v6.1 and /should/ just work seamlessly, but I'd love a chance to test my changes with you directly once I have a passing build -- interested in beta testing?

@nt7
Copy link
Author

nt7 commented Oct 19, 2021

Hi @lieut-data,

Thanks a lot for your effort, I very much appreciate your hard work!
Yes, now that you mentioned it, it brings back a distant memory about not supporting MariaDB.
I think back when we started using MM, it was the only DB option from our supplier and it seemed to have worked, which is why we went for it.
If there's a docker build available, I could test it.
(However, we do depend on MM being available, do you foresee any problems?)

@lieut-data
Copy link
Member

Sounds good, @nt7! My PR closed this ticket for now, but I'll follow up with a Docker image for you to try once we cut a release with this PR.

@wget
Copy link
Collaborator

wget commented Nov 14, 2021

For those witnessing this issue and finding this error via a search engine:

{"timestamp":"2021-11-14 15:16:45.309 +01:00","level":"error","msg":"Unable to activate plugin","caller":"app/plugin.go:146","plugin_id":"playbooks","error":"failed to run migrations: failed to complete migrations: error executing migration from version 0.29.0 to version 0.30.0: unable to add a primary key: Error 1280: Incorrect index name 'posts_unique'"}

If you do not want to wait for Mattermost 6.1 or be urged to migrate to a more recent version because you're following the ESR branch for instance, just remove the faulty index with:

MariaDB [(none)]> use mattermostdb;
MariaDB [mattermostdb]> drop index posts_unique on IR_StatusPosts;

Go in the System Console > Plugin Management, disable the plugin Playbooks and reenable it. You should be all right after that.


To ensure the faulty index has been properly removed, you can ensure this by using the show index MariaDB SQL command.

BEFORE:

MariaDB [mattermostdb]> show index from IR_StatusPosts;
+----------------+------------+---------------------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| Table          | Non_unique | Key_name                  | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment |
+----------------+------------+---------------------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| IR_StatusPosts |          0 | posts_unique              |            1 | IncidentID  | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
| IR_StatusPosts |          0 | posts_unique              |            2 | PostID      | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
| IR_StatusPosts |          1 | IR_StatusPosts_IncidentID |            1 | IncidentID  | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
| IR_StatusPosts |          1 | IR_StatusPosts_PostID     |            1 | PostID      | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
+----------------+------------+---------------------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
4 rows in set (0.001 sec)

AFTER:

MariaDB [mattermostdb]> drop index IR_ViewedChannel_ChannelID_UserID on IR_ViewedChannel;
Query OK, 0 rows affected (0.056 sec)
Records: 0  Duplicates: 0  Warnings: 0

MariaDB [mattermostdb]> show index from IR_StatusPosts;
+----------------+------------+---------------------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| Table          | Non_unique | Key_name                  | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment |
+----------------+------------+---------------------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| IR_StatusPosts |          1 | IR_StatusPosts_IncidentID |            1 | IncidentID  | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
| IR_StatusPosts |          1 | IR_StatusPosts_PostID     |            1 | PostID      | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
+----------------+------------+---------------------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
2 rows in set (0.001 sec)

@lieut-data
Copy link
Member

Thank you, @wget! To anyone else arriving here, I'd love to more about your reliance on MariaDB so we can surface usage to the right channels. We still don't officially support MariaDB, and it seems the gap with MySQL is only growing wider. Getting ahead of these issues would be great :)

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 a pull request may close this issue.

3 participants