Alain Spineux [Thu, 2 Feb 2023 13:32:54 +0000 (14:32 +0100)]
win32: fix HRESULT constant mismatch between signed and unsigned
- HRESULT is a 32bits signed value
- some constant are >= 0x80000000 that are out of the range of a signed 32
- An alternative would be to set the type casting inside the .h file in the
depkgs directory
- this concern (in 64bits)
- VSS_E_INVALID_XML_DOCUMENT
- VSS_E_OBJECT_NOT_FOUND
- VSS_E_BAD_STATE
- VSS_E_WRITER_INFRASTRUCTURE
- VSS_E_WRITER_NOT_RESPONDING
Alain Spineux [Tue, 31 Jan 2023 10:53:23 +0000 (11:53 +0100)]
fix key-manager.py local variable 'crypto_ctx' referenced before assignment
2023-01-31 11:55:22 ERR key-manager.py:471 unhandled exception in getkey0
Traceback (most recent call last):
File "/home/bac/workspace/bee/regress/bin/key-manager.py", line 469, in getkey
getkey0(args)
File "/home/bac/workspace/bee/regress/bin/key-manager.py", line 409, in getkey0
crypto_ctx=get_crypto_ctx_from_config(args, volume_name)
File "/home/bac/workspace/bee/regress/bin/key-manager.py", line 310, in get_crypto_ctx_from_config
return crypto_ctx
UnboundLocalError: local variable 'crypto_ctx' referenced before assignment
Alain Spineux [Fri, 6 Jan 2023 12:36:04 +0000 (13:36 +0100)]
fix Cannot free Volume XXX, because it is reserved by someone else
- when something goes wrong, sometime, the volume_unused() is not called
and the volume stay stuck
- always call volume_unused() in the "check_bail_out:"
- load_encryption_key() can return a new error: VOL_ENC_ERROR
that will trigger the call to volume_unused()
Eric Bollengier [Wed, 21 Dec 2022 09:35:31 +0000 (10:35 +0100)]
Fix #9764 Abort a job if a PluginOptions is incorrect
If a plugin is not installed and is specified with the Job PluginOptions, the
job simply terminated "Verify OK"
With other plugins, like the vSphere plugin, if the plugin is not installed,
but a Fileset calls it, we get a failed job and a warning about "command not
found" or similar.
The important part here is that if the plugin is missing, we end up with False
negatives that a sysadmin should be notified about.
Eric Bollengier [Mon, 12 Dec 2022 20:15:00 +0000 (21:15 +0100)]
Add Content preview to FileSet catalog record.
The FileSet catalog record is now created during the Director startup,
it was done during the Job creation.
The Content field will represent the FileSet overview.
If the FileSet has files and directories, it will contain "files"
If the FileSet has plugin entries, each plugin will be added to
the Content field.
Alain Spineux [Fri, 9 Dec 2022 14:36:57 +0000 (15:36 +0100)]
Fix #9724 empty EncryptionCommand crash the SD
- fix edit_device_codes() to handle NULL has empty format string
- test for empty EncryptionCommand at runtime and report a FATAL error.
tested for "label" and "run"
Alain Spineux [Thu, 8 Dec 2022 09:31:17 +0000 (10:31 +0100)]
k8s: Fix #9727 NoneType object is not subscriptable
- the code for get_pvcs() has changed and expect a tuple instead
of a dictionary
- also change get_pods() that don't handle error correctly
- the upstream code can handle a missing self.k8s['pvcs']
and will handle better pvcs_counter=0 and pods_counter=0 than
with an invalid value
Alain Spineux [Tue, 6 Dec 2022 10:35:08 +0000 (11:35 +0100)]
fix wrong "Last Volume Bytes" in VirtualFull
- the data was coming from the last volume that was READ instead
of the last WTRITTEN one
- the problem don't show up in copy/migrate
- unify the code to retrieve this information for VF & MAC
- extent get_job_volume_names() to also return the last written volume
Alain Spineux [Thu, 1 Dec 2022 10:45:28 +0000 (11:45 +0100)]
tweak improve code readability in cancel_cmd
- it is useless to test for nb != -1 because nb is always >=0
- maybe the idea behind the comment was to test for ret and not nb ???
- &= is a bitwise operator, not for boolean
- notice that the two lines below don't work the same because
ret = cancel_job(ua, jcr, 60, cancel) && ret;
ret = ret && cancel_job(ua, jcr, 60, cancel);
I chose the first one, but maybe because of the comment that I have
removed, we should use the first one
Alain Spineux [Wed, 30 Nov 2022 10:43:21 +0000 (11:43 +0100)]
tweak error code in block_utils.c
- there was 4 time the same code to handle a wrong BB0X header,
remove 3 of them and let the final "else" handle these errors
- there is no reason to handle any xxx3 as BB03 and LATER check if it is
BB03 and complain if it is not
- also used asciidump() to dump the bad ID to avoid invalid unicode char
Alain Spineux [Mon, 28 Nov 2022 09:20:23 +0000 (10:20 +0100)]
bscan: initialize the volume type using the device type
- bscan was initializing this value to ZERO and this was working as
expected because we include ZERO in our SQL query, like in :
AND VolType IN (0,%d)", mr->VolType)
- I have tested this with File (1) and Dedup (15) devices