]> git.proxmox.com Git - pve-manager.git/log
pve-manager.git
4 years agoRemove unused code
Wolfgang Link [Thu, 16 Apr 2020 05:18:25 +0000 (07:18 +0200)]
Remove unused code

Signed-off-by: Wolfgang Link <w.link@proxmox.com>
4 years agoExtend node config in the acme section.
Wolfgang Link [Thu, 16 Apr 2020 05:18:23 +0000 (07:18 +0200)]
Extend node config in the acme section.

Allow additional domains with different sub-plugins,
However, only one domain per additional entry is permitted.

Signed-off-by: Wolfgang Link <w.link@proxmox.com>
4 years agoUse the plugin architecture.
Wolfgang Link [Thu, 16 Apr 2020 05:18:21 +0000 (07:18 +0200)]
Use the plugin architecture.

And remove the call of standalone plugin directly.
Prepare all necessary data for the plugin.

Signed-off-by: Wolfgang Link <w.link@proxmox.com>
4 years agoui: fix indentation, again ...
Thomas Lamprecht [Sun, 3 May 2020 12:08:42 +0000 (14:08 +0200)]
ui: fix indentation, again ...

exact same thing commit 67cb91e4d7c98ab8cf4d8047af5e3789932bb52c
already did for the old location of this, but indentation error was
introduced again when moving it (fix y'all editors..)

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agobump version to 6.1-9
Thomas Lamprecht [Wed, 29 Apr 2020 15:15:53 +0000 (17:15 +0200)]
bump version to 6.1-9

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoui: realm sync: add some empty texts and specifiy what gets purged
Thomas Lamprecht [Wed, 29 Apr 2020 14:47:26 +0000 (16:47 +0200)]
ui: realm sync: add some empty texts and specifiy what gets purged

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoui: dc/Auth: add sync button
Dominik Csapak [Wed, 29 Apr 2020 12:32:35 +0000 (14:32 +0200)]
ui: dc/Auth: add sync button

opens a window with the parameters for the sync and two buttons:
'preview' and 'sync'

both open the taskviewer, but the 'preview' one sets the 'dry-run'
parameter so that it does not get written out to the user.cfg

loads the realm config and prefills the selection with values from
the config, and shows a hint about where to set the defaults
if none are set

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoui: don't block offline migration due non-referenced disk in the config
Fabian Ebner [Thu, 16 Apr 2020 12:54:44 +0000 (14:54 +0200)]
ui: don't block offline migration due non-referenced disk in the config

All local disks can/will be migrated if not for a reason we don't
know about yet at this stage. The disks we get from the API call as
'local_disks' are either referenced by the config or by snapshots in
the config (which was not checked for and the reason one could run
into the 'else if' branch).

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoupdate shipped appliance index for PMG 6.2
Thomas Lamprecht [Tue, 28 Apr 2020 09:03:28 +0000 (11:03 +0200)]
update shipped appliance index for PMG 6.2

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agocert renew: note reason why renewal due to long lifetime is done
Thomas Lamprecht [Mon, 27 Apr 2020 16:28:59 +0000 (18:28 +0200)]
cert renew: note reason why renewal due to long lifetime is done

4 years agocerts: early renew long-lived certificates
Fabian Grünbichler [Thu, 23 Apr 2020 10:20:02 +0000 (12:20 +0200)]
certs: early renew long-lived certificates

if our self-signed certificate expires in more than 825 days, but was
created after July 2019 it won't be accepted by modern Apple devices. we
fixed the issuance to generate shorter-lived certificates in November
2019, this cleans up the existing ones to fix this and similar future
issues.

two years / 730 days as cut-off was chosen since it's our new maximum
self-signed certificate lifetime, and should thus catch all old-style
certificates.

another positive side-effect is that we can now phase out support for
older certificates faster, e.g. if we want to move to bigger keys,
different signature algorithms, or anything else in that direction.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
4 years agoui: dc/AuthEdit: add sync tab for ldap/ad realms
Dominik Csapak [Thu, 9 Apr 2020 14:10:48 +0000 (16:10 +0200)]
ui: dc/AuthEdit: add sync tab for ldap/ad realms

this modifies AuthEditBase so that if there is a sync inputpanel specified,
we display it in a second tab (we need to modify the bodyPadding here,
else the whole window has too much padding)

we use the same panel for both ldap/ad, since the most options behave
the same (except for user_attribute, but the default for AD is
sAMAccount which i think is good enough for now, users can still
override it in the cli)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoupdate aplinfo
Thomas Lamprecht [Mon, 27 Apr 2020 08:08:10 +0000 (10:08 +0200)]
update aplinfo

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoui: auth realm: do not delete tfa if empty on create
Thomas Lamprecht [Sun, 26 Apr 2020 11:33:46 +0000 (13:33 +0200)]
ui: auth realm: do not delete tfa if empty on create

that breaks the schema as the POST endpoint obviously doesn't knows
about a delete property.

fixes commit 58e1ccc4f526f104caddec0552cafac576452139

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoui: auth base: fix setting auth type in onGetValues
Thomas Lamprecht [Sun, 26 Apr 2020 11:26:50 +0000 (13:26 +0200)]
ui: auth base: fix setting auth type in onGetValues

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoui: indentation fix
Thomas Lamprecht [Sun, 26 Apr 2020 11:26:26 +0000 (13:26 +0200)]
ui: indentation fix

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoui: dc/AuthView: refactor panel
Dominik Csapak [Thu, 9 Apr 2020 14:10:46 +0000 (16:10 +0200)]
ui: dc/AuthView: refactor panel

use more static declarations
move functions to class
use modern js features

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoui: Utils: delete_if_default: add values by correct type
Dominik Csapak [Thu, 9 Apr 2020 14:10:47 +0000 (16:10 +0200)]
ui: Utils: delete_if_default: add values by correct type

if 'delete' is an Array, we want to push into it, not append a string
this could be an issue when we use an edit window with multiple inputpanels
and deleteEmpty set on some fields

we then could have an aray like this:

values: {
    delete: [
'foo',
'bar',
'baz, qux',
    ],
},

which the edit window does not handle correctly anymore
(it only does string splitting if 'delete' itself is a string)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoui: dc/Auth*: refactor AuthEdit
Dominik Csapak [Thu, 9 Apr 2020 14:10:45 +0000 (16:10 +0200)]
ui: dc/Auth*: refactor AuthEdit

similar to storage/Base.js so that we have the different
RealmTypes in different inputpanels

this will come in handy when we define sync options

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoui: storageSchema: add PBS and fix trailing comma
Thomas Lamprecht [Sun, 26 Apr 2020 11:07:49 +0000 (13:07 +0200)]
ui: storageSchema: add PBS and fix trailing comma

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoui: tfa selector code/spelling nit fix
Thomas Lamprecht [Sun, 26 Apr 2020 10:55:38 +0000 (12:55 +0200)]
ui: tfa selector code/spelling nit fix

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoui: dc/AuthEdit: refactor TFASelector in its own component
Dominik Csapak [Thu, 9 Apr 2020 14:10:44 +0000 (16:10 +0200)]
ui: dc/AuthEdit: refactor TFASelector in its own component

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoadd Language selection in user menu
Dominik Csapak [Fri, 17 Apr 2020 11:23:36 +0000 (13:23 +0200)]
add Language selection in user menu

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoui: drop login-user fixed token edit due to multi window/z-index issues
Thomas Lamprecht [Sun, 26 Apr 2020 10:29:24 +0000 (12:29 +0200)]
ui: drop login-user fixed token edit due to multi window/z-index issues

We normally do not stack windows and it breaks/allows some funky
stuff.. As this isn't really required and can be done just fine over
the the DC -> Token panel, especially as we prefill the username to
the logged in one for new tokens now..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoui token edit: add online help and fix subject
Thomas Lamprecht [Sun, 26 Apr 2020 10:25:14 +0000 (12:25 +0200)]
ui token edit: add online help and fix subject

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoui: api token: rewrite
Thomas Lamprecht [Wed, 1 Apr 2020 15:14:11 +0000 (17:14 +0200)]
ui: api token: rewrite

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoui: token selector: refactor to more schematic approach
Thomas Lamprecht [Mon, 30 Mar 2020 08:44:50 +0000 (10:44 +0200)]
ui: token selector: refactor to more schematic approach

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoui: add TokenView with fixed userid
Fabian Grünbichler [Tue, 21 Jan 2020 12:54:29 +0000 (13:54 +0100)]
ui: add TokenView with fixed userid

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
4 years agoui: add Token to ACL
Fabian Grünbichler [Tue, 21 Jan 2020 12:54:28 +0000 (13:54 +0100)]
ui: add Token to ACL

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
4 years agoui: add Token Panel + Edit Window
Fabian Grünbichler [Tue, 21 Jan 2020 12:54:27 +0000 (13:54 +0100)]
ui: add Token Panel + Edit Window

modeled after UserView and related code.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
4 years agoui: format_sdnzone_type: uppercase
Thomas Lamprecht [Sat, 25 Apr 2020 16:24:53 +0000 (18:24 +0200)]
ui: format_sdnzone_type: uppercase

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoui/sdn: better spelling and code cleanup
Thomas Lamprecht [Wed, 22 Apr 2020 13:06:30 +0000 (15:06 +0200)]
ui/sdn: better spelling and code cleanup

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoFix: ceph: mon_address not considered by new MON
Alwin Antreich [Wed, 11 Mar 2020 15:22:36 +0000 (16:22 +0100)]
Fix: ceph: mon_address not considered by new MON

The public_addr option for creating a new MON is only valid for manual
startup (since Ceph Jewel) and is just ignored by ceph-mon during setup.
As the MON is started after the creation through systemd without an IP
specified. It is trying to auto-select an IP.

Before this patch the public_addr was only explicitly written to the
ceph.conf if no public_network was set. The mon_address is only needed
in the config on the first start of the MON.

The ceph-mon itself tries to select an IP on the following conditions.
- no public_network or public_addr is in the ceph.conf
    * startup fails

- public_network is in the ceph.conf
    * with a single network, take the first available IP
    * on multiple networks, walk through the list orderly and start on
      the first network where an IP is found

Signed-off-by: Alwin Antreich <a.antreich@proxmox.com>
4 years agoceph: remove unused variable assignment
Alwin Antreich [Wed, 11 Mar 2020 15:22:35 +0000 (16:22 +0100)]
ceph: remove unused variable assignment

Signed-off-by: Alwin Antreich <a.antreich@proxmox.com>
4 years agod/control: bump pve-guest-common build-dep
Fabian Grünbichler [Fri, 10 Apr 2020 09:30:52 +0000 (11:30 +0200)]
d/control: bump pve-guest-common build-dep

since the log output verified in tests changed and the build fails with
the old version now.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
4 years agotest: s/expeted/expected
Fabian Grünbichler [Fri, 10 Apr 2020 08:34:13 +0000 (10:34 +0200)]
test: s/expeted/expected

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
4 years agoreplication test: Add log rate and transport type
Dominic Jäger [Fri, 10 Apr 2020 08:27:32 +0000 (10:27 +0200)]
replication test: Add log rate and transport type

pve-guest-common got a new log line [0] for rate and transport type of a
replication. This line must be added to the replication tests.

[0] e90f586aab5caad4d4c5e18711316e8dc5225c07

Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
4 years agoui: node: lower statusStore interval outside of summary panel
Thomas Lamprecht [Thu, 9 Apr 2020 15:06:49 +0000 (17:06 +0200)]
ui: node: lower statusStore interval outside of summary panel

We normally only use that information for the nodes power management
buttons, only the Summary panel profits from more frequent updates
(due to the uptime, and resource usage graphs).
So use 5s interval in general and switch to 1s for the summary panel
only.

This also fixes a bug where the node-config panel owned store got
stopped by mistake if the summary panel, which shared the use of that
store, was "destroyed" (left).

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoui: call more update store functions in the store scope
Thomas Lamprecht [Thu, 9 Apr 2020 14:45:22 +0000 (16:45 +0200)]
ui: call more update store functions in the store scope

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoAPI2: Network: display vnets in any_bridge
Alexandre Derumier [Thu, 26 Mar 2020 02:07:42 +0000 (03:07 +0100)]
API2: Network: display vnets in any_bridge

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
4 years agopvestatd: cgroupv2 support
Wolfgang Bumiller [Fri, 3 Apr 2020 14:37:41 +0000 (16:37 +0200)]
pvestatd: cgroupv2 support

This uses the newly introduced PVE::LXC::CGroup's
cpuset_controller_path() method to find the controller path,
so we need to depend on the newer pve-container package.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoui: node/config: use simply boolean expression for powermngt check
Thomas Lamprecht [Fri, 3 Apr 2020 05:01:25 +0000 (07:01 +0200)]
ui: node/config: use simply boolean expression for powermngt check

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoui: cleanups and some s/var/let/ transformations
Thomas Lamprecht [Thu, 2 Apr 2020 12:15:16 +0000 (14:15 +0200)]
ui: cleanups and some s/var/let/ transformations

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoui: ceph/ServiceList: do not autoLoad the rstore
Thomas Lamprecht [Thu, 2 Apr 2020 10:48:02 +0000 (12:48 +0200)]
ui: ceph/ServiceList: do not autoLoad the rstore

The 'autoStart' triggers a initial load already

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoui: ceph/ServiceList: do not autoLoad the updatestore
Dominik Csapak [Thu, 2 Apr 2020 08:53:45 +0000 (10:53 +0200)]
ui: ceph/ServiceList: do not autoLoad the updatestore

they load once anyway with 'autoStart'

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoui: ceph/ServiceList: stop leaky versionsstores
Dominik Csapak [Thu, 2 Apr 2020 08:53:44 +0000 (10:53 +0200)]
ui: ceph/ServiceList: stop leaky versionsstores

on the view destroy we have to stop the updatestore again,
they do not get cleaned up by a destroy because until they are stopped
the have a reference on themselves, which prevent a garbage collection

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoui: ceph/ServiceList: correctly set 'mixedversions'
Dominik Csapak [Thu, 2 Apr 2020 05:55:39 +0000 (07:55 +0200)]
ui: ceph/ServiceList: correctly set 'mixedversions'

We need to set mixedversions also if
data.version.parts < view.maxversion
so lets do that.

This avoids a bug when the first version in the list already is the
highest one.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agogui/cluster: fix translation for cluster join button
Stefan Reiter [Mon, 23 Mar 2020 12:41:12 +0000 (13:41 +0100)]
gui/cluster: fix translation for cluster join button

New version including the cluster name didn't work in some languages,
e.g. german: "Beitreten 'cluster'" vs the correct "'cluster' beitreten"

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
4 years agoui: ceph: use displayfield with tooltip for overview version
Thomas Lamprecht [Wed, 1 Apr 2020 16:39:06 +0000 (18:39 +0200)]
ui: ceph: use displayfield with tooltip for overview version

And drop the git shorthash for now, albeit we could add it to the
tooltip..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agogui: ceph: add highest cluster version in summary
Dominik Csapak [Mon, 16 Mar 2020 12:56:03 +0000 (13:56 +0100)]
gui: ceph: add highest cluster version in summary

so that the admin knows what the 'expected' ceph version is
partially fixes #2468

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agogui: ceph: icons for versions in ServiceList
Dominik Csapak [Mon, 16 Mar 2020 12:56:02 +0000 (13:56 +0100)]
gui: ceph: icons for versions in ServiceList

this makes it closer to the OSD list, using the new 'version-only'
metadata api call

this partially fixes #2468

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agogui: ceph: let compare_ceph_versions accept arrays directly
Dominik Csapak [Mon, 16 Mar 2020 12:56:01 +0000 (13:56 +0100)]
gui: ceph: let compare_ceph_versions accept arrays directly

instead of always expecting a '.' separated version string
we will use this for the 'structured' version data

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoceph: add 'scope' parameter to metadata api call
Dominik Csapak [Mon, 16 Mar 2020 12:56:00 +0000 (13:56 +0100)]
ceph: add 'scope' parameter to metadata api call

so that we can choose to only include the versions and not all metadata
this is done to avoid having a seperate 'versions' api call

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoceph: factor out get/broadcast ceph versions to ceph::services
Dominik Csapak [Mon, 16 Mar 2020 12:55:59 +0000 (13:55 +0100)]
ceph: factor out get/broadcast ceph versions to ceph::services

which also removes some dead code
(the my $local_last_version variable was never used)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoui: fix optionview caps
Thomas Lamprecht [Wed, 1 Apr 2020 15:09:56 +0000 (17:09 +0200)]
ui: fix optionview caps

there's no caps.dc['Sys.Modify'] in our heuristic caps-for-frontend
and the === undefined check was wrong

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoui: user edit: use new pmxExpireDate field
Thomas Lamprecht [Wed, 1 Apr 2020 15:09:00 +0000 (17:09 +0200)]
ui: user edit: use new pmxExpireDate field

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agodrop Makefile.rej rebase/am left over
Thomas Lamprecht [Tue, 31 Mar 2020 16:07:23 +0000 (18:07 +0200)]
drop Makefile.rej rebase/am left over

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoui: rng edit: drop useless gettext for integer
Thomas Lamprecht [Tue, 31 Mar 2020 16:04:56 +0000 (18:04 +0200)]
ui: rng edit: drop useless gettext for integer

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoui: cluster join: trigger defered call to full reload earlier
Thomas Lamprecht [Thu, 26 Mar 2020 14:20:54 +0000 (15:20 +0100)]
ui: cluster join: trigger defered call to full reload earlier

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agofollowup sdn: move a bit below and fix showing on initial load
Thomas Lamprecht [Thu, 26 Mar 2020 14:17:10 +0000 (15:17 +0100)]
followup sdn: move a bit below and fix showing on initial load

if the webinterface got loaded the api call to check if SDN is
available did not yet returned, so we could show it by accident -
even if libpve-network-perl wasn't instralled.
Fix that by hiding it (once) in the failure callback of the API call.

also move menu entries below, before Firewall, this fits better to
networking.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoadd sdn icons
Alexandre Derumier [Wed, 11 Mar 2020 02:05:39 +0000 (03:05 +0100)]
add sdn icons

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agosdn: enable SDN menu if /cluster/sdn api exist
Alexandre Derumier [Wed, 11 Mar 2020 02:05:38 +0000 (03:05 +0100)]
sdn: enable SDN menu if /cluster/sdn api exist

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
4 years agoadd sdn gui
Alexandre Derumier [Wed, 11 Mar 2020 02:05:37 +0000 (03:05 +0100)]
add sdn gui

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
4 years agod/control: bump versioned dependency for ifupdown2
Thomas Lamprecht [Mon, 23 Mar 2020 08:45:52 +0000 (09:45 +0100)]
d/control: bump versioned dependency for ifupdown2

ensures we have the OVS and recent adaptions we rely on in ifupdown
installed

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoAPI2: network reload: allow ovs reloading
Alexandre Derumier [Fri, 20 Mar 2020 10:44:54 +0000 (11:44 +0100)]
API2: network reload: allow ovs reloading

ifupdown2 support it now

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
4 years agoRevert "API2: Network: allow cidr-list && use cidr for address"
Thomas Lamprecht [Fri, 13 Mar 2020 11:02:12 +0000 (12:02 +0100)]
Revert "API2: Network: allow cidr-list && use cidr for address"

applied by mistake, needs compat code in common or the like

This reverts commit 3b82e4cf43dcb23f19b73c6df76d2f4920268df8.

4 years agofollowup: whitespace and indentation cleanup
Thomas Lamprecht [Thu, 12 Mar 2020 16:38:59 +0000 (17:38 +0100)]
followup: whitespace and indentation cleanup

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agofix #2634: print specific error if hook-script is not executable
Moayad Almalat [Thu, 12 Mar 2020 11:18:18 +0000 (12:18 +0100)]
fix #2634: print specific error if hook-script is not executable

Signed-off-by: Moayad Almalat <m.almalat@proxmox.com>
Tested-by: Oguz Bektas <o.bektas@proxmox.com>
4 years agocheck if user is enabled after verifying a ticket
Dominik Csapak [Thu, 12 Mar 2020 14:09:21 +0000 (15:09 +0100)]
check if user is enabled after verifying a ticket

when a user is disabled, we do not touch any ACLs, and already issued
tickets are still valid (until their expiration time)

check directly after the verification of the ticket if the user
is still enabled, so that any api call fails for that user

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoAPI2: Network: allow cidr-list && use cidr for address
Alexandre Derumier [Wed, 4 Mar 2020 16:17:59 +0000 (17:17 +0100)]
API2: Network: allow cidr-list && use cidr for address

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
4 years agobump version to 6.1-8
Thomas Lamprecht [Mon, 9 Mar 2020 18:05:18 +0000 (19:05 +0100)]
bump version to 6.1-8

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoui: let grid column filter symbol float right
Thomas Lamprecht [Sat, 7 Mar 2020 18:04:19 +0000 (19:04 +0100)]
ui: let grid column filter symbol float right

So it has a more fixed position, independent of the column header
length. Also, this brings it nearer to the button where one can
adapt/turn off filters.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agocss: move smilar filter rules closer together
Thomas Lamprecht [Sat, 7 Mar 2020 18:03:50 +0000 (19:03 +0100)]
css: move smilar filter rules closer together

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agogui: make grid column filter more obvious
Dominik Csapak [Mon, 24 Feb 2020 09:10:23 +0000 (10:10 +0100)]
gui: make grid column filter more obvious

by adding the icon 'fa-filter' (see fontawesome.css) after the column header
and making it slightly darker than the text

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoui: dc/options: add max_workers setting
Thomas Lamprecht [Fri, 6 Mar 2020 19:35:00 +0000 (20:35 +0100)]
ui: dc/options: add max_workers setting

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoui dc/options: refactor render_bwlimits
Thomas Lamprecht [Fri, 6 Mar 2020 19:17:34 +0000 (20:17 +0100)]
ui dc/options: refactor render_bwlimits

while this /could/ (not benched marked in any way) be slower it
operates on so small data sets that this isn't worth it having double
the code lines.

A map + join is still quite readable and not yet "code golfy"

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoui dc/options: add trailing commas
Thomas Lamprecht [Fri, 6 Mar 2020 19:16:28 +0000 (20:16 +0100)]
ui dc/options: add trailing commas

just to avoid making those lines dirty again in a future property
addition..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agofix #2611: gui: use backendUnit and pretty renderer
Stefan Reiter [Tue, 25 Feb 2020 15:32:00 +0000 (16:32 +0100)]
fix #2611: gui: use backendUnit and pretty renderer

Slightly confusing with the units:
* Backend stores values in KiB/s
* Frontend displays MiB/s (which is a good choice when considering
  current generation network speeds as opposed to huge KiB numbers IMO)
* Renderer previously showed no units, which would usually be interpreted
  as Bytes/s

So add a pretty renderer that shows units and set backendUnit to submit
correctly converted values.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
4 years agoui: ContentView: consider new ctime value
Dietmar Maurer [Wed, 4 Mar 2020 10:47:22 +0000 (11:47 +0100)]
ui: ContentView: consider new ctime value

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoqemu: change virtio-rng icon to die
Stefan Reiter [Thu, 20 Feb 2020 17:10:43 +0000 (18:10 +0100)]
qemu: change virtio-rng icon to die

'die' as in 'dice', not what Perl does

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
4 years agoqemu: add virtio-rng option to GUI
Stefan Reiter [Thu, 20 Feb 2020 17:10:42 +0000 (18:10 +0100)]
qemu: add virtio-rng option to GUI

Warn the user when selecting /dev/random or disabling speed limits.

'hardware_counts' is used since technically more than one RNG could be
attached to a QEMU machine. It is limited to 1 however, since the
usefulness of such a setup is more than questionable, considering the
linux kernel only ever uses one hwrng at a time anyway.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
4 years agoqemu: fix icon alignment in "Add Hardware" menu
Stefan Reiter [Thu, 20 Feb 2020 17:10:41 +0000 (18:10 +0100)]
qemu: fix icon alignment in "Add Hardware" menu

It was ever so slightly off.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
4 years agoceph: make all service name regexes the same
Dominik Csapak [Mon, 24 Feb 2020 15:32:19 +0000 (16:32 +0100)]
ceph: make all service name regexes the same

instead of having multiple regexes in various places for the name,
define a 'SERVICE_REGEX' in PVE::Ceph::Services, and use that
everywhere in the api where we need it

additionally limit new sevices to 200 characters, since
systemd units have a limit of 256 characters[0] (including suffix), and
200 seems to be enough.

users can now create ceph services on machines with hostnames
longer than 32 characters

0: https://www.freedesktop.org/software/systemd/man/systemd.unit.html

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoceph: do not check ips if no network is configured
Dominik Csapak [Mon, 24 Feb 2020 11:01:35 +0000 (12:01 +0100)]
ceph: do not check ips if no network is configured

the network and the cluster network are optional in the ceph config
and with 'pveceph init', so only check if we have an ip address
from those networks if it is actually configured

otherwise, the createosd call dies with an 'ip' error message
even if it would work

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoAdd all standard output options that are not yet defined
Fabian Ebner [Mon, 2 Mar 2020 09:21:35 +0000 (10:21 +0100)]
Add all standard output options that are not yet defined

When a property description already contained an option, no standard
output options at all would be added to it, e.g. '/nodes/NODE/vzdump'
already defines its own 'quiet'. Now all not yet defined options are
added to the description, this is done by using the fact that we can
pass a explicit list of std options to add to
add_standard_output_properties, so we filter all already defined ones
out and just pass that as list.

Fixes
pvesh create /nodes/NODE/vzdump -vmid ID -storage STORAGE
issued from a different node and
pvesh create /nodes/NODE/vzdump -vmid ID -storage STORAGE --output-format json
and maybe other calls.

Reported here: https://forum.proxmox.com/threads/output-format-error-with-pvesh-create.47711/

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoui: add date column in per-guest backup archive panel
Thomas Lamprecht [Fri, 21 Feb 2020 15:36:48 +0000 (16:36 +0100)]
ui: add date column in per-guest backup archive panel

Similar to commit 12d50fcd21c045ba55a3cbadd27b91a9e8939310 which
added this column to the storage content grid let's also add it here.
As we also base off the 'pve-storage-content' it's just a matter of
copying over the column definition 1:1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agostorage content GUI: improve detection of backup volumes
Dietmar Maurer [Wed, 19 Feb 2020 12:59:44 +0000 (13:59 +0100)]
storage content GUI: improve detection of backup volumes

Include new proxmox backup server volumes.

4 years agovzdump: add support for proxmox backup server
Dietmar Maurer [Wed, 19 Feb 2020 12:59:43 +0000 (13:59 +0100)]
vzdump: add support for proxmox backup server

4 years agogui: pci passthrough: fix 'Add PCI' dialog for new devices
Stefan Reiter [Mon, 17 Feb 2020 13:36:28 +0000 (14:36 +0100)]
gui: pci passthrough: fix 'Add PCI' dialog for new devices

Commit f36240c507 (gui: pci passthrough: consider domain in PCISelector)
used 'values.host' without checking if it's set, resulting in an error
when the dialog was opened for a new device (where values.host is
undefined).

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
4 years agoceph api: Make systemd unit type suffix optional
Dominic Jäger [Mon, 17 Feb 2020 11:28:57 +0000 (12:28 +0100)]
ceph api: Make systemd unit type suffix optional

To (re)start and stop Ceph services the API calls systemd units using the
function ceph_service_cmd.  If unspecified, this function assumes the type
".target" for a unit. By making the unit type suffix in the API optional, it
can make use of this assumption.

Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
4 years agopveceph: Make service parameter optional
Dominic Jäger [Mon, 17 Feb 2020 11:28:56 +0000 (12:28 +0100)]
pveceph: Make service parameter optional

The default value for "pveceph start" and "pveceph stop" is "ceph.target".
However, omitting the parameter to use the default has been forbidden.

Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
4 years agogui/cluster: show all links (up to 8) in cluster overview
Stefan Reiter [Wed, 29 Jan 2020 10:27:22 +0000 (11:27 +0100)]
gui/cluster: show all links (up to 8) in cluster overview

Show only links found on the cluster.

'enableColumnHide' is set to false, since it causes confusing behaviour
for the user, considering we'd overwrite part of their choices every 5
seconds.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
4 years agogui: form/ControllerSelector: fix autoselection
Dominik Csapak [Wed, 12 Feb 2020 09:51:59 +0000 (10:51 +0100)]
gui: form/ControllerSelector: fix autoselection

changing from Ext.Array.each to a for loop and changing the return
to a 'break', resulted in exiting the wrong loop (previously the outer,
now the inner) resulting in wrongly looping through all controllers
instead of only until we found a match

using a label and labeled break, we can break the outer loop

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agogui: dc/Summary: improve dashboard storage calculation
Dominik Csapak [Wed, 12 Feb 2020 10:16:59 +0000 (11:16 +0100)]
gui: dc/Summary: improve dashboard storage calculation

if no storage is selected in 'My Settings' our calculatin was done as follows:
* for every node, count 'local',
* every other storage gets only counted *once*, even if it is a local storage

as we have the 'shared' flag available, we can count local storages
for every node where they are defined which results in a storage total
calculation:
sum of all local storages on all nodes + all shared storages once

should make a better overview of storage for a cluster with local storages

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agogui: dc/TFAEdit: show an error message if tfa api call fails
Dominik Csapak [Tue, 11 Feb 2020 09:01:31 +0000 (10:01 +0100)]
gui: dc/TFAEdit: show an error message if tfa api call fails

setting the loadmask did not really work, so show a messagebox instead
and close the window

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agogui: TFAEdit: use viemodel binding for hiding/showing qr code
Dominik Csapak [Tue, 11 Feb 2020 09:01:30 +0000 (10:01 +0100)]
gui: TFAEdit: use viemodel binding for hiding/showing qr code

the verification textfield, and the selected tab.

also remove the code that used the value by the userview panel, since
this is the only way to have a consistent behaviour on the userview
setting and the usermenu tfa setting

this fixes the issue that on the 'user menu' we accidentally showed
the qr code and verification field, even if the user already had a
totp code

now it shows 'Unchanged' like when opened via dc/UserView

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoui: lxc/network: fix initial empty text on edit
Thomas Lamprecht [Mon, 10 Feb 2020 15:34:43 +0000 (16:34 +0100)]
ui: lxc/network: fix initial empty text on edit

Editing an existing interface with DHCP set showed the emptyText
"None", which is confusing (and wrong)

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agogui: lxc/Network: add 'None' EmptyText for static mode
Dominik Csapak [Mon, 10 Feb 2020 12:54:48 +0000 (13:54 +0100)]
gui: lxc/Network: add 'None' EmptyText for static mode

this way it is more clear that leaving that field empty results in
no configured ip for that interface, this may help prevent
users to select 'dhcp' for e.g. ipv6 when they do not want an ipv6
and do not have a dhcp6 server in the network (which would result
in a long boot time of the container, because of the dhcp timeout)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agopvesh: refactor and cleanup
Thomas Lamprecht [Mon, 10 Feb 2020 10:37:34 +0000 (11:37 +0100)]
pvesh: refactor and cleanup

use $res as variable name, as $json which may not be JSON is a bit
confusing.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agopvesh: proxy : display result if not json
Alexandre Derumier [Mon, 10 Feb 2020 08:16:24 +0000 (09:16 +0100)]
pvesh: proxy : display result if not json

When a remote node not return a json, we got and error.

This is fixing this:

pvesh set /nodes/localname/network
UPID:kvmformation2:0034937B:09352894:5E41106C:srvreload:networking:root@pam:

pvesh set /nodes/remotenode/network
JSON text must be an object or array (but found number, string, true, false or null, use allow_nonref to allow this) at /usr/share/perl5/PVE/CLI/pvesh.pm line 125.

This patch simply return raw result if it's not a json

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>