Hello James, I have now committed code that should make the Bacula core code stop calling the plugin if the job is canceled. As mentioned, there will still be some calls to terminate a job and to unload the plugin, but in any case, it should now stop much faster than before.
Any feedback would be appreciated. Best regards, Kern On Monday 27 April 2009 12:23:38 James Harper wrote: > Kern, > > I have just established that having the Exchange plugin enabled (but not > actually backing anything up itself) causes the cancel operation to fail > and flood bacula with "filed/backup.c:1048 Network send error to SD. > ERR=No error" messages. > > Currently, my code does this when it gets an event that I haven't > explicitly catered for: > > default: > _JobMessage(M_ERROR, "unknown event=%d\n", event->eventType); > break; > } > bfuncs->getBaculaValue(ctx, bVarFDName, (void *)&name); > return bRC_OK; > > so there are two possible issues - one is that I send a M_ERROR message, > and the other is that I don't actually do anything else. > > The debug log from the point of the cancel onwards looks like: > > " > exchtest-fd: /usr/local/src/bacula/bacula/src/filed/job.c:251-0 > Executing cancel command. > exchtest-fd: /usr/local/src/bacula/bacula/src/filed/fd_plugins.c:133-0 > plugin_ctx=f90628 JobId=2282 > exchtest-fd: /usr/local/src/bacula/bacula/src/lib/message.c:1095-0 Enter > Jmsg type=4 > exchtest-fd: /usr/local/src/bacula/bacula/src/lib/message.c:613-0 Enter > dispatch_msg type=4 msg=exchtest-fd JobId 2282: Error: unknown event=13 > exchtest-fd: /usr/local/src/bacula/bacula/src/lib/message.c:785-0 > DIRECTOR for following msg: exchtest-fd JobId 2282: Error: unknown > event=13 > exchtest-fd: /usr/local/src/bacula/bacula/src/filed/fd_plugins.c:852-0 > Bacula: return my_name=exchtest-fd > exchtest-fd: /usr/local/src/bacula/bacula/src/lib/jcr.c:818-0 > set_jcr_job_status(exchtest.2009-04-27_19.56.14_25, A) > exchtest-fd: /usr/local/src/bacula/bacula/src/lib/jcr.c:828-0 jid=2282 > OnEntry JobStatus=R set=A > exchtest-fd: /usr/local/src/bacula/bacula/src/lib/jcr.c:835-0 jid=2282 > leave set_old_job_status=R new_set=A > exchtest-fd: > /usr/local/src/bacula/bacula/src/win32/compat/compat.cpp:910-2282 > sizino=8 ino=0 file=C:/Windows/system32/drivers/nmnt.sys > exchtest-fd: > /usr/local/src/bacula/bacula/src/findlib/find_one.c:328-2282 File ----: > C:/Windows/system32/drivers/nmnt.sys > exchtest-fd: /usr/local/src/bacula/bacula/src/filed/backup.c:1142-2282 > No strip for C:/Windows/system32/drivers/nmnt.sys > exchtest-fd: /usr/local/src/bacula/bacula/src/lib/htable.c:142-2282 > Leave hash_index hash=0x663e93df index=48 > exchtest-fd: /usr/local/src/bacula/bacula/src/lib/htable.c:306-2282 > lookup return 14e1f54 > exchtest-fd: /usr/local/src/bacula/bacula/src/filed/accurate.c:81-2282 > lookup <C:/Windows/system32/drivers/nmnt.sys> ok > exchtest-fd: /usr/local/src/bacula/bacula/src/lib/htable.c:142-2282 > Leave hash_index hash=0x663e93df index=48 > exchtest-fd: /usr/local/src/bacula/bacula/src/lib/htable.c:306-2282 > lookup return 14e1f54 > exchtest-fd: > /usr/local/src/bacula/bacula/src/findlib/find_one.c:391-2282 > Non-directory incremental: C:/Windows/system32/drivers/nmnt.sys > " > > So the bacula-fd code itself keeps going, oblivious to the cancel. > > Am I doing something wrong in the way I handle the cancel? It looks to > me like bacula-fd itself is not behaving correctly but maybe my plugin > is the cause? > > James > > --------------------------------------------------------------------------- >--- Crystal Reports - New Free Runtime and 30 Day Trial > Check out the new simplified licensign option that enables unlimited > royalty-free distribution of the report engine for externally facing > server and web deployment. > http://p.sf.net/sfu/businessobjects > _______________________________________________ > Bacula-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/bacula-devel ------------------------------------------------------------------------------ Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf _______________________________________________ Bacula-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/bacula-devel
