Commit Graph

5868 Commits

Author SHA1 Message Date
Thomas Lamprecht
95f59d0b89 ui: dc/corosync-link: eslint fixes and code cleanup/refactoring
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-18 15:14:51 +02:00
Thomas Lamprecht
4ed38e2569 ui: dc/cluster: eslint fixes and code cleanup/refactoring
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-18 10:05:05 +02:00
Thomas Lamprecht
12809bba4f ui: dc/Backup: eslint fixes and code cleanup/refactoring
this one would deserve much more, especially the newer backup job
detail and not-backed-up view should be split out and done in a
declarative way (view view-controller)

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-17 20:40:11 +02:00
Thomas Lamprecht
1848bf9eb0 ui: dc/ACMEPlugins: eslint fixes and code cleanup/refactoring
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-17 20:11:28 +02:00
Thomas Lamprecht
cf696df332 ui: dc/ACLView: eslint fixes and code cleanup/refactoring
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-17 20:11:07 +02:00
Thomas Lamprecht
a0b5aa9096 ui: data/ResourceStore: eslint fixes and code cleanup/refactoring
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-17 20:03:47 +02:00
Thomas Lamprecht
f729096099 ui: buttons: eslint fixes and code cleanup/refactoring
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-17 19:58:52 +02:00
Thomas Lamprecht
063997ed16 ui: workspace: eslint fixes and code cleanup/refactoring
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-17 19:40:33 +02:00
Thomas Lamprecht
4d739f4a2a ui: utils: eslint fixes and code cleanup/refactoring
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-17 19:21:52 +02:00
Thomas Lamprecht
d6b661874c ui: state provider: try to find string encoded values in dictionary
My browser here is pretty fixated on the history, and due to some
unknown reason I got a history fragment string like:
`#v1:=0:=18:=4:::::::` so the "hashes" got into strings, and I was
not able to move them back.

Adding a match here to always try reverse-mapping the hash to the
original input helps to fix that here.

We'd only run into issues if we'd use a integer-string as id, but we
really don't (IIRC not even allowed in extjs) so this is safe to do.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-17 18:21:52 +02:00
Thomas Lamprecht
2f6cf848b6 ui: state provider: eslint fixes and code cleanup/refactoring
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-17 18:09:07 +02:00
Thomas Lamprecht
265f10ddac state provider: drop confirm-query when going back over initial history
eslint complains about the window.confirm call, and neither I nor
some other colleagues here did see that dialogue ever in practice.

The confirm here does not adds any real value, as all other back
navigation are unprotected, but have similar potential in loosing
state.

One can always navigate forward via their user agent and for console
(noVNC, xterm.js) we have now a separate check.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-17 17:30:39 +02:00
Thomas Lamprecht
0199b09144 ui: toolkit: eslint fixes
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-17 17:30:39 +02:00
Thomas Lamprecht
a3aef0f5d9 ui: parser: eslint fixes and refactoring
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-17 17:30:39 +02:00
Thomas Lamprecht
c4cfc250bb ui: parser: drop old openVZ parser
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-17 15:49:27 +02:00
Lorenz Stechauner
91c729d300 fix #3426: ui: parser: adapt parseSSHKey to accept "sk-" prefix
Signed-off-by: Lorenz Stechauner <l.stechauner@proxmox.com>
2021-05-17 15:42:49 +02:00
Lorenz Stechauner
963bb5c91f ui: cloudinit: use PVE.Parser.parseSSHKey
Signed-off-by: Lorenz Stechauner <l.stechauner@proxmox.com>
2021-05-17 15:42:11 +02:00
Fabian Grünbichler
58f763e1aa fix #3430: handle hook script paths better
if passing the hook script command as string, it might get interpreted
as shell command with side-effects. this is pretty harmless, since only
root is allowed to set the script parameter anyway, but making it more
robust and future-proof does not hurt.

tested with a reproducer of "/bin/echo $(touch $(whoami))" as script
parameter, with a file with that name existing, being executable and
having the following contents:

----8<----
echo "hello from hook script"
---->8----

without this change, the hookscript itself is not executed, but
'/bin/sh -c "/bin/echo $(touch $(whoami)) job"' and similar calls are,
which cause the file 'root' to be touched in the current working
directory of the vzdump process (or task worker).

with this change, the file is executed as is without any side-effects of
shell commands in the file name, and the 'hello from hook script' lines
are printed whenever the hook script is called by vzdump.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-05-17 09:49:34 +02:00
Thomas Lamprecht
cdb638259d report: top: also print command line arguments
at least the first 512 characters, which is the biggest width one can
instruct `top` too.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-11 16:27:30 +02:00
Thomas Lamprecht
bc415cf7cf report: top: list more processes and order them by CPU time spent
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-11 16:27:30 +02:00
Thomas Lamprecht
8b94e6bbd4 report: re-organize: add systemd-load, unify bios/pci in HW one
Also rename disks to blockdevices, as especially with the iSCSI stuff
the listed devices do not necessarily need to be real disks.

Grouping current(ish) load info in it's own system-load section seems
to be a better fit in general too.

bios/pci stuff is all hardware, so group it there to avoid adding to
much sections.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-11 16:27:30 +02:00
Thomas Lamprecht
6b72e9dd74 report: dir2text: print what we process on STDERR
to avoid those "lonely" "OK" prints for those

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-11 15:12:18 +02:00
Thomas Lamprecht
f784b92573 report: avoid extra oder array, define it inline
Makes all report-def entries hashes which allows to drop some
handling for the ARRAY ref case.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-11 15:02:38 +02:00
Thomas Lamprecht
3a0b2c40d2 report: avoid adding to report by side-effects, be more explicit
And move the helper methods up and scope them to module-local only

Uses the fact that perl methods return the last statement, so the
dir2text sub closures in the command list do not need to be changed

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-11 14:28:47 +02:00
Thomas Lamprecht
73cdcc98be report: set timeout and PATH env only locally
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-11 14:27:40 +02:00
Thomas Lamprecht
fb925d656a report: whitespace cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-11 14:26:15 +02:00
Oguz Bektas
4befa0abe0 pvereport: get pressure stall information
PSI can be queried in /proc/pressure/{cpu,io,memory} for the
corresponding resources. this helps us track down disruptions caused
by resource overcommitment.

Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
2021-05-11 14:07:25 +02:00
Lorenz Stechauner
230c4416f2 api: pools: fix typo/syntax error
Signed-off-by: Lorenz Stechauner <l.stechauner@proxmox.com>
2021-05-10 17:12:17 +02:00
Thomas Lamprecht
274a0e2394 api: pools: whitespace, indentation and code cleanups
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-09 18:58:42 +02:00
Thomas Lamprecht
926ce2b8d9 api: pools: whitespace, indentation and code cleanups
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-09 18:52:28 +02:00
Thomas Lamprecht
400d6ce399 bump version to 6.4-6
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-07 18:19:43 +02:00
Stoiko Ivanov
36ad2b3c0e proxy: fix wildcard address use
This patch fixes a regression for hosts disabling ipv6 via kernel
commandline ('ipv6.disable=1')introduced in commit
e224b7d2e6
(disabling IPv6 via sysctl did not exhibit these problems)

by hardcoding the address to '::', pveproxy and spiceproxy failed to
start with:
'unable to create socket - Address family not supported by protocol'

This patch depends on the commit in pve-common, which tries first
binding to '::' and then falling back to '0.0.0.0', and needs a
versioned dependency bump on libpve-common-perl.

With this patch the listening addresses are (`ss -tlnp |grep 8006` output)
* ipv6 disabled via kernel cmdline: '0.0.0.0:8006'
* sysctl net.ipv6.conf.all.disable_ipv6=1: '*:8006'
* sysctl net.ipv6.bindv6only=1: '[::]:8006'
* else: '*:8006'

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2021-05-07 18:15:43 +02:00
Thomas Lamprecht
55871e9e34 ui: storage status: use SI units for usage for consitency with RRD chart
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-07 18:15:05 +02:00
Thomas Lamprecht
87fd494fe5 update aplinfo.dat
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-07 10:05:47 +02:00
Thomas Lamprecht
96d4c3b4a6 api: acme: fix API index entry for challenge-schema
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-05 15:52:49 +02:00
Thomas Lamprecht
6110ed0348 api: nodes: whitespace cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-04 11:58:55 +02:00
Thomas Lamprecht
73bf05bb0a bump version to 6.4-5
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-03 15:06:52 +02:00
Thomas Lamprecht
aa396ea6b3 Revert "fix #2745: ui: backup: allow specifying remove parameter for manual backup"
Pushed this one out by mistake when commit a fixup, so do revert now
as I did not fully reviewed it and saw some UI changes I'd like to
do.

This reverts commit cfc6d15ed0.
2021-05-03 14:41:15 +02:00
Thomas Lamprecht
37bf860e3e pveceph: fixup syntax issue
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-03 14:38:16 +02:00
Fabian Ebner
cfc6d15ed0 fix #2745: ui: backup: allow specifying remove parameter for manual backup
and also show the retention options that will be used for a given storage. A
user with Datastore.AllocateSpace and VM.Backup can already remove backups from
the GUI manually, so it shouldn't be a problem if they can set the remove flag
when starting a manual backup in the GUI.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-05-03 14:36:59 +02:00
Fabian Ebner
fddb041217 ui: backup: fill in some of the configured vzdump defaults
Do not fill in the default for compression, because the initial default for the
backend is to not compress, while the current default for the UI is zstd, which
is preferable.

The 'defaults' API call expects the user to have permissions on the storage,
because retention options are storage-dependent. Use a flag initialDefaults to
make sure storage-independent properties are only set once, so they are not
reset when a user changes the storage after editing them.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-05-03 14:36:59 +02:00
Fabian Ebner
5b9a4030dd api: vzdump: add call to get currently configured vzdump defaults
on a given node (and storage).

There is no datacenter/storage fallback for the bandwidth limit, so the default
can just be returned as is. While the bandwidth limit is a root-only option when
executing the backup, it still makes sense to return it for all users, so they
can see what's going to be used.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-05-03 14:36:59 +02:00
Thomas Lamprecht
f8b7b9e143 ui: ceph code cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-03 14:35:43 +02:00
Thomas Lamprecht
ece49b3c90 ceph: reload API daemons after installation
To make them load the updated librados2, as else they may potentially
not be able to communicate with the potentially newer ceph monitors,
as Debian 10 ships Jewel (12.2) by default...

While we could do some more fancy signaling to the workers to reload
the lib, that is rather a PITA and complex solution for something
that happens once in a blue moon.

We may want to add a trigger in ceph for this on updates though, that
would effectively fix this too - but needs to be thought out better.
So for now lets go with the simplest solution.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-03 14:32:50 +02:00
Thomas Lamprecht
51498a2664 ceph: code/indentation cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-03 14:03:32 +02:00
Thomas Lamprecht
c0d51f284a bump version to 6.4-4
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-27 13:03:58 +02:00
Thomas Lamprecht
0dd48804e1 api: ceph/monitor: automatically disable insecure global ID reclaim after creating first monitor
nautilus 14.2.20 and octopus 15.2.11 fixed a security issue with
reclaiming the global ID auth (CVE-2021-20288). As fixing this issue
means that older client won't be able to connect anymore, the fix was
done behind a switch, with a HEALTH warning if it was not active
(i.e., disallowed connection from older clients).

New installations have this switch also at the insecure level, for
compat reasons, so lets deactivate it ourself after monitor creation
to avoid the health warning and slightly insecure setup (in default
PVE ceph the whole issue was of rather low impact/risk). But, only do
so when creating the first monitor of a ceph cluster, to avoid
breaking existing setups by accident.

An admin can always switch it back again, e.g., if they're recovering
from some failure and need to setup fresh monitors but have still old
clients.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-27 12:35:34 +02:00
Thomas Lamprecht
d26556c07b pveceph: octopus is OK and wanted to be installed/used
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-27 12:27:32 +02:00
Thomas Lamprecht
7e4adde160 bump version to 6.4-3
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-26 20:20:00 +02:00
Thomas Lamprecht
97edb617c4 ui: rbd: move namespace to advanced section
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-26 20:16:45 +02:00