[pve-devel] [PATCH access-control] parse_user_cfg: correctly parse group names in ACLs

2019-10-03 Thread Fabian Grünbichler
usernames are allowed to start with '@', so adding a user '@test@pve' and adding it to an ACL should work, instead of ignoring that part of the ACL entry. note: there is no potential for user and group to be confused, since a username must end with '@REALM', and a group reference in an ACL can onl

Re: [pve-devel] [PATCH access-control] parse_user_cfg: correctly parse group names in ACLs

2019-10-03 Thread Thomas Lamprecht
On 10/3/19 10:33 AM, Fabian Grünbichler wrote: > usernames are allowed to start with '@', so adding a user '@test@pve' > and adding it to an ACL should work, instead of ignoring that part of > the ACL entry. > > note: there is no potential for user and group to be confused, since a > username must

[pve-devel] [PATCH manager] Harmonize reset buttons in "My Settings"

2019-10-03 Thread Dominic Jäger
- Rename both buttons to a single word as it is clear where they belong to. Use "Reset" instead of "Clear" as you can rather "Reset a saved user name" than "Clear a layout". - Use container instead of panels as they are simpler (e.g. no "border: false" necessary) and sufficient. - Align the b

[pve-devel] [PATCH v2 pve-zsync] Improve locking and state handling

2019-10-03 Thread Fabian Ebner
On the one hand this introduces a new locked() mechanism allowing to enclose locked sections in a cleaner way. There's only two types of locks namely one for state and cron (they are always read together and almost always written together) and one for sync. On the other hand it improves checks rega

[pve-devel] [PATCH common v2 1/1] JSONSchema: add pve-tag format

2019-10-03 Thread Dominik Csapak
this will be used for vm/ct tag-lists, so that (config) management systems or similar add additional information that does not reside in the description putting it here, since we want to eventually have it also for nodes,storages,etc. Signed-off-by: Dominik Csapak --- src/PVE/JSONSchema.pm | 12

[pve-devel] [PATCH manager v2 1/5] gui: add tag related helpers

2019-10-03 Thread Dominik Csapak
helpers to * generate a color from a string consistently * generate a html tag for a tag * related css classes Signed-off-by: Dominik Csapak --- www/css/ext6-pve.css | 13 + www/manager6/Utils.js | 34 ++ 2 files changed, 47 insertions(+) diff --git

[pve-devel] [PATCH manager v2 5/5] gui: remove chrome/extjs workaround

2019-10-03 Thread Dominik Csapak
it seems that this is not needed anymore, at least i cannot see any difference with/without it here (chromium 76) Signed-off-by: Dominik Csapak --- this is necessary for the TagSelector to be shown properly in chrome/chromium, otherwise it is only a single line if anyone tests this and sees an e

[pve-devel] [PATCH manager v2 3/5] gui: add TagSelector

2019-10-03 Thread Dominik Csapak
this makes use of extjs TagField to be able to add Tags we have to adapt some things for our custom color scheme and list splitting behaviour also atm, we do not preload the store so we have no tag suggestions, this will come in a later patch, when we have a global taglist (e.g. in the resource a

[pve-devel] [PATCH qemu-server v2 1/1] add 'tags' option

2019-10-03 Thread Dominik Csapak
this is useful as meta information for e.g., provisioning or config management systems adding the info also to the 'status' api call to make it easier to show it in the gui Signed-off-by: Dominik Csapak --- PVE/API2/Qemu.pm | 1 + PVE/QemuServer.pm | 14 +- 2 files changed, 14 ins

[pve-devel] [PATCH container v2 1/1] add 'tags' option

2019-10-03 Thread Dominik Csapak
this is useful as meta information for e.g., provisioning or config management systems adding the info also to the 'status' api call to make it easier to show it in the gui Signed-off-by: Dominik Csapak --- src/PVE/LXC.pm| 6 ++ src/PVE/LXC/Config.pm | 9 +++-- 2 files changed,

[pve-devel] [PATCH manager v2 2/5] gui: add tags to guest status line

2019-10-03 Thread Dominik Csapak
this way they are always visible when a user has selected a vm Signed-off-by: Dominik Csapak --- www/manager6/lxc/Config.js | 12 +--- www/manager6/qemu/Config.js | 11 +-- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/www/manager6/lxc/Config.js b/www/manager6/

[pve-devel] [PATCH common/qemu/container/manager v2] fix #1934: add tags to guests

2019-10-03 Thread Dominik Csapak
this series lets users add tags to guest configs these do not have any concrete meaning but are intended to be used by management software such as config management systems this is the basic implementation of this feature, in the next step i want to do: * get the tags in the /cluster/resources api

[pve-devel] [PATCH manager v2 4/5] gui: add tag edit windows for guests

2019-10-03 Thread Dominik Csapak
so that the user can edit the tags in the gui Signed-off-by: Dominik Csapak --- www/manager6/lxc/Options.js | 13 + www/manager6/qemu/Options.js | 13 + 2 files changed, 26 insertions(+) diff --git a/www/manager6/lxc/Options.js b/www/manager6/lxc/Options.js index 234099

Re: [pve-devel] [PATCH v2 guest-common 02/18] refactor method used by config GET calls into AbstractConfig

2019-10-03 Thread Oguz Bektas
hi, On Wed, Oct 02, 2019 at 01:49:23PM +0200, Fabian Grünbichler wrote: > On September 30, 2019 2:44 pm, Oguz Bektas wrote: > > since this method will be both used by qemu and lxc config GET calls, it > > makes sense to move it into AbstractConfig. only difference is that qemu > > also hides the c

Re: [pve-devel] [PATCH v2 container 16/18] adapt config PUT method for the new update_pct_config

2019-10-03 Thread Oguz Bektas
On Wed, Oct 02, 2019 at 01:52:58PM +0200, Fabian Grünbichler wrote: > On September 30, 2019 2:44 pm, Oguz Bektas wrote: > > we don't need to extract 'delete' here, instead we pass it all as $param > > and extract 'delete', 'revert' and most other things in > > update_pct_config > > I already asked

[pve-devel] applied: [PATCH corosync-pve] cherry-pick some fixes and log-improvements

2019-10-03 Thread Thomas Lamprecht
Signed-off-by: Thomas Lamprecht --- Note: a patch which moved this all to a submodule build similar to our other projects was done in front of this to remove the big tarball/pathces-of-patches PITA ...mknet-Disable-forwarding-on-shutdown.patch | 55 + ...dd-CS_PRI_NODE_ID-and-CS_PRI_RING_ID.p

[pve-devel] [PATCH v3 qemu-server 08/11] Add helpers to better structure CPU option handling

2019-10-03 Thread Stefan Reiter
To avoid hardcoding even more CPU-flag related things for custom CPU models, introduce a dynamic approach to resolving flags. resolve_cpu_flags takes a list of hashes (as documented in the comment) and resolves them to a valid "-cpu" argument without duplicates. This also helps by providing a reas

[pve-devel] [PATCH v3 qemu 02/11] Write understood CPU flags into static file

2019-10-03 Thread Stefan Reiter
located at /usr/share/kvm/cpu-flags-understood-$arch This file can be read by qemu-server's "query_understood_cpu_flags" function, avoiding a more expensive call to QEMU. For now, only x86_64 is implemented, since aarch64 doesn't print any flags when called this way. Signed-off-by: Stefan Reiter

[pve-devel] [PATCH v3 00/11] Add basics for custom CPU models

2019-10-03 Thread Stefan Reiter
Based on the RFC and following on- and off-list discussion about custom CPU models [0]. In essence, this revised patch allows a user to specify custom CPU models in /etc/pve/cpu-models.conf (section-config style [1]), where VMs using that CPU model inherit details from the definition. This removes

[pve-devel] [PATCH v3 qemu-server 10/11] fix #2318: allow phys-bits and host-phys-bits CPU settings

2019-10-03 Thread Stefan Reiter
Can be specified for a particular VM or via a custom CPU model (VM takes precedence). QEMU's default limit only allows up to 1TB of RAM per VM. Increasing the physical address bits available to a VM can fix this. Signed-off-by: Stefan Reiter --- v2 -> v3: * add minimum to phys-bits (8) PVE/Q

[pve-devel] [PATCH v3 qemu-server 11/11] cfg2cmd: add test case for custom CPU model

2019-10-03 Thread Stefan Reiter
Requires a mock CPU-model config, which is given as a raw string to also test parsing capabilities. Signed-off-by: Stefan Reiter --- test/cfg2cmd/custom-cpu-model.conf | 8 test/run_config2command_tests.pl | 21 + 2 files changed, 29 insertions(+) create mode 100

[pve-devel] [PATCH v3 qemu-server 04/11] Add CPUConfig file and migrate some helpers

2019-10-03 Thread Stefan Reiter
The package will be used for custom CPU models as a SectionConfig, hence the name. For now we simply move some CPU related helper functions and declarations over from QemuServer to reduce clutter there. qemu_machine_feature_enabled is moved to avoid a cyclic module dependency. Signed-off-by: Stef

[pve-devel] [PATCH v3 qemu-server 07/11] Verify VM-specific CPU configs seperately

2019-10-03 Thread Stefan Reiter
$cpu_fmt is being reused for custom CPUs as well as VM-specific CPU settings. The "pve-vm-cpu-conf" format is introduced to verify a config specifically for use as VM-specific settings. Signed-off-by: Stefan Reiter --- v2 -> v3: * move $cpu_fmt->{flags} changes here, to avoid having broken check

[pve-devel] [PATCH v3 qemu-server 03/11] Add QEMU CPU flag querying helpers

2019-10-03 Thread Stefan Reiter
* query_understood_cpu_flags returns all flags that QEMU/KVM knows about * query_supported_cpu_flags returns all flags that QEMU/KVM can use on this particular host. To get supported flags, a temporary VM is started with QEMU, so we can issue the "query-cpu-model-expansion" QMP command. This is

[pve-devel] [PATCH v3 qemu-server 06/11] Add overrides and convenience functions to CPUConfig

2019-10-03 Thread Stefan Reiter
Add two overrides to avoid writing redundant information to the config file. get_model_by_name is used to return a cpu config with default values filled out. Signed-off-by: Stefan Reiter --- v2 -> v3: * add validity checks to write_config PVE/QemuServer/CPUConfig.pm | 61

[pve-devel] [PATCH v3 manager 01/11] Broadcast supported CPU flags

2019-10-03 Thread Stefan Reiter
pvestatd will check if the KVM version has changed using kvm_user_version (which automatically clears its cache if QEMU/KVM updates), and if it has, query supported CPU flags and broadcast them as key-value pairs to the cluster. If detection fails, we clear the kv-store and set up a delay (120s),

[pve-devel] [PATCH v3 qemu-server 05/11] Adapt CPUConfig to handle custom models

2019-10-03 Thread Stefan Reiter
Turn CPUConfig into a SectionConfig with parsing/writing support for custom CPU models. IO is handled using cfs. The "built-in" parameter provides differentiation between custom and default types, even if the name is the same ('namespacing'). Signed-off-by: Stefan Reiter --- v3: I changed the "

[pve-devel] [PATCH v3 qemu-server 09/11] Rework get_cpu_options and allow custom CPU models

2019-10-03 Thread Stefan Reiter
If the "built-in" property on the cpu config is not set, try to load the cputype from the custom CPU model config, and set values accordingly. While at it, extract currently hardcoded values into seperate sub and add reasonings. Since the new flag resolving outputs flags in sorted order for consi

Re: [pve-devel] [PATCH v3 qemu-server 05/11] Adapt CPUConfig to handle custom models

2019-10-03 Thread Thomas Lamprecht
On 10/3/19 4:56 PM, Stefan Reiter wrote: > "built-in", you have to explicitly set a value in the config to 0, which looks > weird - basically "unsetting" something to use a feature), but I'm very much > fine with either. but it does not really needs to be set in the config at all, or? I mean you c

Re: [pve-devel] [PATCH v3 qemu-server 05/11] Adapt CPUConfig to handle custom models

2019-10-03 Thread Stefan Reiter
On 10/3/19 5:10 PM, Thomas Lamprecht wrote: On 10/3/19 4:56 PM, Stefan Reiter wrote: "built-in", you have to explicitly set a value in the config to 0, which looks weird - basically "unsetting" something to use a feature), but I'm very much fine with either. but it does not really needs to be

Re: [pve-devel] [PATCH v3 qemu-server 05/11] Adapt CPUConfig to handle custom models

2019-10-03 Thread Thomas Lamprecht
On 10/3/19 5:19 PM, Stefan Reiter wrote: > On 10/3/19 5:10 PM, Thomas Lamprecht wrote: >> On 10/3/19 4:56 PM, Stefan Reiter wrote: >>> "built-in", you have to explicitly set a value in the config to 0, which >>> looks >>> weird - basically "unsetting" something to use a feature), but I'm very much

Re: [pve-devel] [PATCH arch-pacman] updated to 5.1.3-1

2019-10-03 Thread Thomas Lamprecht
On 30.08.19 17:36, Oguz Bektas wrote: > Signed-off-by: Oguz Bektas > --- > Makefile | 2 +- > debian/changelog | 6 ++ > 2 files changed, 7 insertions(+), 1 deletion(-) > > diff --git a/Makefile b/Makefile > index 014851c..b58177c 100644 > --- a/Makefile > +++ b/Makefile > @@ -1,5 +1