this is a complete rework of the inputpanel (long overdue)
it uses a viewModel and viewcontroller to avoid the
multiple is zfs/root/bind checks and concentrate them
in one place
also some features get optimized (e.g. the noreplication checkbox)
adds a setNodename to the DiskStorageSelector so that we can bind
the nodename there
qemu/MemoryEdit: rework panel and move most things in advanced options
this is a major rework of the memory inputpanel
previously we had to select fixed/variable and
could set shares/ballooning, depending on what was selected
now the panel is much simpler:
non advanced:
memory: the target maximum memory
advanced:
min-memory: the minimum memory, if different from the memory field
we have 'dynamic' memory
shares, only if we have 'dynamic' memory
ballooning-device: better naming, deactivates the ballooning device
cloudinit images do not have an editor so return here
and value has to be a string to match
also set the remove button text correctly when selecting a cloudinit disk
rework ProcessorEdit and merge with CPUOptions using advanced options
make ProcessorEdit static and merge with CPUOptions
moves some fields in the advanced options
this also changes how we add the flag checkboxes,
which is static now, but if we want to add more, we have to
create a better way than add a checkbox for each flag anyway
also increases the cpulimit to 128 (as per api)
and fixes a small whitespace error
Thomas Lamprecht [Tue, 27 Mar 2018 12:19:46 +0000 (14:19 +0200)]
ui: add storage plugin base class
This removes *a lot* of code duplication.
I add a base class for the storage edit window and for its containing
input panel, they implement the shared stuff. Especially the window
was mostly a 1:1 copy...
I look hard for a way to split up this patch, but I did not really
found one which would not generate a lot of work for no value added
(value being 'revertability' and better git history here).
nd actually not too much happens, the same thing happens just over
and over again.
Thus, I've thrown in the dynamic creation of the storage add menu
items here too.
I remove all storage specific Edit windows, they where all just >95%
duplicates of each other.
Special functionallity, i.e. some data deletion/transforming before
submitting gets done with onGetValues.
For the RBD external vs PVE plugin I just added a minimal child class
to RBD which only tells it'S parent that it is the pve one, this is
nice for the mapping and should be easy to understand when reading
the code.
Tried to test an add and an edit of all visible storage plugins,
seems to be OK now.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Tue, 27 Mar 2018 12:19:45 +0000 (14:19 +0200)]
controller: StorageEdit: check if 'maxfiles' could be looked up
Allows to extend our, in the ext patch introduced, storage base class
to use the controller for all storage plugins without breaking those
which cannot host backups - i.e., all block based storages
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Tue, 27 Mar 2018 12:19:44 +0000 (14:19 +0200)]
ui/Utils: add storage schema
add a schema describing our storages name, the map for its
InputPanel, the icon we show in the add menu, and if it is available
at all there.
For now just use it to simplify the ugly if/else mess
format_storage_type was, future patches will use the information to
generalise Adding/Editing of those storages.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Thu, 22 Mar 2018 09:46:22 +0000 (10:46 +0100)]
ui: restore: add bandwidth limit field
Let user input MiB/s as values in the KiB/s range are not that handy
and would make even smaller backups need several hours to restore,
days for bigger ones.
Try to give the user imformation about per-storage bandwidth limits
and how he can disable all of them.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Fri, 23 Mar 2018 10:39:49 +0000 (11:39 +0100)]
pve-daily-update.service: add Wants/After for pve-cluster.service
Else systemd may start this to early on boot, before pve-cluster is
up and ready, if it missed and update because the node was offline.
This fails the services as it cannot do any IPC with pmxcfs
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Good to have when a NIC or other peripheral devices does not works.
Flags used:
-k Show kernel drivers handling each device and also kernel modules
capable of handling it.
-nn Show PCI vendor and device codes as both numbers and names.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Report: refactor to simple schema definition of subreports
Easier to add new commands, or change flags of existing ones.
Use an hash for top level definition as we can push optional commands
easier there than in an array, it resembles also more our normal
schema definitions.
Add a truth-y value at the bottom, to ensure perls require is happy
with this module.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
this is packaged with pve-manager and runs locally on the node,
so we're pretty sure that the version is the one from pve-manager
anyway, this check just makes no sense...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Tue, 13 Mar 2018 11:08:39 +0000 (12:08 +0100)]
postinst: handle masked units
check if a unit is masked before starting/restarting/reloading it,
as else we get pretty ugly error messages during upgrade.
as "deb-systemd-helper --quiet was-enabled" differs from the
"systemctl is-enabled" behaviour, the former returns true for masked
units while the latter does not, we have to manually call systemctl,
circumventing the deb helper.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com> Acked-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Thomas Lamprecht [Mon, 12 Mar 2018 13:14:08 +0000 (14:14 +0100)]
b/prerm: cleanup cruft from prerm helper
we actually want to keep this for now as else we get the
autogenerated systemd helper code here which stops all services from
this package before upgrading, which we really really do not want
(kills API connections, among other things)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Mon, 12 Mar 2018 13:14:04 +0000 (14:14 +0100)]
postinst: remove pvebanner call
We have the pvebanner.service in places which ensures this gets
called on boot before the getty target.
Thus this only had an effect if we changed the nodename to IP mapping
_and_ upgraded/reinstalled pve-manager, then switching to another TTY
would show the updated IP. But as this a) is for sure not a common
triggered path and b) a IP change suggest a reboot either way, and if
the user can handle it on their own without a reboot, they should be
able to also handle an outdated /etc/issue until the next reboot.
Also for PVE ontop of plain Debian a reboot is needed, so that the
PVE kernel gets booted, so this shouldn't be an issue ther neither.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Mon, 12 Mar 2018 13:14:02 +0000 (14:14 +0100)]
postinst: remove fixup for ceph jewel update transition
In commit 8b89f7533e2df983e0285e2f170971a3637d7349 we needed to
change the ceph.service install target to multi-user.target, as
ceph.target could hang indefinitely if ceph-common gets upgraded.
This change is included in pve-manager 4.4-13 and newer, as users
wanting to upgrade to 5.0 must upgrade to latest 4.4 to be able to do
so (without headache) this can be removed.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Mon, 12 Mar 2018 13:14:01 +0000 (14:14 +0100)]
postinst: simplify code for transitional updates
The first case won't happen anymore on a recent PVE.
The 'version is empty or <unknown>' check may drop the '<unknown>'
part, it gets handled by the 'dpkg --compare-versions' bits just
fine, if it happens at all for the 'configure' case
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Mon, 12 Mar 2018 13:13:58 +0000 (14:13 +0100)]
postinst: bootlogd is not used under systemd
"Note that not all init systems print messages to the system console,
so that the logfile may remain empty; this is the case with systemd
(the default init system). Try "journalctl -b" instead."
-- https://packages.debian.org/stretch/bootlogd
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Mon, 12 Mar 2018 13:13:57 +0000 (14:13 +0100)]
postinst: removing old APL dir is obsolete
This was added by 82f9a5d7c on 2012-02-21 11:42:32, as we had 2 major
upgrades since them every system either was update or new installed,
so just remove this.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Dominik Csapak [Mon, 5 Mar 2018 08:58:40 +0000 (09:58 +0100)]
fix #1683: do not send non-numeric values to graphite
the graphite daemons which accept the data (carbon), only
accepts numeric values, and logs all invalid lines
since that were about 5 values per vm/ct this generated lot of noise
in the carbon log
so we check with a regex if a value is numeric, and
additionally we have a blacklist of keys which seem to be numeric but
are either boolean (e.g. template) or a state (e.g. pid)
Dominik Csapak [Fri, 23 Feb 2018 09:32:01 +0000 (10:32 +0100)]
improve node/lxc/qemu summary pages
let them use a one/two column layout depending on browser width
optimize stylings/padding values
get rid of the (now long) unecessary lazyitems plugin
(this was necessary for performance when we still used tabpanels instead
of our own configpanel with treelist)
Dominik Csapak [Fri, 23 Feb 2018 09:31:56 +0000 (10:31 +0100)]
let ceph dashboard use the full browser width
instead of hardcoding the width of the panels,
use a columnlayout and use one column for screens < 1900 width
and two columns for screens >= 1900 width