Tracking down a bug - need help with a CLI middleware/API command

Stilez

Guru
Joined
Apr 8, 2016
Messages
529
Im tracking down a bug in the Samba middleware plugins in 12-BETA1, that causes a traceback in the GUI. For reasons I dont yet understand, the exception dump and traceback are completely unhelpful. So far, it seems to somehow jump to a function call (that crashes out), without hitting the debug output line directly preceeding the function call, which suggests I'm missing something, so I'm still trying to figure what I'm missing, ands if that's cause or effect. So I'm tracking it down the old way, by tweaking the relevant python plugins (/usr/local/lib/python3.8/site-packages/middlewared/plugins/**/*) and watching for more informative debug/trace/args info as it runs. Its not the most efficient way, but at least I can get there, and find whatever's going on - it seems pretty specific and hard to reproduce, so its a case of "debug approach works for me".

My difficulty is that to retest my work, after editing a .py, I need to cause the python middleware plugins to be reloaded. Right now the only way I know to do it, is to reboot... and Supermicro boards are slow as anything to reboot.

Tl;Dr - I need a one line command from shell, to cause the middleware plugins to be reloaded after I edit them, so I can retest the updated versions?

Thanks!
 

waqarahmed

iXsystems
iXsystems
Joined
Aug 28, 2019
Messages
136
Hi @Stilez thank you for debugging the issue. After making changes to middleware plugins, we need to restart middlewared service for it to load the changes made. Please run "service middlewared restart".
That said, we appreciate your help trying to figure this out and if you get stuck, please feel free to create a ticket at https://jira.ixsystems.com and we can collaborate from there. Thank you.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Stilez, I know you had an issue with SMB and your particular combination of auxiliary parameters. I recommend testing against 12.0-stable before becoming too heavily invested in troubleshooting. This is because the issue might already be fixed there.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Or to be more precise, part of the issue you reported (related to an error in registry share generation) in the now-closed bug ticket is fixed in 12.0-stable and master. The other part of the larger issue (where you're creating a share definition for IPC$ share in auxiliary parameters) is not resolved.
 

Stilez

Guru
Joined
Apr 8, 2016
Messages
529
Stilez, I know you had an issue with SMB and your particular combination of auxiliary parameters. I recommend testing against 12.0-stable before becoming too heavily invested in troubleshooting. This is because the issue might already be fixed there.
Can I flip trains from 12-BETA1, over to 12-NIGHTLIES, then back again to 12-BETA2?
 

Stilez

Guru
Joined
Apr 8, 2016
Messages
529
After making changes to middleware plugins, we need to restart middlewared service for it to load the changes made. Please run "service middlewared restart".
Thanks, I really wanted that command. Useful!!
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Can I flip trains from 12-BETA1, over to 12-NIGHTLIES, then back again to 12-BETA2?
It's generally easier to do this in a VM if you have an easy method to reproduce the issue. You also could send me a debug file, as I requested multiple times in your Jira ticket.
 

Stilez

Guru
Joined
Apr 8, 2016
Messages
529
It's generally easier to do this in a VM if you have an easy method to reproduce the issue. You also could send me a debug file, as I requested multiple times in your Jira ticket.
I'm doing a debug file today. But I also would like to educate myself in the codebase, so that over time I can file PRs for bug fixes, rather than just jira bug issues. So both are useful.

Debug file should be with you today. But could you also confirm (1) if Beta1->nightly->beta2 is possible and if so how, and (2) DL link for current post-beta1 nightlies, so I can test if the issue was fixed since beta 1? I can only find nightlies up to the date beta1 was released.

Thanks!
 
Top