[opensuse-buildservice] Notification plugin fail
I need some help/insight on the notification system in OBS. I wrote a tiny perl module as a notification plugin to replace Hermes (we only have very modest needs for notifications at Packman, Hermes is both overkill and barely documented). The trouble is that I only see a single notification coming in (a SRCSRV_START), but no SRCSRV_REQUEST_CREATE, which is actually what I'm looking for. The module is here: http://susepaste.org/38190545 After putting it into BSConfig.pm like this: our $notification_plugin = "notify_email"; and restarting the srcserver, all I get into the log file is a SRCSRV_START. I did create a SR but nothing happened. Any ideas? Thanks -- -o) Pascal Bleser /\\ http://opensuse.org -- we haz green _\_v http://fosdem.org -- we haz conf
On 04.05.2012 20:39, Pascal Bleser wrote: Hi Pascal,
I need some help/insight on the notification system in OBS. I wrote a tiny perl module as a notification plugin to replace Hermes (we only have very modest needs for notifications at Packman, Hermes is both overkill and barely documented). You probably know http://en.opensuse.org/openSUSE:Hermes ?
Where specifically do you think its barely documented? Maybe I can improve... Not because I want to convince you of Hermes, but still...
The trouble is that I only see a single notification coming in (a SRCSRV_START), but no SRCSRV_REQUEST_CREATE, which is actually what I'm looking for.
The module is here: http://susepaste.org/38190545
...which is barely documented and underkill ;-)) have fun, Klaas
After putting it into BSConfig.pm like this: our $notification_plugin = "notify_email";
and restarting the srcserver, all I get into the log file is a SRCSRV_START. I did create a SR but nothing happened.
Any ideas?
Thanks
-- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On 2012-05-05 09:15:16 (+0200), Klaas Freitag
On 04.05.2012 20:39, Pascal Bleser wrote:
I need some help/insight on the notification system in OBS. I wrote a tiny perl module as a notification plugin to replace Hermes (we only have very modest needs for notifications at Packman, Hermes is both overkill and barely documented). You probably know http://en.opensuse.org/openSUSE:Hermes ?
Where specifically do you think its barely documented? Maybe I can improve... Not because I want to convince you of Hermes, but still...
You know what, "contributing" should be renamed to "installation" :))) I never read that page which, indeed, contains most of the installation routine (I added/clarified a few minor bits). The only thing that's painful now is that I have to switch over to Apache before I can use it (http auth through Apache perl modules), we're still running lighttpd. But I have to do that for OBS 2.3 anyway :) One thing is a bit unclear, or annoying, so to say: hermes has its own user database with its own set of users, and as no one is using iChain any more, and probably barely anyone who's running OBS and Hermes has an IAM setup as on opensuse.org, we need to duplicate each user manually from the OBS database to the Hermes database (and have two independent passwords). I doubt that we can use the same database for both OBS and Hermes, as I'm not sure the tables are compatible (but I could check in the code), and I guess that db:migrate on one side is going to blow up the unknown tables (OBS db:migrate killing the hermes tables, and the other way around). Setting up some SSO solution for OBS, OBS API and Hermes (and, in our case, JIRA) sounds like overkill and a bag of pain. Maybe worth hacking Hermes to alternatively use another MySQL connection (to the OBS database) for authentication and looking up email addresses...
The trouble is that I only see a single notification coming in (a SRCSRV_START), but no SRCSRV_REQUEST_CREATE, which is actually what I'm looking for.
The module is here: http://susepaste.org/38190545
...which is barely documented and underkill ;-))
It's so small it doesn't really need any documentation :) And as for underkill, sure, but we don't have many SRs going around and being notified about when a SR is created is good enough. Actually, that's even a use case that Hermes doesn't cover, if I'm not mistaken: send an email to a mailing-list when a new SR is created. AFAICS, every notification that's sent to Hermes is bound to a user. Or are there some sort of broadcast notifications too ? I could create a Hermes user for the Packman mailing-list, but that's only going to help on the Hermes side: OBS will not send any notifications for that user but, instead, send to whomever is configured as maintainers in the project.
After putting it into BSConfig.pm like this: our $notification_plugin = "notify_email";
and restarting the srcserver, all I get into the log file is a SRCSRV_START. I did create a SR but nothing happened.
And it still doesn't tell me why those darn events aren't handed out to my very simple notification plugin :) cheers -- -o) Pascal Bleser /\\ http://opensuse.org -- we haz green _\_v http://fosdem.org -- we haz conf
On 05.05.2012 10:47, Pascal Bleser wrote:
On 2012-05-05 09:15:16 (+0200), Klaas Freitag
wrote: On 04.05.2012 20:39, Pascal Bleser wrote:
I need some help/insight on the notification system in OBS. I wrote a tiny perl module as a notification plugin to replace Hermes (we only have very modest needs for notifications at Packman, Hermes is both overkill and barely documented). You probably know http://en.opensuse.org/openSUSE:Hermes ?
Where specifically do you think its barely documented? Maybe I can improve... Not because I want to convince you of Hermes, but still...
You know what, "contributing" should be renamed to "installation" :)))
I never read that page which, indeed, contains most of the installation routine (I added/clarified a few minor bits). Cool, I take that as a compliment, thanks ;-)
One thing is a bit unclear, or annoying, so to say: hermes has its own user database with its own set of users, and as no one is using iChain any more, and probably barely anyone who's running OBS and Hermes has an IAM setup as on opensuse.org, we need to duplicate each user manually from the OBS database to the Hermes database (and have two independent passwords).
I doubt that we can use the same database for both OBS and Hermes, as I'm not sure the tables are compatible (but I could check in the code), and I guess that db:migrate on one side is going to blow up the unknown tables (OBS db:migrate killing the hermes tables, and the other way around). Yes, that's a long outstanding bug. The prefered solution should be that Hermes connects to a master user database, the OBS one in this case or any other one. A slim connector would be great and should be doable without abstraction KungFu.
Can you send me an (empty) database dump of the OBS database and I will look into the code tonight if you want to see how we can connect that.
Setting up some SSO solution for OBS, OBS API and Hermes (and, in our case, JIRA) sounds like overkill and a bag of pain.
ACK.
Actually, that's even a use case that Hermes doesn't cover, if I'm not mistaken: send an email to a mailing-list when a new SR is created. AFAICS, every notification that's sent to Hermes is bound to a user. Or are there some sort of broadcast notifications too ? No, because: I could create a Hermes user for the Packman mailing-list, but that's only going to help on the Hermes side: OBS will not send any notifications for that user but, instead, send to whomever is configured as maintainers in the project. ...thats how its often done. Not sure if the OBS sends stuff at all, and if, I would consider it a bug ;-)
After putting it into BSConfig.pm like this: our $notification_plugin = "notify_email";
and restarting the srcserver, all I get into the log file is a SRCSRV_START. I did create a SR but nothing happened.
And it still doesn't tell me why those darn events aren't handed out to my very simple notification plugin :) Sorry, can't really help here.
regards, Klaas -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On 2012-05-05 11:22:37 (+0200), Klaas Freitag
On 05.05.2012 10:47, Pascal Bleser wrote:
On 2012-05-05 09:15:16 (+0200), Klaas Freitag
wrote: On 04.05.2012 20:39, Pascal Bleser wrote:
I need some help/insight on the notification system in OBS. I wrote a tiny perl module as a notification plugin to replace Hermes (we only have very modest needs for notifications at Packman, Hermes is both overkill and barely documented). You probably know http://en.opensuse.org/openSUSE:Hermes ?
Where specifically do you think its barely documented? Maybe I can improve... Not because I want to convince you of Hermes, but still...
You know what, "contributing" should be renamed to "installation" :)))
I never read that page which, indeed, contains most of the installation routine (I added/clarified a few minor bits).
Cool, I take that as a compliment, thanks ;-)
Yes, I complained often that there is barely any documentation on Hermes, my bad, mea culpa, mea maxima culpa :) [...] cheers -- -o) Pascal Bleser /\\ http://opensuse.org -- we haz green _\_v http://fosdem.org -- we haz conf
On 5/5/2012 at 02:52 PM, Klaas Freitag
wrote: On 05.05.2012 10:47, Pascal Bleser wrote: On 2012-05-05 09:15:16 (+0200), Klaas Freitag wrote: On 04.05.2012 20:39, Pascal Bleser wrote: I need some help/insight on the notification system in OBS. I wrote a tiny perl module as a notification plugin to replace Hermes (we only have very modest needs for notifications at Packman, Hermes is both overkill and barely documented). You probably know http://en.opensuse.org/openSUSE:Hermes ?
Where specifically do you think its barely documented? Maybe I can improve... Not because I want to convince you of Hermes, but still...
You know what, "contributing" should be renamed to "installation" :)))
I never read that page which, indeed, contains most of the installation routine (I added/clarified a few minor bits). Cool, I take that as a compliment, thanks ;-)
One thing is a bit unclear, or annoying, so to say: hermes has its own user database with its own set of users, and as no one is using iChain any more, and probably barely anyone who's running OBS and Hermes has an IAM setup as on opensuse.org, we need to duplicate each user manually from the OBS database to the Hermes database (and have two independent passwords).
I doubt that we can use the same database for both OBS and Hermes, as I'm not sure the tables are compatible (but I could check in the code), and I guess that db:migrate on one side is going to blow up the unknown tables (OBS db:migrate killing the hermes tables, and the other way around). Yes, that's a long outstanding bug. The prefered solution should be that Hermes connects to a master user database, the OBS one in this case or any other one. A slim connector would be great and should be doable without abstraction KungFu.
I had Hermes running for close to 2 yrs with a very simple LDAP bind() call to check if the credentials were right against a LDAP server. But users had to first "Register" themselves before attempting a login to Hermes. I never rolled it out for production use! Recently, after having a chat with Klaas on IRC, I was motivated enough to replicate OBS' LDAP authentication code to Hermes. But later realized that all that might be needed was to pass the credentials to the OBS API - just like the webui does. From what I understand, OBS Webui is just another Rails app that authenticates the user via the API using ActiveXML. So Hermes could use the same technique, right? I still don't understand ActiveXML completely. I would still like to give this a shot! Any comments or suggestions on this idea? <snip>
After putting it into BSConfig.pm like this: our $notification_plugin = "notify_email";
and restarting the srcserver, all I get into the log file is a SRCSRV_START. I did create a SR but nothing happened.
And it still doesn't tell me why those darn events aren't handed out to my very simple notification plugin :)
Do you see any errors in src_server.log? (Basically, from BSNotify::loadPackage) Srinidhi. -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
participants (3)
-
Klaas Freitag
-
Pascal Bleser
-
Srinidhi B