From a271d263dc39d66664c8b47402a59bba217360e1 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Wed, 4 Jun 2003 08:55:36 +0000 Subject: [PATCH] Minor updates git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@565 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/ChangeLog | 109 ++++++++++++++++++++++++++++++++ bacula/ReleaseNotes | 48 +++++++++++++- bacula/kernstodo | 8 ++- bacula/src/stored/stored_conf.c | 4 +- bacula/src/version.h | 4 +- 5 files changed, 166 insertions(+), 7 deletions(-) diff --git a/bacula/ChangeLog b/bacula/ChangeLog index a34e1ce554..96b7fe95c2 100644 --- a/bacula/ChangeLog +++ b/bacula/ChangeLog @@ -1,3 +1,111 @@ +2003-06-04 Version 1.31 Beta 04Jun03 +- Fix block.c to check errno only in case of return status -1 as + suggested by Justin Gibbs (FreeBSD). +- Implemented qfill command in btape for quick testing write/read of a tape. +- Discovered that FreeBSD pthreads re-use the same thread id, which causes + the SD to fail when a user leaves a device unmounted (old pid is reused + and lock_device() thinks the same thread is calling again leading to + inconsistent state). Set id to zero after blocking the device during + unmount. +- A lot of clean up, moving subroutines around for TermCode. +- Free ua->prompt when Job terminates. +- Add AutoPrune and Recycle to values copied from Pool resource + into Pool record on create/updated. +- Implemented bsr for Verify VolumeToCatalog. +- Improved the Verify Job report using SD and FD term codes. +- Split tree handling routines from ua_restore.c to ua_tree.c +- Split bsr routines from ua_restore.c to bsr.c and bsr.h +- Fixed clash between FD and SD returned job values. Report now contains + values from FD. Maybe I should change? or give both. +- Attempt to fix negative use_count for dev packet in SD by adding + a couple of open_dev(). This may be cause of Dan's crash. +- Clear no_wait_id when device is unblocked. This may be cause of Dan's crash. +- Eliminate old "new lock code". +- Add configure of mtx-changer for mtx path. +- Always rewind tape before releasing it (for FreeBSD). +- StartBlock was one too large for second volume. +- Fixed restore to display status from both SD and FD. +- Unified return status message for backup and restore. +- Corrected segmentation fault reported by Dan when doing "label barcodes" + on a File. +- Corrected a segmentation fault when attempting to send a JobMedia record + to the Console -- reported by Dan. +- Added MySQL documentation for using the threaded libraries. +- Added new columns and tables to Catalog database. +- Wrote alter scripts and tested them (thanks to Dan for the help) on + MySQL and SQLite. +- Started using enums where ever possible when passing flags to + subroutines. This helps make the source much more readable. +- Corrected a bug where a vertical database listing was being used in + the query command. +- Added new argument to parse_args() to prevent command arg overflow. +- Renamed ua_db_query.c ua_query.c. +- Split scan.c out of lib/util.c +- Perhaps I have *finally* fixed the command line history in gnome-console. +- Added support for smartalloc for any global new or delete command + by overloading the global operators. +- Made the default time with no qualifier day rather than seconds. +- Fixed a bug in the store_size() routine that improperly converted from + double to uint32_t. +- Started using "bool" where possible. +- Zap SD session key once it is used. +- Added *lots* more checking for strcpy -- bstrncpy(), ... +- Added CreateTime field to FileSet record and print it to distinguish + FileSets. +- Print an information message when a new FileSet is created. +- Include the FileSet date/time in the Job report. +- Indicate if a Job is upgraded in the Job report and from what previous level. +- Incremented the database version. +- Ensure that any DB error message is printed if the start_time of a previous + save is not found. +- Free orphaned buffer in ua_restore.c in case of database error. +- Implement enum for response DISPLAY_ERROR and NO_DISPLAY +- Implement enum for create_pool (POOL_OP_CREATE, POOL_OP_UPDATE). +- Make sure FileSets printed in restore are in order. +- Add a number of bstrncat, and other protected string operations. +- Clean up old structs in dird_conf.h +- Remove all Slot invalidation code. +- Add Automatic choice message to all do_prompt() calls. +- Eliminate JobId from restore if not used. +- Clean up a few error messages. +- Make fill/unfill commands work correctly in btape. +- Enhance btape fill and unfill commands. +- Implement real Pmsg() code so that negative levels work in Dmsg() +- Implement block number check -- had to turn it off because it doesn't + work. Need to verify that it is the correct block and that block + numbers are properly written. +- Moved readline from depkgs1 to depkgs. +- Reworked the configure code to handle readline correctly. This was broken + mostly due to the fact that the readline routines are nested down one + directory. Also, I missed one header file that was needed (possibly added + in a later version). +- Put correct include on the dependencies make for Console readline. +- Remove JobMediaId from VOL_PARAMS (no longer needed). +- Sort VOL_PARAMS by JobMediaId using SQL in cats. +- Add jcr as argument to block.c read_block... routines so that error + messages are immediately displayed. +- Make bsr_dev() edit an error message if it is turned off and return 0. +- Add checking for the BlockNumber in the read routines -- lots of + false matches are found -- much check writing end. +- Now sort bsr volumes by JobMediaId -- produces better results. +- It turns out that under certain circumstances, when doing a restore, the + Volumes will not be written to the BSR in the correct order. I don't + know exactly why, but many thanks to Dan Langille for reporting this. + The solution is to sort the Vol_Params within each bsr (done), and to + sort the bsr chain (not yet implemented). Note, the bsr chain should + always be in order unless the user explicitly specifies the JobIds in + a different order. +- Began implementing C++ structs rather than typedef structs as in C. +- Added volatile to a lot of variables that are used in two threads at + the same time. This should prevent improper optimization. +- Fixed a missing space in the "run job=xxx where=" the where was + glued to the end of the previous stuff (bootstrap filename). +- I *finally* found the cause of the mysterious failure of shell expansion. + It was due to the read() getting interrupted! That's what opening up + SIGCHLD will do! +- Remove unused default tape drive names. +- Create a new status.c file in stored and split the status code out of dircmd.c + 2003-05-22 Version 1.31 Beta 22May03 - I discovered that C++ permits "prototyping" structures e.g. struct A; is a valid statement. This permitted me to eliminate all the void *jcr, in @@ -12,6 +120,7 @@ - Print unexpected (or incorrect) termination message returned from FD. - Use switch() instead of giant if statement in verify_vol.c - Protect overrun from do_shell_expansion() by passing max length. + 2003-05-20 Version 1.31 Beta 20May03 - Add mandrake to platforms - Suppress error messages if no bytes written to tape. diff --git a/bacula/ReleaseNotes b/bacula/ReleaseNotes index 6e6a4cf09b..ec16a51d78 100644 --- a/bacula/ReleaseNotes +++ b/bacula/ReleaseNotes @@ -1,9 +1,10 @@ Release Notes for Bacula 1.31 - Bacula code: Total files = 243 Total lines = 70,151 (*.h *.c *.in) + Bacula code: Total files = 246 Total lines = 70,476 (*.h *.c *.in) Major Changes this Release: +- The database format has changed. Please see below. - Support to save and restore all files on WinNT/2K/XP systems including the permissions. Unfortunately files that are in use by another program cannot be saved. @@ -12,6 +13,8 @@ Major Changes this Release: timeouts. The heartbeat interval can be set. - Volume names may now only contain letters, numbers, colon, period, dash, and underscore. +- Added readline to depkgs (removed from depkgs1) and fixed configuration if + it is not installed in your system libraries. Other Changes this Release: @@ -24,7 +27,8 @@ Other Changes this Release: - Improvements to gnome-console. - Prune certain orphaned jobs (no files saved, no Volume used). - Added non-fatal errors to Job reports. -- Eliminate need for SubsysDirectory in each daemon. +- Eliminate need for SubsysDirectory in each daemon -- please remove + these records from your .conf files. - Add a lot more "command line" options to console commands. - More info in traceback (database type, ...). - Better handling of errors with autochangers during restore. @@ -32,12 +36,50 @@ Other Changes this Release: to cleanup twice). - SD error messages such as autochanger errors are now properly directed back to Console -- previously some were lost. +- A Storage daemon crash on FreeBSD systems (due to an improper FreeBSD + pthreads implementation -- IMO) is fixed. +- Better Job termination report particularly for Verify and Restore jobs. +- Update Verify VolumeToCatalog to use new BSR records. +- Fixed list last 20 jobs in restore command (previously reported any + 20 jobs). +- Gnome command line history works better. +- Better messages if a job is upgraded from Diff or Inc to Full. Items to note: !!!!! - For MySQL users, you must have the thread safe client libraries available. If you build MySQL yourself, add the --enable-thread-safe-client - option on the ./configure. + option on the ./configure. You will most likely need to do an ldconfig. + Please see the installation documentation for building MySQL. - Version 1.31 and 1.30 daemons/Director are not compatible. You must upgrade all or nothing. +- The format of the catalog database has changed, so you must either + re-initialize your database (losing all the old info) with: + + ./drop_bacula_tables + ./make_bacula_tables + + or you can use the appropriate script (you must choose the name according + to which database you have) in the /src/cats directory. + + BEFORE APPLYING THE ALTER SCRIPT PLEASE BACKUP YOUR DATABASE. Do one + of the following only if you wish to keep your old tables (not doing + the re-initialize documented above), and do this only after configuring + an building the new Bacula, but before trying to run it: + + MySQL: + cd working-directory (or where you want to backup the catalog) + mysqladmin -f --opt bacula >bacula.sql + cd /src/cats + ./alter_mysql_tables + + SQLite: + cd working-directory + echo '.dump' sqlite bacula.db >bacula.sql + cd /src/cats + ./alter_sqlite_tables + + When you are sure that Bacula is running with your upgraded database, + please delete the bacula.sql copy you made. + diff --git a/bacula/kernstodo b/bacula/kernstodo index 4f37ad34ed..27cb30d5b8 100644 --- a/bacula/kernstodo +++ b/bacula/kernstodo @@ -30,6 +30,13 @@ Testing to do: (painful) - Figure out how to use ssh or stunnel to protect Bacula communications. For 1.31 release: +- Instrument use_count on DEVICE packets and ensure that the device is + being close()ed at the appropriate time. +- Check if Incremental is working correctly when it looks for the previous Job + (Phil's problem). +- Add next Volume to be used to status output. +- Add a recycle command. +- Command to determine next volume needed for a particular job. - Make bootstrap filename unique. - Implement FileSet VolIndex. - Sort JobIds entered into recover tree. @@ -916,4 +923,3 @@ Done: (see kernsdone for more) - The "List last 20 Jobs run" doesnt work correctly in restore. It doesnt show the last 20 jobs , but some older ones. - Fix Verify VolumeToCatalog to use BSRs -- it is broken. - diff --git a/bacula/src/stored/stored_conf.c b/bacula/src/stored/stored_conf.c index 4704eca681..2c3c0ed482 100644 --- a/bacula/src/stored/stored_conf.c +++ b/bacula/src/stored/stored_conf.c @@ -96,7 +96,6 @@ static struct res_items dev_items[] = { {"randomaccess", store_yesno, ITEM(res_dev.cap_bits), CAP_RACCESS, 0, 0}, {"automaticmount", store_yesno, ITEM(res_dev.cap_bits), CAP_AUTOMOUNT, ITEM_DEFAULT, 0}, {"labelmedia", store_yesno, ITEM(res_dev.cap_bits), CAP_LABEL, ITEM_DEFAULT, 0}, - {"mountanonymousvolumes", store_yesno, ITEM(res_dev.cap_bits), CAP_ANONVOLS, ITEM_DEFAULT, 0}, {"alwaysopen", store_yesno, ITEM(res_dev.cap_bits), CAP_ALWAYSOPEN, ITEM_DEFAULT, 1}, {"autochanger", store_yesno, ITEM(res_dev.cap_bits), CAP_AUTOCHANGER, ITEM_DEFAULT, 0}, {"changerdevice", store_strname,ITEM(res_dev.changer_name), 0, 0, 0}, @@ -114,6 +113,9 @@ static struct res_items dev_items[] = { {NULL, NULL, 0, 0, 0, 0} }; +// {"mountanonymousvolumes", store_yesno, ITEM(res_dev.cap_bits), CAP_ANONVOLS, ITEM_DEFAULT, 0}, + + /* Message resource */ extern struct res_items msgs_items[]; diff --git a/bacula/src/version.h b/bacula/src/version.h index ca803f8421..5b3cc3ebd3 100644 --- a/bacula/src/version.h +++ b/bacula/src/version.h @@ -1,8 +1,8 @@ /* */ #define VERSION "1.31" #define VSTRING "1" -#define BDATE "03 Jun 2003" -#define LSMDATE "03Jun03" +#define BDATE "04 Jun 2003" +#define LSMDATE "04Jun03" /* Debug flags */ #define DEBUG 1 -- 2.39.5