Commit Graph

5339 Commits

Author SHA1 Message Date
Dominik Csapak
ccb614311d status/influxdb: implement influxdb 2.x http api
needs an organization/bucket (previously db) and an optional token
the http client does not fit exactly in the connect/send/disconnect
scheme, so it simply creates a request in 'connect',
does the actual http connection in 'send' and nothing in 'disconnect'

max-body-size is set to 25.000.000 bytes by default (the influxdb default)
and the timeout to 1 second (same as default graphite tcp timeout)

the token (if given) gets saved in /etc/pve/priv/metricserver/$ID.pw
it is optional, because the 1.8.x compatibility api does not need
authentication (in contrast to influxdb 2.x)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-01-28 17:32:23 +01:00
Dominik Csapak
27bc5e8e02 status/plugin: extend with add/update/delete hooks
like we do in it for the storage section configs

we will need this to store the token for influxdbs http api

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-01-28 17:32:23 +01:00
Dominik Csapak
fa97819773 status/plugin: extend send/_connect/_disconnect/test_connection
by providing the id or cfg to have better context in those methods
we will need that for influxdb http api

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-01-28 17:32:23 +01:00
Dominik Csapak
161d904f13 api: cluster/metricserver: prevent simultaneosly setting and deleting of property
like we do in other apis of section configs (e.g. storage)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-01-28 17:32:23 +01:00
Fabian Ebner
8672c64e90 pvereport: also add .sources files
while this format is probably not much in use currently, the plan is to make it
the default format in Debian, see 'man 5 sources.list'.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-01-28 16:44:39 +01:00
Fabian Ebner
ecc08c34ea vzdump: avoid parsing already parsed option
When a job is updated, verify_vzdump_parameters() is called twice. This led to
parse_property_string being called with the already parsed option.

Reported on the pve-user mailing list:
https://lists.proxmox.com/pipermail/pve-user/2021-January/172258.html

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-01-26 18:47:48 +01:00
Stoiko Ivanov
ea717e8f66 pvereport: add apt sources
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2021-01-26 18:45:52 +01:00
Fabian Ebner
b6b4c816a4 ui: ceph: fix keeping selection after operation
Found by having the console open and getting a message that 'me' (the
controller) does not have a method getRootNode()

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-01-26 18:21:44 +01:00
Thomas Lamprecht
fa8d397162 ui: eslint: some more trailing comma fixes
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-19 17:48:50 +01:00
Thomas Lamprecht
399ffa767f ui: eslint: enforce "dot-notation" rule
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-19 17:45:01 +01:00
Thomas Lamprecht
d2021707e3 ui: eslint: enforce "no-extra-boolean-cast" rule
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-19 17:43:40 +01:00
Thomas Lamprecht
53e3ea8488 ui: eslint: enforce "no-extra-parens" rule
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-19 17:42:36 +01:00
Thomas Lamprecht
ef725143c6 ui: eslint: enforce "no-unneeded-ternary" rule
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-19 17:41:11 +01:00
Thomas Lamprecht
8058410f40 ui: eslint: fix various spacing related issues
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-19 17:39:15 +01:00
Thomas Lamprecht
f6710aac38 ui: eslint: fix trailing comma and comma related whitespaces errors
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-19 17:31:03 +01:00
Thomas Lamprecht
2a4971d8c9 ui: eslint: fix trailing spaces
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-19 17:29:55 +01:00
Thomas Lamprecht
e3aed879e4 ui: tfa/totp: fix setting issuer in secret URL
it's recommended to set the issuer for both, the get parameter and
the initial issuer label prefix[0].

[0]:
https://github.com/google/google-authenticator/wiki/Key-Uri-Format#label

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-18 16:29:51 +01:00
Thomas Lamprecht
7a077bb5ea ui: qemu/audio: improve displayed text for backend drivers
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-12 13:09:33 +01:00
Thomas Lamprecht
32b73cb2c6 ui: qemu/audio: submitValue is default true for combobox
this was previously a display field, where submitValue defaults to
false, so we required to enable it explicitly. As it changed to a
combo box we can drop that.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-12 13:08:04 +01:00
Gilles Pietri
bf14dcd87f ui: qemu: add the none audio driver as an option
Signed-off-by: Gilles Pietri <contact+dev@gilouweb.com>
2021-01-12 12:53:37 +01:00
Dominic Jäger
410198ac83 ui: add netdevice: fix #3203: Use OS default model
In the VM create wizard we automatically set e1000 for Windows and virtio for
Linux.  We should also do this when adding a network device in the hardware
view.

OSDefaults.generic.networkCard (=e1000) is always available.  Hence, leave this
as default value for the field and then try to get the ostype via API and
overwrite the default e1000.

Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
2021-01-12 11:47:02 +01:00
Dominic Jäger
b37ea2a130 ui: acme: Remove false gettexts
Translating these is not useful; e.g. API would be translated to API in German.

Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
2021-01-12 11:39:45 +01:00
Thomas Lamprecht
c83c3d456d report: fix separation of commands over multiple lines
once we get over the allowed line length we must move each atom
(e.g., argument or other value) to a separate line, not pairing a
few.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-12-21 17:00:49 +01:00
Aaron Lauterer
583516aee7 pvereport: code cleanup, line length
Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2020-12-21 16:54:34 +01:00
Aaron Lauterer
efef17e0ec pvereport: rework report contents
add:
* HA status
* ceph osd df tree
* ceph conf file and conf db
* ceph versions

removed:
* ceph status, as pveceph status is now printing the same information

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2020-12-21 16:54:34 +01:00
Aaron Lauterer
662a87e559 pvereport: fix multipath inclusion
we now push it to the correct hash if it is installed

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2020-12-21 16:54:34 +01:00
Fabian Ebner
5a9b791b47 vzdump: fix error format for errors coming from storage_info
Errors from storage_info() are newline-terminated, because perl would append
the line number otherwise. Chomp those errors, because sendmail() relies
on the presence of a newline to decide if it's multiple problems or only one.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-12-21 15:29:02 +01:00
Fabian Ebner
213e0eb263 vzdump: sendmail: fix html by closing the tags
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-12-21 15:29:02 +01:00
Fabian Ebner
dd5d80f56a vzdump: defaults: convert to prune-backups early enough
Fixes the case where reading from /etc/vzdump.conf fails.

Also convert the options read from /etc/vzdump.conf before the loop. That
avoids showing a wrong warning when 'prune-backups' is configured in
/etc/vzdump.conf, and maxfiles isn't. Previously, because 'maxfiles' from the
schema defaults was automatically set, the call to parse_prune_backups_maxfiles
after the loop threw the warning that both options are defined.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-12-21 15:29:02 +01:00
Thomas Lamprecht
ab459f6da0 pveceph: add timeout to status command
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-12-21 15:19:40 +01:00
Aaron Lauterer
1baeb2d130 pveceph: change status from long JSON to ceph -s
Printing a lot of very detailed JSON output on the CLI is not very
useful.

Printing the `ceph -s` overview is much more suited to give an overview
of the ceph cluster status.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2020-12-21 14:21:35 +01:00
Dominic Jäger
a7221f8b23 safe destroy: Add HA to purge tooltip
This makes the enumeration complete.

Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
2020-12-18 17:56:44 +01:00
Aaron Lauterer
a0cb211a4f ui: improve description of guest-fstrim checkbox
The phrasing left some room to speculation when this would actually be
run, e.g. after cloning a full VM?

Currently the only instances where it is used is after moving a disk or
migrating a VM.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2020-12-18 17:54:39 +01:00
Stoiko Ivanov
e881cf2a23 ceph: extend error for wrong config-file link
Since I had to look up the cause of the error-message in our source
explaining why exactly ceph-operations fail, because
/etc/ceph/ceph.conf exists.

reported via our community forum:
https://forum.proxmox.com/threads/osd-ersetzen-neu-erstellen.80793/

quickly tested on a virtual ceph cluster

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2020-12-18 17:51:31 +01:00
Thomas Lamprecht
45d267c666 update aplinfo
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-12-11 09:59:25 +01:00
Dominik Csapak
5a7252df23 status/plugin: do not test connection if disabled
so that if one disables the plugin (e.g. because it is offline),
it will work even when the server is not reachable

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-12-07 17:20:54 +01:00
Fabian Ebner
fb6871fc7f vzdump: use debugmsg instead of warn
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-12-07 09:31:12 +01:00
Fabian Ebner
f1dd762969 vzdump: warn when both storage and dumpdir are defined in vzdump.conf
and prefer storage, because the storage configuration might contain more
settings. Warning is preferable over dying, because all backups would be
affected (even if they don't use the vzdump.conf parameters) and the settings
could've been compatible (i.e. dumpdir being the storage's dump dir). Previously
one of the two options would randomly be chosen in the loop in new(), because of
perl hash iteration.

Reported here: https://forum.proxmox.com/threads/vzdump-times-out-very-often-on-zfs-storage-pool.80035/post-354277

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-12-07 09:31:12 +01:00
Thomas Lamprecht
ad2e3a0907 bump version to 6.3-3
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-12-03 18:14:49 +01:00
Dominik Csapak
ce251651a4 pvestatd: fix container cpuset scheduling
Since pve-container commit

c48a25452dccca37b3915e49b7618f6880aeafb1

the code to get the cpuset controller path lives in pve-commons PVE::CGroup.
Use that and improve the logging in case some error happens in the future.
Such an error will only be logged once per pvestatd run,
so it does not spam the log.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-12-03 16:33:50 +01:00
Dominik Csapak
06c8315d86 fix #3182 #3183: change backup retention mask logic
instead of relying on the contentTypeField (which does not need to
exists, e.g. for iscsi), explicitely write it into the panel/icon
mapping and check that

better would be if we query the backend about storage capabilities,
but such an api call does not exist yet, so this should be ok for now

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-12-02 18:03:23 +01:00
Thomas Lamprecht
492d4039a6 test: allow running replication tests in parallel
running multiple workers reduces built time from >3s to ~0.6s here.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-12-02 18:00:47 +01:00
Thomas Lamprecht
d59f1fa868 test: replication: cleanup use statements
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-12-02 17:59:51 +01:00
Thomas Lamprecht
41303e9779 test: buildsys: allow to execute vzdump tests in parallel
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-12-02 16:19:34 +01:00
Thomas Lamprecht
13f8e3b073 test: buildsys: rework target names, prefix with test
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-12-02 16:18:41 +01:00
Fabian Ebner
acc963c3e5 vzdump: defaults: correctly parse prune-backups and convert maxfiles
Also simplify handling in new(), now that we never have maxfiles there anymore.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-12-02 13:15:52 +01:00
Fabian Ebner
1c56bcf39d vzdump: convert maxfiles CLI parameter to prune-backups
in preparation to clean up handling in new().

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-12-02 13:15:52 +01:00
Fabian Ebner
e2aac8cc8c vzdump: storage_info: adapt to new maxfiles backend behavior
It's automatically converted to prune-backups when using storage_config() now.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-12-02 13:15:52 +01:00
Fabian Ebner
550d8e71e6 test: add tests for retention parameters for vzdump's new()
To get a more complete picture, instead of mocking storage_config,
PVE::Cluster's get_config is mocked. This ensures that the prune-backups
validation and the maxfiles conversion are also called.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-12-02 13:15:52 +01:00
Thomas Lamprecht
f5b6ccb1d5 api: fixup: commit change to storage module
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-12-02 11:45:33 +01:00