Re: [pve-devel] [PATCH qemu-server 0/4] qemu_fw_cfg support for vm init

2017-10-11 Thread Alexandre DERUMIER
As alternative, for now, I'll go like this: args: -fw_cfg name=opt/ProxmoxInit,string=ip:10.0.0.10;gw:10.0.0.1;name:myhostname ... Like this, It's work out of the box for proxmox 4 && 5. - Mail original - De: "aderumier" À: "Wolfgang Bumiller"

[pve-devel] [PATCH common v2 2/3] cli: code cleanup

2017-10-11 Thread Philip Abernethy
Removes obsolete subroutine and some unnecessary parameters for command handlers. --- src/PVE/CLIHandler.pm | 96 ++- 1 file changed, 34 insertions(+), 62 deletions(-) diff --git a/src/PVE/CLIHandler.pm b/src/PVE/CLIHandler.pm index

[pve-devel] [PATCH common v2 1/3] cli: prepare CLIHandler for handling sub-commands

2017-10-11 Thread Philip Abernethy
instead of 5 slightly different calls to RESTHandler::usage_str this introduces a wrapper function that handles all required cases and is capable of resolving sub-commands and aliases. Adds a subroutine to print the short help for a command in case no subcommand was given. Modifies handle_cmd and

[pve-devel] [PATCH common v2 3/3] cli: whitespace cleanup

2017-10-11 Thread Philip Abernethy
--- src/PVE/CLIHandler.pm | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/PVE/CLIHandler.pm b/src/PVE/CLIHandler.pm index 7131bf8..f0f83dc 100644 --- a/src/PVE/CLIHandler.pm +++ b/src/PVE/CLIHandler.pm @@ -127,12 +127,12 @@ $generate_usage_str = sub { };

[pve-devel] [PATCH common v2 0/3] CLI: Sub-commands and aliases

2017-10-11 Thread Philip Abernethy
This patch (1/3 is the effective part) adds support for sub-commands in the form of `pveum user add `, as well as aliases, so the prior format can still be used. It correctly parses the current command format as well and, to my knowledge,generates identical help texts, man-pages and html-docs. It

Re: [pve-devel] [PATCH manager] fix updateStore destroy

2017-10-11 Thread Emmanuel Kasper
look goods to me maybe we should have mentioned that this is needed for having the 'autoDestroy' store property working properly. Otherwise it is not clear why we needed this in the pve context, as all updates store are unqueued manually with component.on('destroy', componentstore.stopUpdate);

[pve-devel] [PATCH ha-manager 3/3] clean up 'Data::Dumper' usage tree wide

2017-10-11 Thread Thomas Lamprecht
Signed-off-by: Thomas Lamprecht --- src/PVE/API2/HA/Groups.pm | 1 - src/PVE/API2/HA/Resources.pm | 1 - src/PVE/CLI/ha_manager.pm | 1 - src/PVE/HA/FenceConfig.pm | 1 - src/PVE/HA/Groups.pm | 1 - src/PVE/HA/LRM.pm | 1 -

[pve-devel] [PATCH ha-manager 2/3] lrm: crm: show interest in pve-api-update trigger

2017-10-11 Thread Thomas Lamprecht
To ensure that the LRM and CRM services get reloaded when pve-api-update trigger gets activated. Important, as we directly use perl API modules from qemu-server, pve-container, pve-common and really want to avoid to run outdated, possible problematic or deprecated, code. Signed-off-by: Thomas

[pve-devel] [PATCH ha-manager 1/3] lrm.service: do not timeout on stop

2017-10-11 Thread Thomas Lamprecht
we must shut all services down when stopping the LRM for a host shutdown, this can take longer than 95 seconds and should not get interrupted to ensure a gracefull poweroff. The watchdog is still active untill all services got stopped so we still are safe from a freeze or equivalent failure.

[pve-devel] applied: [PATCH container] fixes #1227: include ns/ dir in read_cgroup_value

2017-10-11 Thread Wolfgang Bumiller
applied to master & stable-4 On Fri, Oct 06, 2017 at 03:52:15PM +0200, Philip Abernethy wrote: > this fixes the disk I/O graph and now also correctly sums the values. > --- > This fix is already somewhat obsoleted by cgroup v2, but targetting > that will me much more effort. > src/PVE/LXC.pm | 6

Re: [pve-devel] [PATCH v5 container 0/4] lxc@ service: fix dependencies

2017-10-11 Thread Thomas Lamprecht
On 10/11/2017 02:13 PM, Fabian Grünbichler wrote: > this series improves the systemd integration of LXC containers by: > - ensuring PVE LXC container units don't have a (transitive) conflict with > shutdown.target, thus preventing races between systemd- and > pve-ha-lrm/pve-guest initiated

[pve-devel] [PATCH v2 guest-common] replication: purge states: verify the vmlist

2017-10-11 Thread Wolfgang Bumiller
Instead of clearing out the local state if the last cfs_update failed. Signed-off-by: Wolfgang Bumiller --- No changes PVE/ReplicationState.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/PVE/ReplicationState.pm b/PVE/ReplicationState.pm index 83ffa5b..567535a

[pve-devel] [PATCH v2 cluster 1/2] cluster: improve error handling when reading files

2017-10-11 Thread Wolfgang Bumiller
When querying file contents via IPC we return undef if the file does not exist, but also on any other error. This is potentially problematic as the ipcc_send_rec() xs function returns undef on actual errors as well, while setting $! (errno). It's better to die in cases other than ENOENT. Before

[pve-devel] [PATCH v2 cluster 2/2] cluster: cfs_update: option to die rather than warn

2017-10-11 Thread Wolfgang Bumiller
It can be useful to know whether we actually have an empty vm list or whether the last cfs_update call simply failed. Previously this only warned. This way we can avoid a nasty type of race condition. For instance in pvesr where it's possible that the vm list query fails while everything else

[pve-devel] [PATCH v5 container 0/4] lxc@ service: fix dependencies

2017-10-11 Thread Fabian Grünbichler
this series improves the systemd integration of LXC containers by: - ensuring PVE LXC container units don't have a (transitive) conflict with shutdown.target, thus preventing races between systemd- and pve-ha-lrm/pve-guest initiated stopping of containers - reworking the stop/reboot handling to

[pve-devel] [PATCH v5 container 4/4] build: mark lxc@.service.d for future removal

2017-10-11 Thread Fabian Grünbichler
Signed-off-by: Fabian Grünbichler --- src/Makefile | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/Makefile b/src/Makefile index f69dda2..33a637c 100644 --- a/src/Makefile +++ b/src/Makefile @@ -39,10 +39,8 @@ install: pct

[pve-devel] [PATCH v5 container 1/4] install lxc@ snippets to correct location

2017-10-11 Thread Fabian Grünbichler
Signed-off-by: Fabian Grünbichler --- src/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Makefile b/src/Makefile index 19931e5..9c5fbc3 100644 --- a/src/Makefile +++ b/src/Makefile @@ -10,7 +10,7 @@ LXC_SCRIPT_DIR=${PREFIX}/share/lxc

[pve-devel] [PATCH v5 container 3/4] switch to pve-container@ unit

2017-10-11 Thread Fabian Grünbichler
Signed-off-by: Fabian Grünbichler --- src/PVE/API2/LXC/Status.pm | 2 +- src/PVE/VZDump/LXC.pm | 2 +- src/lxc-pve-poststop-hook | 7 --- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/PVE/API2/LXC/Status.pm b/src/PVE/API2/LXC/Status.pm

[pve-devel] [PATCH manager] ui: GuestStatusView: simplify HA state display

2017-10-11 Thread Thomas Lamprecht
simplify HA Information in VM/CT Summary panel. Use the already translated 'HA State' instead of 'Managed by HA' (which now becomes obsolete as it was the single appearance). Simplify PVE.Utils.format_ha respectively to mach the new name, as here is the only use of this function we have no side

[pve-devel] [PATCH manager 6/7] ui: qemu: add HA manage menu item to panel

2017-10-11 Thread Thomas Lamprecht
Allows to add an unmanaged VM to HA or to edit the HA settings of a managed one. Fixes: #1518 Signed-off-by: Thomas Lamprecht --- www/manager6/ha/ResourceEdit.js | 9 + www/manager6/qemu/Config.js | 12 2 files changed, 17 insertions(+), 4

[pve-devel] [PATCH manager 5/7] ui: qemu: combine system changing buttons

2017-10-11 Thread Thomas Lamprecht
Signed-off-by: Thomas Lamprecht --- www/manager6/qemu/Config.js | 55 - 1 file changed, 29 insertions(+), 26 deletions(-) diff --git a/www/manager6/qemu/Config.js b/www/manager6/qemu/Config.js index f1666f8b..45c27530 100644

[pve-devel] [PATCH manager 7/7] ui: lxc: add 'more' button with HA manage menu item to panel

2017-10-11 Thread Thomas Lamprecht
Move the remove button into the more button and add a 'Manage HA' button there, mirroring the changes from the qemu panel. Allows to add an unmanaged CT to HA or to edit the HA settings of a managed one. Fixes: #1518 Signed-off-by: Thomas Lamprecht ---

[pve-devel] [PATCH manager 4/7] ui: add PVE.menu.Item

2017-10-11 Thread Thomas Lamprecht
Extend 'Ext.menu.Item' with a simplified handler logic also used in 'PVE.button.Button'. If 'confirmMsg' config is set we wrap the defined handler in a confirm dialog, useful if the menu item just makes an API call and does not has an own (edit) window shown. In contrast to the 'pveButton' we do

[pve-devel] [PATCH manager 3/7] ui: ha: make vote warning shorter

2017-10-11 Thread Thomas Lamprecht
Signed-off-by: Thomas Lamprecht --- www/manager6/ha/ResourceEdit.js | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/www/manager6/ha/ResourceEdit.js b/www/manager6/ha/ResourceEdit.js index a70a1c75..f57668e8 100644 ---

[pve-devel] [PATCH manager 2/7] ui: ha: use vmComboSelector when adding new resource

2017-10-11 Thread Thomas Lamprecht
Make adding resources more comfortable by showing the user also the name, type, node, ... in a nice combo box grid when adding a resource instead of just a integer spinner. Fixes: #1517 Signed-off-by: Thomas Lamprecht --- www/manager6/ha/ResourceEdit.js | 22

[pve-devel] [PATCH manager 0/7] WebUI: make HA management easier

2017-10-11 Thread Thomas Lamprecht
First two patches make adding a new services over DC->HA->Add more confortable by switching out the simple VMID integer spinner with a combobox grid showing more details for each VM/CT, addressing #1517 Third one is a small cleanup patch. And the rest addresses #1518. We add a 'More' Button to

[pve-devel] [PATCH manager 1/7] ui: add VM ComboSelector

2017-10-11 Thread Thomas Lamprecht
this is a mixture of the multi select VMSelector and the single select pveGuestIDSelector. Useful when a single VM must be selected but also complementary information should be shown to the user. Most of the times the VMID is not really useful for an user as numbers are harder to remember and to

Re: [pve-devel] [PATCH qemu-server 0/4] qemu_fw_cfg support for vm init

2017-10-11 Thread Alexandre DERUMIER
>>Mainly I'd like the option to be able to see the vmid, eg. I like >>deriving ip addresses from the vmid, so if the guest could see that, I >>could clone and start a template without having to configure anything >>at all ;-) But in this case, I think you need to have some kind of predefined

[pve-devel] [PATCH manager] fix updateStore destroy

2017-10-11 Thread Dominik Csapak
the store never fires/gets a destroy event, thus it never stops the load_task and never unqueues itself in case the store gets destroyed but not explicitely stopped with overriding the destroy method, this works now as intended Signed-off-by: Dominik Csapak ---

[pve-devel] [PATCH qemu v2 2/5] Install userspace utilities and UEFI roms via dh_install

2017-10-11 Thread Emmanuel Kasper
--- debian/pve-qemu-kvm.install | 9 + debian/rules| 12 +--- 2 files changed, 10 insertions(+), 11 deletions(-) create mode 100644 debian/pve-qemu-kvm.install diff --git a/debian/pve-qemu-kvm.install b/debian/pve-qemu-kvm.install new file mode 100644 index

[pve-devel] [PATCH qemu v2 3/5] Bump dephelper compatibility level to 10

2017-10-11 Thread Emmanuel Kasper
The debian package content was found to be the same with diffoscope. No functional change. --- debian/compat | 2 +- debian/control | 2 +- debian/rules | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/debian/compat b/debian/compat index 7ed6ff8..f599e28 100644 ---

[pve-devel] [PATCH qemu v2 4/5] Provides a qemu-system-x86 virtual package

2017-10-11 Thread Emmanuel Kasper
This allows adding additional debian packages on pve hosts which depends on a qemu binary being installed. The following install paths were tested: * install of proxmox-ve on debian systems with standard package set: works as expected * install of proxmox-ve on debian having the debian qemu

[pve-devel] [PATCH qemu v2 5/5] Add a 'Conflicts' with qemu-system-common from Debian

2017-10-11 Thread Emmanuel Kasper
Both qemu-system-common and our pve-qemu-kvm package install the file /usr/bin/virtfs-proxy-helper. Since qemu-system-common does not have reverse dependencies in Debian for packages besides qemu-system-, and ovmf, which we don't want to install anyway, we do not need a 'Provides' for it. ---

[pve-devel] [PATCH qemu v2 0/5] Provides a qemu-system-x86 virtual package

2017-10-11 Thread Emmanuel Kasper
This will allow the installation of extra packages requiring a qemu binary Bigger use case is libguestfs0 and libguestfs-tools , this has been asked in a few different forum threads libguestfs-tools allow to inspect and edit disk images of offline guests and do not require libvirt domains to be

[pve-devel] [PATCH qemu v2 1/5] Remove deprecated dh_clean -k

2017-10-11 Thread Emmanuel Kasper
--- debian/rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/rules b/debian/rules index 98637c7..28723df 100755 --- a/debian/rules +++ b/debian/rules @@ -80,7 +80,7 @@ endif install: build dh_testdir dh_testroot - dh_clean -k + dh_prep

Re: [pve-devel] [RFC PATCH cluster 2/2] cluster: cfs_update: option to die rather than warn

2017-10-11 Thread Thomas Lamprecht
On 10/11/2017 09:36 AM, Wolfgang Bumiller wrote: > It can be useful to know whether we actually have an empty > vm list or whether the last cfs_update call simply failed. > Previously this only warned. > > This way we can avoid a nasty type of race condition. For > instance in pvesr where it's

Re: [pve-devel] [PATCH cluster 1/2] cluster: improve error handling when reading files

2017-10-11 Thread Thomas Lamprecht
On 10/11/2017 09:36 AM, Wolfgang Bumiller wrote: > When querying file contents via IPC we return undef if the > file does not exist, but also on any other error. This is > potentially problematic as the ipcc_send_rec() xs function > returns undef on actual errors as well, while setting $! >

Re: [pve-devel] [PATCH qemu-server 0/4] qemu_fw_cfg support for vm init

2017-10-11 Thread Wolfgang Bumiller
On Wed, Oct 11, 2017 at 08:08:01AM +0200, Alexandre DERUMIER wrote: > Any comment ? I've been meaning to look into qemu_fw_cfg more closely. I like the idea, but am wondering if it makes sense to do it this way. It definitely combines well with the cloudinit patch set, but I wonder if it might be

[pve-devel] [RFC PATCH cluster 2/2] cluster: cfs_update: option to die rather than warn

2017-10-11 Thread Wolfgang Bumiller
It can be useful to know whether we actually have an empty vm list or whether the last cfs_update call simply failed. Previously this only warned. This way we can avoid a nasty type of race condition. For instance in pvesr where it's possible that the vm list query fails while everything else

[pve-devel] [PATCH cluster 1/2] cluster: improve error handling when reading files

2017-10-11 Thread Wolfgang Bumiller
When querying file contents via IPC we return undef if the file does not exist, but also on any other error. This is potentially problematic as the ipcc_send_rec() xs function returns undef on actual errors as well, while setting $! (errno). It's better to die in cases other than ENOENT. Before

[pve-devel] [RFC PATCH guest-common] replication: purge states: verify the vmlist

2017-10-11 Thread Wolfgang Bumiller
Instead of clearing out the local state if the last cfs_update failed. --- Should there also be a quorum check in this function? Or should we leave this up to the pve-manager side (pvesr cli tool / API entry points)? PVE/ReplicationState.pm | 1 + 1 file changed, 1 insertion(+) diff --git

[pve-devel] [PATCH manager] ui: re-align global search field to now shorter version

2017-10-11 Thread Thomas Lamprecht
commit 48de6c299a33fe124d7193b2565d754efdbf8cd3 removed showing the short SHA1 commit hash in the version info field but did not realigned the search field so that it got a asymmetric space. Adapt the Version info minimal width so that this is again the case. --- Rather trivial change I had

[pve-devel] [PATCH manager v3 1/1] ui: rename global 'Help' button to 'Documentation'

2017-10-11 Thread Thomas Lamprecht
To make it more clear that this will always end you on the Documentation index. Also, multiple Help buttons which all may or may not do something different are a bit weird/confusing - thus distinction can here be really helpful, IMO. We target HD ready (1280x720) as minimal target resolution

Re: [pve-devel] [PATCH qemu-server 0/4] qemu_fw_cfg support for vm init

2017-10-11 Thread Alexandre DERUMIER
Any comment ? - Mail original - De: "aderumier" À: "pve-devel" Cc: "aderumier" Envoyé: Vendredi 6 Octobre 2017 16:49:10 Objet: [PATCH qemu-server 0/4] qemu_fw_cfg support for vm init This patch series add support