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
cannot create team from cli #9421
Comments
@fbartels Thank you for letting us know! Some breaking changes were introduced to the plugin framework in v5.2 - more information can be found here: https://developers.mattermost.com/extend/plugins/migration/. If the above documentation doesn't seem to apply in your case, just let me know and I'll ping a dev to look at this. |
Hi @amyblais, yes I am aware of the Plugin changes in 5.2. The above example is on a system where all plugins have been deleted (using the admin Web console), but even then I need to completely disable the Plugin functionality of Mattermost to create teams from the cli. |
@mkraft Can you help test the bug report above ^ (#9421 (comment)) - (reason for ping: you're Dev on rotation this week and I need dev's help to test CLI issues). |
@fbartels I'm not reproducing an error running this command on the same commit: mattermost team create --name test2 --display_name test2 My "PluginSettings": {
"Enable": true,
"EnableUploads": false,
"Directory": "./plugins",
"ClientDirectory": "./client/plugins",
"Plugins": {},
"PluginStates": {}
}, Are you able to share yours please? |
Hi @mkraft , thanks for your response. my Plugin settings look like the following:
The settings in there are from our own mattermost plugin. in my test I have deleted the plugin through the "System Console" and once remove the plugin itself is also gone from the plugin directory. I had a look with one of our go developers and he was able to trace the issue down to a timing issue where (since mattermost startup and shutdown happen quite fast with the cli utility) teams and channel try to access a variable that was already set to nil on shutdown. We are making a quick test if that is really the case and if it is, he will give a more concrete issue description. |
@mkraft @amyblais This is a timing issue when running Mattermost as a commandline utility which lets Mattermost run for a very short time only and essentially immediately triggers shutdown. During startup various Go routines are started accessing all kinds of stuff. If these Go routines run while already shutting down, the problem from above can appear. In this particular case, A workaround to this particular issue is, to remove https://github.com/mattermost/mattermost-server/blob/0788cdcadfb5d76b08758f42f01521b45ea76362/app/plugin.go#L162 line (avoid setting a.plugins to nil on shutdown). The whole issue is larger, since shutdown does not terminate/abort running Go routines which might access values which got cleaned up while shutting down. |
Thank you all, I created a ticket here for our devs to investigate: https://mattermost.atlassian.net/browse/MM-12250. |
Hey @longsleep @fbartels, Sorry for the late answer. Would you be open on trying to repo this bug on the latest server? |
Hi @hanzei, sure. Which version do you mean with latest server? 5.10.0 or head of the git repository? |
|
Hi @hanzei, I made some quick tests based on 5.10.0 and the script that was previously crashing Mattermost now no longer does so. Issue seems resolved. Thanks |
a bit as a followup to #9393. If I now try to create a team from the mattermost cli utility a get a segmentation violation error. The interesting part is that as soon as I disable the plugin framework team creation succeeds.
Steps to reproduce
Expected behavior
I can create teams from the mattermost cli
Observed behavior (that appears unintentional)
segmentation violation error
Possible fixes
Error output suggests an error in the plugin framework.
The text was updated successfully, but these errors were encountered: