From: <gi...@ba...> - 2012-03-29 16:12:14
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Bacula Community source". The branch, Branch-5.2 has been updated via f467196b9eacbef257ff94049351567873d55cd6 (commit) via 2ccfa4f354a08e616883318dc7db5673fd781f76 (commit) via 705b9025fb55ebbafe5961f24ec0cd3ddc743063 (commit) via 9bb08cc23aa1a3abcaad759ada4991ce86fb6136 (commit) via ee75b2763255870065b567ba7036a1b8246c3e4b (commit) from 14f937e10a8dda0aaaea58e2a59322589553f3de (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit f467196b9eacbef257ff94049351567873d55cd6 Author: Marco van Wieringen <mv...@pl...> Date: Wed Mar 28 18:33:14 2012 +0200 Fix bug #1853: bacula-sd dead but pid file exists. We scanned using a %d pattern into a bool value. On some platforms (SPARC) this gives a severe SIGBUS e.g. bus error as the sizeof(bool) on 64 bits is 1 byte and the %d uses an integer value which is 4 bytes. Its obvious now we know this problem that its an problem on other platforms too but it seems only on SPARC it triggers a hardware error by the CPU. The workaround is to use a temporary variable and set the bool to either true or false based on the integer value. commit 2ccfa4f354a08e616883318dc7db5673fd781f76 Author: Marco van Wieringen <mv...@pl...> Date: Fri Mar 23 20:24:04 2012 +0100 Fix bug #1841 estimate command level=differential goes wrong in accurate mode. commit 705b9025fb55ebbafe5961f24ec0cd3ddc743063 Author: Martin Simmons <ma...@li...> Date: Thu Mar 22 17:20:49 2012 +0100 Fix bug #1842 Incorrect port number reported An incorrect port number reported when console fails to authenticate. Signed-off-by: Marco van Wieringen <mv...@pl...> commit 9bb08cc23aa1a3abcaad759ada4991ce86fb6136 Author: Marco van Wieringen <mv...@pl...> Date: Thu Mar 22 13:08:14 2012 +0100 Fix bug #1848 bsock.c:335 Socket has errors=1 on call to client Removed the unneeded bnet_sig(dir, BNET_EOD) as the calling function changer_cmd in dircmd.c already sets the BNET_EOD on returning. So the autochanger_cmd function doesn't need to do it. commit ee75b2763255870065b567ba7036a1b8246c3e4b Author: Eric Bollengier <er...@ba...> Date: Sat Mar 10 10:25:15 2012 +0100 Force the re-initialization of BaseJobOpts, AccurateOpts and VerifyOpts between two Include{} When using this configuration FileSet { Name = X Include { Options { Accurate = A } File = /tmp } Include { Options { Compression = GZIP1 } File = /elsewhere } } The second Include {} block is using the Accurate=A option from the first Include{}. With this fix, the Accurate/BaseJob/Verify options are set to default between two Include{}. We still have the same kind of problem for the "flags" that contains most options. Something like the following configuration won't work as expected: FileSet { Name = X Include { Options { Portable = no } File = /tmp } Include { Options { Portable = yes } File = /elsewhere } } ----------------------------------------------------------------------- Summary of changes: diff --git a/bacula/src/dird/ua_cmds.c b/bacula/src/dird/ua_cmds.c index 9e60d30..2dde271 100644 --- a/bacula/src/dird/ua_cmds.c +++ b/bacula/src/dird/ua_cmds.c @@ -1188,6 +1188,7 @@ static int estimate_cmd(UAContext *ua, const char *cmd) jcr->job = job; jcr->setJobType(JT_BACKUP); + jcr->start_time = time(NULL); init_jcr_job_record(jcr); if (!get_or_create_client_record(jcr)) { diff --git a/bacula/src/findlib/find.c b/bacula/src/findlib/find.c index df61548..d31714e 100644 --- a/bacula/src/findlib/find.c +++ b/bacula/src/findlib/find.c @@ -178,14 +178,19 @@ find_files(JCR *jcr, FF_PKT *ff, int file_save(JCR *jcr, FF_PKT *ff_pkt, bool to findFILESET *fileset = ff->fileset; if (fileset) { int i, j; + /* TODO: We probably need be move the initialization in the fileset loop, + * at this place flags options are "concatenated" accross Include {} blocks + * (not only Options{} blocks inside a Include{}) + */ ff->flags = 0; - ff->VerifyOpts[0] = 'V'; - ff->VerifyOpts[1] = 0; - strcpy(ff->AccurateOpts, "Cmcs"); /* mtime+ctime+size by default */ - strcpy(ff->BaseJobOpts, "Jspug5"); /* size+perm+user+group+chk */ for (i=0; i<fileset->include_list.size(); i++) { findINCEXE *incexe = (findINCEXE *)fileset->include_list.get(i); fileset->incexe = incexe; + + strcpy(ff->VerifyOpts, "V"); + strcpy(ff->AccurateOpts, "Cmcs"); /* mtime+ctime+size by default */ + strcpy(ff->BaseJobOpts, "Jspug5"); /* size+perm+user+group+chk */ + /* * By setting all options, we in effect OR the global options * which is what we want. @@ -200,7 +205,7 @@ find_files(JCR *jcr, FF_PKT *ff, int file_save(JCR *jcr, FF_PKT *ff_pkt, bool to ff->drivetypes = fo->drivetype; ff->plugin = fo->plugin; /* TODO: generate a plugin event ? */ ff->opt_plugin = (ff->plugin != NULL)? true : false; - bstrncat(ff->VerifyOpts, fo->VerifyOpts, sizeof(ff->VerifyOpts)); + bstrncat(ff->VerifyOpts, fo->VerifyOpts, sizeof(ff->VerifyOpts)); /* TODO: Concat or replace? */ if (fo->AccurateOpts[0]) { bstrncpy(ff->AccurateOpts, fo->AccurateOpts, sizeof(ff->AccurateOpts)); } @@ -208,7 +213,8 @@ find_files(JCR *jcr, FF_PKT *ff, int file_save(JCR *jcr, FF_PKT *ff_pkt, bool to bstrncpy(ff->BaseJobOpts, fo->BaseJobOpts, sizeof(ff->BaseJobOpts)); } } - Dmsg3(50, "Verify=<%s> Accurate=<%s> BaseJob=<%s>\n", ff->VerifyOpts, ff->AccurateOpts, ff->BaseJobOpts); + Dmsg4(50, "Verify=<%s> Accurate=<%s> BaseJob=<%s> flags=<%d>\n", + ff->VerifyOpts, ff->AccurateOpts, ff->BaseJobOpts, ff->flags); dlistString *node; foreach_dlist(node, &incexe->name_list) { char *fname = node->c_str(); diff --git a/bacula/src/lib/bnet_server.c b/bacula/src/lib/bnet_server.c index 598d003..0939417 100644 --- a/bacula/src/lib/bnet_server.c +++ b/bacula/src/lib/bnet_server.c @@ -207,7 +207,7 @@ bnet_thread_server(dlist *addrs, int max_clients, workq_t *client_wq, sockaddr_to_ascii(&cli_addr, buf, sizeof(buf)); V(mutex); BSOCK *bs; - bs = init_bsock(NULL, newsockfd, "client", buf, fd_ptr->port, &cli_addr); + bs = init_bsock(NULL, newsockfd, "client", buf, ntohs(fd_ptr->port), &cli_addr); if (bs == NULL) { Jmsg0(NULL, M_ABORT, 0, _("Could not create client BSOCK.\n")); } diff --git a/bacula/src/stored/autochanger.c b/bacula/src/stored/autochanger.c index 67d1780..9d6b243 100644 --- a/bacula/src/stored/autochanger.c +++ b/bacula/src/stored/autochanger.c @@ -640,7 +640,6 @@ bool autochanger_cmd(DCR *dcr, BSOCK *dir, const char *cmd) be.set_errno(stat); dir->fsend(_("Autochanger error: ERR=%s\n"), be.bstrerror()); } - bnet_sig(dir, BNET_EOD); bail_out: unlock_changer(dcr); diff --git a/bacula/src/stored/job.c b/bacula/src/stored/job.c index 8be2b4e..7fabf57 100644 --- a/bacula/src/stored/job.c +++ b/bacula/src/stored/job.c @@ -74,7 +74,7 @@ bool job_cmd(JCR *jcr) BSOCK *dir = jcr->dir_bsock; POOL_MEM job_name, client_name, job, fileset_name, fileset_md5; int32_t JobType, level, spool_attributes, no_attributes, spool_data; - int32_t write_part_after_job, PreferMountedVols; + int32_t write_part_after_job, PreferMountedVols, rerunning; int stat; JCR *ojcr; @@ -88,7 +88,7 @@ bool job_cmd(JCR *jcr) &JobType, &level, fileset_name.c_str(), &no_attributes, &spool_attributes, fileset_md5.c_str(), &spool_data, &write_part_after_job, &PreferMountedVols, spool_size, - &jcr->rerunning, &jcr->VolSessionId, &jcr->VolSessionTime); + &rerunning, &jcr->VolSessionId, &jcr->VolSessionTime); if (stat != 17) { pm_strcpy(jcr->errmsg, dir->msg); dir->fsend(BAD_job, stat, jcr->errmsg); @@ -96,6 +96,7 @@ bool job_cmd(JCR *jcr) jcr->setJobStatus(JS_ErrorTerminated); return false; } + jcr->rerunning = (rerunning) ? true : false; Dmsg3(100, "==== rerunning=%d VolSesId=%d VolSesTime=%d\n", jcr->rerunning, jcr->VolSessionId, jcr->VolSessionTime); /* hooks/post-receive -- Bacula Community source |