Michal Rakowski [Fri, 23 Jul 2021 14:57:53 +0000 (16:57 +0200)]
Fix #6986 About mail wariables not working after conf reload
Callback for changing job codes was changed from being a global one to
per-jcr, so that when reload is executed it is not cleared and stays
until end of the job.
metaplugin: Extend query interface for unstructured data.
Now you can use a `Data` packet to respond with any data for
queryParameter() API. This data will be simply forwarded to
Bacula without scanning and interpretation by metaplugin.
With this patch you can receive information about a cancel event
as a SIGUSR1 signal. Now the backend can intercept this signal to
handle clean and finish procedures. After that for about 5 secs,
which is the default but you can customize it using
CUSTOMCANCELSLEEP compile-in variable, the backend receive
a termination - bpipe communication will be closed and SIGTERM
sent. It is assumed that after receiving SIGUSR1 no standard
metaplugin protocol communication is expected and supported.
In this case the metaplugin return bRC_Error on every plugin
entrypoint except freePlugin().
Michal Rakowski [Wed, 28 Apr 2021 11:38:12 +0000 (13:38 +0200)]
Introduce 'o' option for accurate backup
This feature can be used -only- if all of the daemons (DIR, SD and FD)
are updated to this version.
When the new 'o' accurate option is used, only metadata is being backed up in case file's
contents did not change (meaning that file's checksum stays the same).
New stream was added to handle that during the backup and restore
phase.
Michal Rakowski [Mon, 28 Jun 2021 07:02:02 +0000 (09:02 +0200)]
Fix #7671 About stopping job waiting for the device
1. Decrement timeout value for the running jobs when we are waiting on
SD to stop the job and free all it's JCRs related.
2. When 'stop' is called against job which has not been started, upgrade
command to 'cancel' instead and inform user about that.
Michal Rakowski [Mon, 28 Jun 2021 09:24:12 +0000 (11:24 +0200)]
Slighly change SSL_shutdown() err handling
Description:
Following the docs:
https://www.openssl.org/docs/manmaster/man3/SSL_shutdown.html
(...)
RETURN VALUES
The following return values can occur:
0
The shutdown is not yet finished: the close_notify was sent but the peer
did not send it back yet. Call SSL_read() to do a bidirectional
shutdown.
Unlike most other function, returning 0 does not indicate an error.
SSL_get_error(3) should not get called, it may misleadingly indicate an
error even though no error occurred.
(..)
Which means that SSL_get_error() should not be called straight after
SSL_shutdown() returned 0.
Eric Bollengier [Tue, 29 Jun 2021 16:43:15 +0000 (18:43 +0200)]
Fix org#2623 About .ls/estimate command not printing files correctly
In my Messages resource in FD config I don't have 'Restored' flag set:
Messages {
Name = "Standard"
Director = darkstar-dir = Info, Warning, Error, Fatal, Terminate, Saved, Security, Alert
}
In bacula/src/lib/attr.c:259 in print_ls_output() we have the following condition:
/* No need to compute everything if it's not required */
if (!chk_dbglvl(dbglvl) && !is_message_type_set(jcr, message_type)) {
return;
}
The dbglvl is set to 150 and message_type default is set to M_RESTORED. With my
FD configuration this condition was true but when I set debug level > 150 the
condition was false and .ls listing started working.
The workaround is to set Restored flag in the FD config in the Director
messages resource.
Eric Bollengier [Wed, 16 Jun 2021 15:49:09 +0000 (17:49 +0200)]
Fix db_get_accurate_jobids() with concurrent queries on the same jobs
The btemp3 table name is computed with the from_jobid argument in
the .bvfs_get_jobid command. If we have multiple requests at the
same time, as the tables are not TEMPORARY (due to a MySQL issue),
one query can drop the table of the other one and lead to problems.
Waiting to have the from_jobid feature fully implemented, the code
is removed.
If you want to add an automatic JobInfo variable then main plugin
file should define the following variable:
const bool CUSTOMPREVJOBNAME = true;
This variable is now required for a successful build of the plugin.