Thomas Lamprecht [Mon, 27 Nov 2017 11:43:31 +0000 (12:43 +0100)]
fix #1578: api/resource hastate: fallback to resource cfg state
With ignored or still queued services we have no hastate for a
service in the manager status available.
As we use hastate in the web UI to determine if a service is
configured for HA this could lead to confusion there.
For example, the VM/CT 'Manage HA' window thinks tries to add the
service again if its in the 'ignored' state, and then the backend
errors out because it is already configured.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
access log rotate: try to reload not restart services
with the use of systemd the /etc/init.d/pveproxy restart call got
intercepted and redirected to systemd, which did an restart.
But, that is a behvaior change to the intention of the init.d script,
which would not restart but reload the service.
Thus change this to systemds equivalent:
systemctl try-reload-or-restart pveproxy.service
Which tries to reload, if the unit supports it, and only if that does
not worked it restarts.
Same for spiceproxy.
Reported-by: Stefan Priebe <s.priebe@profihost.ag> Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Dominik Csapak [Fri, 3 Nov 2017 08:51:37 +0000 (09:51 +0100)]
improve tree/grid icons
we improve the icons in the tree and the resource grid by
differentiating between cluster online/offline status and no rrd data
when we have no rrd data from a node/storage, instead of showing a
red x (which is scary) even if the node is reachable by corosync (which
confused quite a bit of people, because we show all nodes as online in
the datacenter summary), we show the node/storage with a '?'
this signals that something is wrong with this node, even if we can
reach it via cluster methods
this rewrite of the logic includes a refactoring of the method
of getting the icon, because we want the same icons in the tree and the
grid, and an optimization on how we use the css classes
(introducing a x-grid-custom-icon class)
Dominik Csapak [Wed, 9 Aug 2017 12:08:26 +0000 (14:08 +0200)]
add ver get parameter for js/css files to improve cache behaviour
we do not set an Expire header for our js files, and certain browsers
do not even make the request then (on which we would answer
with a correct 304 not modified)
so to force the browser to load a new version of the gui when we change
something, we add the package version as a get parameter
when doing this, the browsers still cache the file, until the get
parameter changes, which is exactly what we want
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com> Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Dominik Csapak [Mon, 30 Oct 2017 14:03:38 +0000 (15:03 +0100)]
prevent visual flashing of button when changing element in the tree
when changing between elements in the tree, either the
start or shutdown buttons were visually flashing (meaning they are
enabled/disabled for a short time and change state shortly after)
Dominik Csapak [Fri, 27 Oct 2017 12:13:48 +0000 (14:13 +0200)]
fix #1539: add missing shellquote for proxied commands of pvesh
if we do not do this, passing arguments with spaces
(e.g., pvesh set YYY --param "one word")
leads to ssh calls like this:
ssh REMOTE pvesh set YYY --param one word
Emmanuel Kasper [Thu, 5 Oct 2017 13:46:25 +0000 (15:46 +0200)]
Update VM SCSI controller type after OS selection in Wizard
This was done previously without any kind of user visible feedback, so users
would not know that they had a Virtio SCSI controller as default controller
for Linux VMs.
Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Emmanuel Kasper [Thu, 5 Oct 2017 13:41:55 +0000 (15:41 +0200)]
Update VM SCSI type based on iothread value when inside the wizard
We keep the same logic as before: once the iothread option is selected,
the SCSI controller is switched to virtio-scsi-single, until iothread
is unselected again.
Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Emmanuel Kasper [Mon, 2 Oct 2017 08:37:30 +0000 (10:37 +0200)]
Do not use 'autoselect' as a boolean when preselecting a bus
The bus selector is displayed when we add a Hard Disk or CD Drive.
When it is displayed, we *always* preselect the next available
slot on the controller of our choice.
So this test is not needed.
We keep the test on the string value of 'autoselect' to select
a bus position when adding a CD Drive.
Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Tue, 17 Oct 2017 09:48:05 +0000 (11:48 +0200)]
ui: lxc: remove obsolete unmount button
This button was hidden by default and was intended to show up when a
CT is mounted only.
The check if mounted, was done for OpenVZ and may not become true
currently also we only have CLI helpers for mount/unmount but no API
– so just remove it.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com> Acked-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Thomas Lamprecht [Tue, 17 Oct 2017 09:48:03 +0000 (11:48 +0200)]
ui: qemu: combine system changing buttons
add a 'More' Button to the VM and CT Config Panel (its base panel)
and move all buttons which may result in config changes there.
After that we have separated power/migrate actions from system
affecting actions (clone, remove, convert to template).
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com> Acked-by: Dominik Csapak <d.csapak@proxmox.com>
Thomas Lamprecht [Tue, 17 Oct 2017 09:48:02 +0000 (11:48 +0200)]
ui: add PVE.menu.Item
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 not have a selection model,
enable function and the respective logic here.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com> Acked-by: Dominik Csapak <d.csapak@proxmox.com>
Thomas Lamprecht [Tue, 17 Oct 2017 09:47:59 +0000 (11:47 +0200)]
ui: rename global 'Help' button to 'Documentation'
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 where this
still fits nicely. This (or bigger) resolution is also used by our
screenshot framework for the documentation - so it also fits there.
Adapt the icon displayed to `fa-book` which resembles the one often
used for manuals and is clearer than a '?', IMO.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com> Acked-by: Dominik Csapak <d.csapak@proxmox.com>
Thomas Lamprecht [Thu, 19 Oct 2017 06:20:12 +0000 (08:20 +0200)]
ui: pveWindowEdit: allow sane onlineHelp specification for edit windows
instead of heuristically choosing the onlineHelp entry from our first
item prefer the one we have in our config, if noone the fallback to
the old heuristic.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Because the replication's purge_old_state() function now
fails if cfs_update() fails, and since it tries to access
the actual local pmxcfs it should never have been called by
tests anyway.
Thomas Lamprecht [Wed, 11 Oct 2017 10:09:42 +0000 (12:09 +0200)]
ui: ha: use vmComboSelector when adding new resource
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 <t.lamprecht@proxmox.com> Acked-by: Dominik Csapak <d.csapak@proxmox.com>
Thomas Lamprecht [Wed, 11 Oct 2017 10:09:41 +0000 (12:09 +0200)]
ui: add VM ComboSelector
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 associate as names.
So a dialog which need a VMID (e.g. HA resource addition) forced the
user to lookup the Guest Name -> Guest VMID mapping and then enter it
correctly in the respective input field.
This can be improved by using a combo grid based selector which shows
additional information in the edit window itself, can be sorted and
filtered to quickly select a guest.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com> Acked-by: Dominik Csapak <d.csapak@proxmox.com>
Thomas Lamprecht [Wed, 11 Oct 2017 12:10:24 +0000 (14:10 +0200)]
ui: GuestStatusView: simplify HA state display
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 effects.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com> Acked-by: Dominik Csapak <d.csapak@proxmox.com>
Thomas Lamprecht [Wed, 11 Oct 2017 07:16:23 +0000 (09:16 +0200)]
ui: re-align global search field to now shorter version
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.
ui: inline novnc: always focus console panel after render
Enforce focus on the Inline CT/VM/Host Console panel backed by noVNC.
Else, if a Console is already active on VM A and we select VM B the
console there does not gets the focus as its now in the three and
regaining focus to the console is not fully intuitive - i.e. just
clicking on the console won't do the trick, you have to click on
specific spots (e.g. console panel header) or re open the console.
The only possible drawback of the focusing is that if one has the
console open, selects another VM he cannot navigate the tree down
with the arrow keys (as long as the console is open) - but thats
hardly a situation where one gets into and can be worked around.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Dominik Csapak [Wed, 11 Oct 2017 09:49:50 +0000 (11:49 +0200)]
fix updateStore destroy
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
We extract them from the json data by first deleting all
quotes, then deleting everything up to their entries, then
everything after the next comma. If the entry is at the end
there's no comma, instead there are closing braces, so we
need to strip away these as well.
Thomas Lamprecht [Mon, 25 Sep 2017 12:39:43 +0000 (14:39 +0200)]
remove obsolete Posix use clause
besides the cleanup purpose this fixes an actual problem, perls POSIX
module has the following caveat:
`Everything is exported by default (with a handful of exceptions).
This is an unfortunate backwards compatibility feature and its use is
strongly discouraged. You should either prevent the exporting (by
saying "use POSIX ();", as usual) and then use fully qualified names
(e.g. "POSIX::SEEK_END"), or give an explicit import list. If you do
neither and opt for the default (as in "use POSIX;"), you will import
hundreds and hundreds of symbols into your namespace.'
see `perldoc POSIX`
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Fri, 22 Sep 2017 12:20:27 +0000 (14:20 +0200)]
window.Wizard: increase default size
The current size was choosen with the older, more compact, classic
theme. The Crisp theme, now in use, has a bit more spaces and bigger
font sizes to adapt to the increased pixel density of current
displays.
Increase the size a bit (~13%) but try to keep the aspect ratio.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Fri, 22 Sep 2017 12:20:25 +0000 (14:20 +0200)]
wizard: merge CD/DVD and OS panels
We had a single column for the CD/DVD panel, fill the second column
with the now in size reduced OS type selector, as ISO selection and
OS type selection are tied together.
Reduces steps needed for creating a VM.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Fri, 22 Sep 2017 12:20:24 +0000 (14:20 +0200)]
OSType edit: switch to combobox
Move from the radiogroup to two comboboxes, where the base OS and
then a specific Version can be choosen.
Avoids multiple occurences of strings like "Microsoft Windows" and
saves a lot of space - which will be used to merge this panel with
the ISO selector panel in the create wizard.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Fri, 22 Sep 2017 12:20:22 +0000 (14:20 +0200)]
refactor OSDefaults, OSTypeEdit: add and use getDefaults
encapuslation wise it makes sense to have a helper which assembles a
os specific setting object in the OSDefaults class, where those
settings are defined.
Else we always need to check if the current OSType on the user side
of this class, which is against encapsulation.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Thu, 21 Sep 2017 09:03:26 +0000 (11:03 +0200)]
ui: reuse ResourceStores default handling for guest description
First, there was an additional space between "'" and ")" which lead
me to this.
I could never trigger the case where vmname is undefined, and saw
that we have a almost same default handling in data/ResourceStore.js
So, just use that one instead here - it misses the single-quotes
inside the parentheses, but as there are already said parentheses
this is visually still very OK, IMO.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Wed, 13 Sep 2017 08:30:15 +0000 (10:30 +0200)]
use log method from base VZDump::Plugin
we copied our log method over there to resolve a cyclic dependency,
now use it here to reduce code duplication.
As we are below pve-guest-common in the dpendency hierachy we may use
it, but it does not may (or at least should) use us.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Wed, 13 Sep 2017 09:10:57 +0000 (11:10 +0200)]
vzdump/pigz: use ProcFSTools for core count, not sysconf
A "sysconf(84)" is not really descripitve. There is no POSIX const
entry for _SC_NPROCESSORS_ONLN (number of processors online) as its
not standard but an adoption of glibc.
Better just use our proven ProcFSTool's cpuinfo method for getting
the desired information.
This is kept only for backwards compatibillity as we guaranteed that
we use #cpus/2 if 'pigz' is set to 1, else I would have removed this
alltogether and just directly passed 'pigz' to the command...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Emmanuel Kasper [Thu, 24 Aug 2017 09:45:20 +0000 (11:45 +0200)]
Turn the offline/online checkbox of the Migrate Windows into a displayfield
This checkbox had not effect whatsoever:
* if the VM was online and offline was selected, the migration would fail
with the message that the --online flag is needed for running VMs
* if the the VM was offline and online was selected, the migration would
happen offline anyway
the name 'pve-manager' collides with our pve-manager package name,
which - from the user point of view - provides mainly the API and
WebUI.
An user could thus think that restarting 'pve-manager' would restart
the WebUIs server, which is relatable.
But, the pve-manager.service does not controls the WebUI or its
server but is responsible for starting all guest with 'onboot=1' in
their config on system boot and to stop all remaining running guests
on system shutdown.
Thus rename it to pve-guests and adapt its description. This may not
seem as ideal name at first glance, but its better than the current
option. Further it leads to log messages like:
> Starting PVE guests (Service providing start-on-boot and stop-all-on-shutdown)
> [...]
> Started PVE guests (Service providing start-on-boot and stop-all-on-shutdown)
> [...]
> Stopping PVE guests (Service providing start-on-boot and stop-all-on-shutdown)
which makes it clearer what happens, or what this service is for.
Alias the new service to the old pve-manager.service for legacy
reasons. While our services do not depend on it an user could have
made an own service which used pve-manager.service as synchronisation
point.
Linitian then complains about init.d/pve-manager not having a related
systemd service file. Instead of renmaning it just drop it.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>