7056 Commits

Author SHA1 Message Date
Thomas Lamprecht
7521ec6492 d/source: override some false-positive lintian tags
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-21 14:55:06 +02:00
Thomas Lamprecht
9a8b9cbe45 d/file-restore.postinst: add DEBHELPER stanza
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-21 13:49:59 +02:00
Thomas Lamprecht
c7adb4c2ec d/control: avoid versioned build-dependcies with a -1 revision
no use, just makes backporting harder

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-21 13:49:01 +02:00
Thomas Lamprecht
3769706081 buildsys: always pre-clean for den and dsc target
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-21 13:42:19 +02:00
Thomas Lamprecht
8f8faa4541 buildsys: make deb target always build doc package, add deb-nodoc
deb should be our common "build all" target, so rather make the
exception a specific target than vice versa.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-21 13:41:23 +02:00
Thomas Lamprecht
86e4ad8ada buildsys: simplify getting workspace crate list
we got awk already in the mix, most of the time one doesn't need
anything else..

Also split over multiple lines for readability

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-21 13:32:45 +02:00
Thomas Lamprecht
a0ba21ec43 buildsys: get metadata only for workspace when resolving sub crates
Allows for building a DSC without having the librust-* source code
build-dependencies installed.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-21 13:17:55 +02:00
Thomas Lamprecht
e5b6a0b38d bump version to 2.4.2-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-17 17:43:17 +02:00
Thomas Lamprecht
e6868e4edf backup-client: clippy fixes
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-17 17:43:17 +02:00
Thomas Lamprecht
3165853468 file restore: clippy and format argument fixes
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-17 17:43:17 +02:00
Thomas Lamprecht
a57413a54c pbs-datastore: clippy fixes
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-17 17:43:17 +02:00
Thomas Lamprecht
3db2022713 pbs-client: clippy fixes
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-17 17:43:17 +02:00
Thomas Lamprecht
82302ae27f pbs-tape: clippy and format string fixes
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-17 17:43:17 +02:00
Thomas Lamprecht
82c0194efd pbs-config: clippy fixes
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-17 17:43:17 +02:00
Thomas Lamprecht
b6e7fc9bec clippy fixes
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-17 17:43:17 +02:00
Thomas Lamprecht
48efb5268d datastore: return error instead of unreachable
very unexpected and unreachable is probably fine here, but it's not
really winning us anything, so avoid the panic-potential and just
bail out.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-17 16:06:28 +02:00
Thomas Lamprecht
f09b5afdcd tape: MAM: replace tuple with struct for better readability
It's needlessly adding mental complexity to always have to translate
usages like info.0 or info.1 in ones head when reading the code.

Transforming this to a struct allows for using descriptive names when
accessing the specific fields and allows for implementing a
constructor per MamFormat, reducing the resulting MAM attribute list
by quite a few lines.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-17 15:52:27 +02:00
Thomas Lamprecht
a18a63c827 tape: avoid panic potential in MAM attribute decoder
We already saw that quite some tape libraries/loaders/... ain't
always _that_ standard conform, and even if it'd be guaranteed, it
just makes no sense to create a potential for panicking the whole
daemon due to some sub-features hiccup, rather go for actual error
handling...

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-17 14:57:20 +02:00
Thomas Lamprecht
a4ff2cdc54 tape: update link to IBM SCSI reference LTO 5 - 9
The linked PDF is also captured and archived here:
https://web.archive.org/web/20230517122521/https://www.ibm.com/support/pages/system/files/inline-files/LTO%20SCSI%20Reference_GA32-0928-05%20%28EXTERNAL%29_0.pdf#

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-17 14:55:20 +02:00
Thomas Lamprecht
1787725442 tape: reduce indentation depth of MAM attribute decoder
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-17 14:43:01 +02:00
Thomas Lamprecht
071d345781 datastore: fix compiler warning for unused FromStr import
Fixes: 161a8864 ("fix #4357: datastore: take into account namespaces ...")
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-17 14:33:23 +02:00
Stefan Sterz
18c2110b38 ui: main view: rename "Theme" selector to "Color Theme"
this is already the case in Proxmox VE so just use the same wording
here too to stay consistent

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
2023-05-17 11:39:54 +02:00
Stefan Sterz
41dbc8115d docs: fix api viewer dark theme path
previously the path to the dark theme's css pointed to the wrong file.
it didn't exist, this one should.

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
2023-05-17 11:39:54 +02:00
Stefan Sterz
161a88644f fix #4357: datastore: take into account namespaces when marking chunks
previously when marking used chunks the namespace wasn't taken into
account and valid snapshots were marked as "strange paths". this lead
to a line in the log of a gc job such as this:

found (and marked) 2 index files outside of expected directory scheme

which some users perceived as an error. parse the namespace too and
only mark the path as strange if parsing the namespace and/or backup
dir fails.

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
2023-05-17 11:35:08 +02:00
Dominik Csapak
df881ed0fc ui: tape: fix restoring a single datastore
if the user selected a single datastore to restore from tape on a
media-set that includes more than one, the ui suggests (and is
intended to) that only that datastore will be restored on the selected
target.

The logic to construct the store mapping parameter did not consider that
case, and simply gave the target as default store, which meant all
datastores were restored onto the target.

To fix that, we have to get the source datastore from the field, and
construct the correct parameter ("source=target").

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-05-17 11:28:23 +02:00
Dominik Csapak
84a91c5b93 ui: tape: fix code style/formatting
this is a separate statement, it should be on a separate line

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-05-17 11:28:08 +02:00
Dominik Csapak
0763ac140c ui: dashboard: show tape backups/restores on task summary
for that we have to increase the panel height a bit

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-05-17 11:23:54 +02:00
Dominik Csapak
21ff6e593b ui: dashboard: fix missing prune jobs on task summary
we want to count types 'prune' and 'prunejobs' for this

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-05-17 11:23:54 +02:00
Fabian Grünbichler
d5c03df552 fix #4722: allow all netmask values for reverse lookup
the only place this is used (parsing a 'netmask XXX' directive in an interfaces
file) allows any integer as value both when parsing and when validating, so
there is no reason to restrict this to only allow string netmasks >=
8/255.0.0.0 as far as I can tell..

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2023-05-17 11:02:46 +02:00
Thomas Lamprecht
214e187d4f ui: fix reloading subscription info after key upload
ExtJS has a `listeners` but no `listener` config, so add the missing
`s` to ensure the upload window destroy event callback is triggered.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-17 08:17:45 +02:00
Wolfgang Bumiller
3b7b52dcf8 disable tfa lockout for now
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-05-10 11:47:19 +02:00
Wolfgang Bumiller
edd0ea9729 bump proxmox-tfa dep to 4
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-05-10 11:43:27 +02:00
Dominik Csapak
bdce7fa154 fix #4719: wait for tape to be available in changer
instead of aborting. If the tape is currently e.g. offline, in an
import/export slot or in the wrong drive, this gives the user the chance to
manually move it/insert it, so that the backup job can continue.

Send an e-mail like we do on a standalone drive, but adapt the messages
to contain the changer instead of the drive.

This can help when not all tapes are currently available in the changer.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-05-09 10:23:51 +02:00
Dominik Csapak
2ebe7bb54a tape restore: show required tape list on single snapshot restore
like we do on a full restore, for that refactor the functionality into
'log_required_tapes' to be reused across the workers

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-05-09 10:10:39 +02:00
Thomas Lamprecht
018d29f727 docs: fix location of webauthn configuration
This was it's own panel for some time but moved into a more general
"Other" panel together with some other settings that are normally
only changed once, on initial setup (better names welcome...).

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-08 13:16:07 +02:00
Fabian Grünbichler
40a57cfab0 pull: impl Display for SkipReason
instead of manually doing it in SkipInfo's Display implementation.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2023-04-24 15:56:26 +02:00
Stefan Hanreich
73b53e4af5 ui: sync job: add transfer-last parameter
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
2023-04-24 15:19:07 +02:00
Stefan Hanreich
71db16151d sync job: pull: improve log output
Adding an opening line for every group makes parsing the log easier.

We can also remove the 're-sync [...] done' line, because the next
line should be a progress line anyway.

The new output for the sync job/pull logs looks as follows:

- skipped already synced (happens in most jobs, except for first run)
- re-sync of last synced snapshot (if it still exists on source)
- skipped because of transfer-last (if set and skips something)
- sync of new snapshots (if they exist)

Suggested-By: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
2023-04-24 15:18:58 +02:00
Stefan Hanreich
9b67352abc partial fix #3701: sync job: pull: add transfer-last parameter
Specifying the transfer-last parameter limits the amount of backups
that get synced via the pull command/sync job. The parameter specifies
how many of the N latest backups should get pulled/synced. All other
backups will get skipped.

This is particularly useful in situations where the sync target has
less disk space than the source. Syncing all backups from the source
is not possible if there is not enough disk space on the target.
Additionally this can be used for limiting the amount of data
transferred, reducing load on the network.

The newest backup will always get re-synced, regardless of the setting
of the transfer-last parameter.

Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
2023-04-24 15:18:51 +02:00
Dominik Csapak
73d471e90f ui: tape: prevent mislabeling tapes in changers
when labeling a tape in a changer, we pre-fill the label field with
the one from the barcode (if it exists). Letting the user change
the label here does not make much sense, since we assume that they are
the same (e.g. for move operations etc.)

So instead simply display the label to protect users from accidentally
changing it. If a user really needs to have a different label than the
suggested one, it's still possible on the cli.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-04-24 10:02:20 +02:00
Dominik Csapak
b1acea4f4d tape: typo fixes
replacable to replaceable
 the field 'field_replacable_unit_code' is not currently used anywhere
descriptior to descriptor
Resuqest to Request
and flags2 to flags3 (the number indicates the numbering of the field
 and it's the third field, not the second)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-04-24 09:53:58 +02:00
Dietmar Maurer
5d9e5fb475 tape: implement 6 byte fallback for MODE SENSE/SELECT
there are tape drives (esp. virtual ones) that don't implement the
10-byte variants of MODE SENSE/SELECT. Since the pages we set/request
are never bigger than 255 bytes anyway, we can implement a fallback
with the 6 byte variant here.

Implementing this as a fallback to make sure that existing working
drives keep the existing implementation.

Tested with Starwind VTL.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2023-04-24 09:40:23 +02:00
Fabian Grünbichler
e2f3f2d7da update to syslog 6
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2023-04-20 16:05:46 +02:00
Dominik Csapak
a7900d6e0b tape: continue without MAM media_usage page
sometimes we cannot parse these pages (e.g. vendor quirks that implement
the field differently)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-04-20 09:18:19 +02:00
Dominik Csapak
6fa3ab297f tape: use correct MAM attribute definitions
080Ch: it's binary not ascii, and the length is not specified
    (hp says 23-n bytes)
0820h and 0821h are also binary and not ascii

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-04-20 09:14:14 +02:00
Fabian Grünbichler
42018aeae5 chunk store: handle insertion edge cases
these were previously called out in a comment, but should now be handled (as
much as they can be).

the performance impact shouldn't be too bad, since we only look at the magic 8
bytes at the start of the existing chunk (we already did a stat on it, so that
might even be prefetched already by storage), and only if there is a size
mismatch and encryption is enabled.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
 [ T: fold in "just to be sure" touch_chunk calls ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-04-06 09:36:51 +02:00
Stefan Sterz
dcae9925e1 docs: make logo path and index link absolute
the relative path failed as some pages are more deeply nested, such as
the man page for `proxmox-tape`. this meant that on these pages the
logo wouldn't be displayed correctly and the link lead to a non-
existent file.

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
2023-04-06 08:47:27 +02:00
Stefan Sterz
fbd954e923 docs: dark theme, dim borders and minor fixups
this commit adjust several border colors that weren't styled before
and appeared too brightly. also add styles to the "hide search
matches" link that had poor contrasts before.

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
2023-04-06 08:47:27 +02:00
Stefan Sterz
c1ce8e563b docs: make dark mode variables more consistent
this commit roles some color values into variables, cleans up unused
variables and makes variable naming a bit more consistent.

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
2023-04-06 08:47:27 +02:00
Dominik Csapak
1b5cd72d79 api types: fix non-capturing group syntax
a non capturing group is '(?:)' not '(:?)' so fix that.
None of these regexes are used where would use capturing groups.
DATASTORE_MAP_REGEX and TAPE_RESTORE_SNAPSHOT_REGEX are only used
as api types and BLOCKDEVICE_NAME_REGEX is only used once outside of the
api and there we also don't look at the capturing groups.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-04-06 07:28:58 +02:00