From: Kern Sibbald Date: Sat, 3 Mar 2007 08:50:30 +0000 (+0000) Subject: kes Add Client Connect Wait to Storage daemon to permit users to X-Git-Tag: Release-2.0.3~14 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d3174f319d05f7ad42511c63f4caadc10d9a647f;p=bacula%2Fbacula kes Add Client Connect Wait to Storage daemon to permit users to modify the time the SD waits for a FD connection. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/branches/Branch-2.0@4297 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/kernstodo b/bacula/kernstodo index 858e312a2d..0bcd308589 100644 --- a/bacula/kernstodo +++ b/bacula/kernstodo @@ -6,6 +6,8 @@ Project Developer ======= ========= Document: +- !!! Cannot restore two jobs a the same time that were + written simultaneously unless they were totally spooled. - Document cleaning up the spool files: db, pid, state, bsr, mail, conmsg, spool - Document the multiple-drive-changer.txt script. @@ -41,6 +43,34 @@ Document: Priority: +- Add Catalog = to Pool resource so that pools will exist + in only one catalog -- currently Pools are "global". +- Look at sg_logs -a /dev/sg0 for getting soft errors. +- btape "test" command with Offline on Unmount = yes + + This test is essential to Bacula. + + I'm going to write one record in file 0, + two records in file 1, + and three records in file 2 + + 02-Feb 11:00 btape: ABORTING due to ERROR in dev.c:715 + dev.c:714 Bad call to rewind. Device "LTO" (/dev/nst0) not open + 02-Feb 11:00 btape: Fatal Error because: Bacula interrupted by signal 11: Segmentation violation + Kaboom! btape, btape got signal 11. Attempting traceback. + +- Why the heck doesn't bacula drop root priviledges before connecting to + the DB? +- Ensure that moving a purged Volume in ua_purge.c to the RecyclePool + does the right thing. +- Why doesn't @"xxx abc" work in a conf file? +- Figure out some way to "automatically" backup conf changes. +- Look at using posix_fadvise(2) for backups -- see bug #751. + Possibly add the code at findlib/bfile.c:795 +- Add the OS version back to the Win32 client info. +- Restarted jobs have a NULL in the from field. +- Modify SD status command to indicate when the SD is writing + to a DVD (the device is not open -- see bug #732). - Look at the possibility of adding "SET NAMES UTF8" for MySQL, and possibly changing the blobs into varchar. - Check if gnome-console works with TLS. @@ -69,6 +99,9 @@ Projects: - Despool attributes in separate thread - Database speedups - Embedded MySQL + - Check why restore repeatedly sends Rechdrs between + each data chunk -- according to James Harper 9Jan07. + - Building the in memory restore tree is slow. - Features - Better scheduling - Full at least once a month, ... @@ -114,6 +147,14 @@ For next release: .move transfer device=xxx fromslot=yyy toslot=zzz Low priority: +- Article: http://www.heise.de/open/news/meldung/83231 +- Article: http://www.golem.de/0701/49756.html +- Article: http://lwn.net/Articles/209809/ +- Article: http://www.onlamp.com/pub/a/onlamp/2004/01/09/bacula.html +- Article: http://www.linuxdevcenter.com/pub/a/linux/2005/04/07/bacula.html +- Article: http://www.osreviews.net/reviews/admin/bacula +- Article: http://www.debianhelp.co.uk/baculaweb.htm +- Article: - It appears to me that you have run into some sort of race condition where two threads want to use the same Volume and they were both given access. Normally that is no problem. However, diff --git a/bacula/src/stored/job.c b/bacula/src/stored/job.c index 891c4477b6..81bada588b 100644 --- a/bacula/src/stored/job.c +++ b/bacula/src/stored/job.c @@ -1,15 +1,7 @@ -/* - * Job control and execution for Storage Daemon - * - * Kern Sibbald, MM - * - * Version $Id$ - * - */ /* Bacula® - The Network Backup Solution - Copyright (C) 2000-2006 Free Software Foundation Europe e.V. + Copyright (C) 2000-2007 Free Software Foundation Europe e.V. The main author of Bacula is Kern Sibbald, with contributions from many others, a complete list can be found in the file AUTHORS. @@ -33,6 +25,14 @@ (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich, Switzerland, email:ftf@fsfeurope.org. */ +/* + * Job control and execution for Storage Daemon + * + * Kern Sibbald, MM + * + * Version $Id$ + * + */ #include "bacula.h" #include "stored.h" @@ -166,9 +166,10 @@ bool run_cmd(JCR *jcr) gettimeofday(&tv, &tz); timeout.tv_nsec = tv.tv_usec * 1000; - timeout.tv_sec = tv.tv_sec + 30 * 60; /* wait 30 minutes */ + timeout.tv_sec = tv.tv_sec + me->client_wait; - Dmsg1(100, "%s waiting on FD to contact SD\n", jcr->Job); + Dmsg2(100, "%s waiting %d sec for FD to contact SD\n", + jcr->Job, (int)me->client_wait); /* * Wait for the File daemon to contact us to start the Job, * when he does, we will be released, unless the 30 minutes diff --git a/bacula/src/stored/stored_conf.c b/bacula/src/stored/stored_conf.c index ec5632a41a..bae09e0b2d 100644 --- a/bacula/src/stored/stored_conf.c +++ b/bacula/src/stored/stored_conf.c @@ -1,14 +1,7 @@ -/* - * Configuration file parser for Bacula Storage daemon - * - * Kern Sibbald, March MM - * - * Version $Id$ - */ /* Bacula® - The Network Backup Solution - Copyright (C) 2000-2006 Free Software Foundation Europe e.V. + Copyright (C) 2000-2007 Free Software Foundation Europe e.V. The main author of Bacula is Kern Sibbald, with contributions from many others, a complete list can be found in the file AUTHORS. @@ -32,6 +25,13 @@ (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich, Switzerland, email:ftf@fsfeurope.org. */ +/* + * Configuration file parser for Bacula Storage daemon + * + * Kern Sibbald, March MM + * + * Version $Id$ + */ #include "bacula.h" #include "stored.h" @@ -86,6 +86,7 @@ static RES_ITEM store_items[] = { {"tlskey", store_dir, ITEM(res_store.tls_keyfile), 0, 0, 0}, {"tlsdhfile", store_dir, ITEM(res_store.tls_dhfile), 0, 0, 0}, {"tlsallowedcn", store_alist_str, ITEM(res_store.tls_allowed_cns), 0, 0, 0}, + {"clientconnectwait", store_time, ITEM(res_store.client_wait), 0, ITEM_DEFAULT, 30 * 60}, {NULL, NULL, {0}, 0, 0, 0} }; diff --git a/bacula/src/stored/stored_conf.h b/bacula/src/stored/stored_conf.h index 42461d3aa3..7b7467de91 100644 --- a/bacula/src/stored/stored_conf.h +++ b/bacula/src/stored/stored_conf.h @@ -86,6 +86,7 @@ public: uint32_t max_concurrent_jobs; /* maximum concurrent jobs to run */ MSGS *messages; /* Daemon message handler */ utime_t heartbeat_interval; /* Interval to send hb to FD */ + utime_t client_wait; /* Time to wait for FD to connect */ int tls_enable; /* Enable TLS */ int tls_require; /* Require TLS */ int tls_verify_peer; /* TLS Verify Client Certificate */ diff --git a/bacula/src/version.h b/bacula/src/version.h index 09221037cb..6b3669be46 100644 --- a/bacula/src/version.h +++ b/bacula/src/version.h @@ -4,8 +4,8 @@ #undef VERSION #define VERSION "2.0.3" -#define BDATE "28 February 2007" -#define LSMDATE "28Feb07" +#define BDATE "02 March 2007" +#define LSMDATE "02Mar07" #define PROG_COPYRIGHT "Copyright (C) %d-2007 Free Software Foundation Europe e.V.\n" #define BYEAR "2007" /* year for copyright messages in progs */ diff --git a/bacula/src/wx-console/wxbmainframe.cpp b/bacula/src/wx-console/wxbmainframe.cpp index 37a6825091..26d031fdf2 100644 --- a/bacula/src/wx-console/wxbmainframe.cpp +++ b/bacula/src/wx-console/wxbmainframe.cpp @@ -1,15 +1,7 @@ -/* - * - * Main frame - * - * Nicolas Boichat, July 2004 - * - * Version $Id$ - */ /* Bacula® - The Network Backup Solution - Copyright (C) 2004-2006 Free Software Foundation Europe e.V. + Copyright (C) 2004-2007 Free Software Foundation Europe e.V. The main author of Bacula is Kern Sibbald, with contributions from many others, a complete list can be found in the file AUTHORS. @@ -33,6 +25,14 @@ (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich, Switzerland, email:ftf@fsfeurope.org. */ +/* + * + * Main frame + * + * Nicolas Boichat, July 2004 + * + * Version $Id$ + */ /* Windows debug builds set _DEBUG which is used by wxWidgets to select their * debug memory allocator. Unfortunately it conflicts with Bacula's SmartAlloc. @@ -513,7 +513,9 @@ void wxbMainFrame::OnQuit(wxCommandEvent& WXUNUSED(event)) void wxbMainFrame::OnAbout(wxCommandEvent& WXUNUSED(event)) { wxString msg; - msg.Printf(_("Welcome to Bacula wx-console.\nWritten by Nicolas Boichat \n(C) 2005 Kern Sibbald\n")); + msg.Printf(_("Welcome to Bacula wx-console.\n" + "Written by Nicolas Boichat \n" + "Copyright (C), 2005-2007 Free Software Foundation Europe, e.V.\n")); wxMessageBox(msg, _("About Bacula wx-console"), wxOK | wxICON_INFORMATION, this); } diff --git a/bacula/technotes-2.0 b/bacula/technotes-2.0 index 5fdf0f802a..7bbba84906 100644 --- a/bacula/technotes-2.0 +++ b/bacula/technotes-2.0 @@ -1,6 +1,9 @@ Technical notes on version 2.0 General: +02Mar07 +kes Add Client Connect Wait to Storage daemon to permit users to + modify the time the SD waits for a FD connection. 28Feb07 kes Correct typeo in var.c patch. kes Apply Command ACL filter to JobId list in restore command.