3333 Commits

Author SHA1 Message Date
Emmanuel Kasper
72364aa4b3 Fix JSLint type confusion warnings
The type confusion warnings arose from string and integer concatenation,
and object properties of the name which were alternatively set with
strings and integers.

Signed-off-by: Emmanuel Kasper <e.kasper@proxmox.com>
2017-12-04 12:02:47 +01:00
Fabian Grünbichler
1e9bc77700 add versioned dependency on libpve-storage-perl
for API changes needed for new DiskSelector
2017-11-30 11:40:03 +01:00
Fabian Grünbichler
cdcbb81543 bump version to 5.1-38 2017-11-30 11:36:30 +01:00
Fabian Grünbichler
ab59186163 pveceph: add missing use statement 2017-11-30 11:31:35 +01:00
Thomas Lamprecht
69feda64dc ceph: create mon: fix & improve check if IP is in public net
If a CIDR gets passed to Net::IP it is expected to not be from the
middle of  an subnet, i.e., 192.168.1.12/24 is *not* OK but
192.168.1.0/24 would be OK.

As the Network/interfaces files also accepts CIDR notation for the
'address' param (now also for IPv4) this let to problems in our node
monitor IP detection code, which used the interface file and Net::IP to
find any address from the ceph public network.

So change to our newer helper PVE::Network::get_local_ip_from_cidr to
get all configured and ready (=up) IPs from this network.

Also handle the case where multiple networks where returned, add a
parameter to allow specifying one of those and ask the user to do so.

If no public network is configured and no mon-address parameter was
passed, we fall back to the remote node IP of the node, as was done
previously. We expect that the user only overwrites the mon-address
if he knows what he do and omit checks here.
2017-11-28 16:46:31 +01:00
Wolfgang Bumiller
c52848aa6f bump version to 5.1-37
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2017-11-28 16:42:55 +01:00
Thomas Lamprecht
62c8aab29f ceph: create pool: check for quorum at start
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-11-28 16:13:50 +01:00
Emmanuel Kasper
65a5984c01 Add each host SSL fingerprint to each node status
Signed-off-by: Emmanuel Kasper <e.kasper@proxmox.com>
Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-11-28 16:13:50 +01:00
Thomas Lamprecht
31fcad7651 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>
2017-11-28 15:59:58 +01:00
Dominik Csapak
7af3e8752c Do not translate Unix/Linux specific terms
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-11-28 11:26:40 +01:00
Emmanuel Kasper
f496963c43 Do not translate PC hardware specific terms
The SKU (Stock Keeping Unit) field was never translated anyway in our po files,
probably because nobody knew what the initials meant.

Signed-off-by: Emmanuel Kasper <e.kasper@proxmox.com>
2017-11-28 11:24:52 +01:00
Emmanuel Kasper
e9f57eddf1 Do not translate Qemu specific terms
Multiqueue is the proper name as used by Qemu, as seen in
https://www.linux-kvm.org/page/Multiqueue

Signed-off-by: Emmanuel Kasper <e.kasper@proxmox.com>
2017-11-28 11:24:52 +01:00
Emmanuel Kasper
ef28cbe059 Do not translate IT specific terms
Signed-off-by: Emmanuel Kasper <e.kasper@proxmox.com>
2017-11-28 11:24:52 +01:00
Emmanuel Kasper
46d1ca8428 Do not translate PC hardware specific terms
Signed-off-by: Emmanuel Kasper <e.kasper@proxmox.com>
2017-11-28 11:24:52 +01:00
Emmanuel Kasper
f251129c65 Do not translate Ceph specific terms
Signed-off-by: Emmanuel Kasper <e.kasper@proxmox.com>
2017-11-28 11:24:52 +01:00
Dominik Csapak
4d44cddb75 make ssh connection transparent
do not use an escape character for the host shell

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-11-17 10:37:31 +01:00
Thomas Lamprecht
d80ef0516c 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>
2017-11-14 14:08:52 +01:00
Wolfgang Bumiller
c6ef43b57f buildsys: add excludes to dh_fixperms
Instead of fixing up permissions manually as the make
install target is actually responsible for this (and already
doing it).

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2017-11-14 14:06:51 +01:00
Dominik Csapak
bbac93738d remove unecessary semicolons
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-11-14 13:27:07 +01:00
Dominik Csapak
dc9d74b1a8 whitespace cleanup
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-11-14 13:27:07 +01:00
Dominik Csapak
beeadf93f6 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)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-11-14 13:27:07 +01:00
Dominik Csapak
053babdbb4 add new tree and grid classes for the 'unknown' status
this displays a '?' similar to the check/cross, to show something
is wrong, but we do not know if its offline

also cleanup the classes a bit, so we do not have to have so many
different ones

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-11-14 13:27:07 +01:00
Dominik Csapak
2b45ac97ad add a new status column in the resourcestore
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-11-14 13:27:07 +01:00
Dominik Csapak
ae2bf8126c add default 'unknown' status for vms and containers
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-11-14 13:27:07 +01:00
Dominik Csapak
26f6f09c48 include a 'status' field for storages
by default it is unknown, if the storage is >= 60% full, it is
'nearfull', if it is >= 90% full, it is 'full'

if we have any other information, it is 'available'

we can use this information for the tree

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-11-14 13:27:07 +01:00
Dominik Csapak
71440a9457 add status to node stats
by default it is unknown,
if it is a standalone node its online
else it is either 'online' or 'offline' depending on the corosync status

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-11-14 13:27:07 +01:00
Dominik Csapak
0425782641 reset FileSelector grid when changing the storage
otherwise, when the new storage returns an error, we show the content
of the old storage

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-11-14 13:27:03 +01:00
Dominik Csapak
b2bbc355b1 use DiskStorageSelector in lxc/MPEdit.js
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-11-14 13:27:03 +01:00
Dominik Csapak
db1c31a0d2 use DiskStorageSelector in qemu/HDMove.js
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-11-14 13:27:03 +01:00
Dominik Csapak
fd09939884 use DiskStorageSelector in qemu/Clone.js
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-11-14 13:27:03 +01:00
Dominik Csapak
726e88169a use DiskStorageSelector in qemu/HDEfi.js
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-11-14 13:27:03 +01:00
Dominik Csapak
52b28e202c use DiskStorageSelector in qemu/HDEdit.js
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-11-14 13:27:03 +01:00
Dominik Csapak
0bdbbf1126 move lxc mountpoint edit from ResourceEdit.js to MPEdit.js
to follow qemu code

also fix the jslint errors in MountPointInputPanel and MountPointEdit

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-11-14 13:27:03 +01:00
Dominik Csapak
002a44bdcd add new DiskStorageSelector.js
this is a wrapper for selecting a storage/disk image

it is a simple container with 4 form fields inside
which can be reused, whenever we need to select a storage for a disk,
image etc.

we have code similar to this four times already
(qemu image creation, lxc mp creation, qemu cloning, qemu efidisk
creation)

so it was time to refactor this and use the storage information from the
backend instead of hardcoding values in the frontend

for this we need to pass the format=1 parameter to the storage api call,
and to not load the fileselector when it is initially disabled

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-11-14 13:27:03 +01:00
Emmanuel Kasper
569870bb31 Fix #1523: Display the Max Backups field only if relevant
Signed-off-by: Emmanuel Kasper <e.kasper@proxmox.com>
2017-11-07 09:35:45 +01:00
Emmanuel Kasper
af45e6f390 Add Storage Controller class
This controller will display the 'Max Backups' field only if the storage can
hold backups.

Signed-off-by: Emmanuel Kasper <e.kasper@proxmox.com>
2017-11-07 09:35:45 +01:00
Dominik Csapak
84505fb832 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>
2017-11-07 08:55:02 +01:00
Dominik Csapak
cac372930a do not use PVE::API2 in spiceproxy.pm
we do not need it there and withouth this we save ~30MB memory for
this daemon and its workers

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-11-07 08:51:15 +01:00
Dominik Csapak
117abb52c4 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)

this patch fixes that

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Acked-by: Emmanuel Kasper <e.kasper@proxmox.com>
2017-10-31 12:43:26 +01:00
Dominik Csapak
050b8c0247 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

which cannot be parsed correctly

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-10-31 08:28:10 +01:00
Alwin Antreich
7f9a9a1613 Add %-used and min_size to "pveceph lspools" command
Signed-off-by: Alwin Antreich <a.antreich@proxmox.com>
2017-10-31 08:21:32 +01:00
Alwin Antreich
5bee4fcb01 Fix: #1542, use percent_used key instead of calculation
Signed-off-by: Alwin Antreich <a.antreich@proxmox.com>
2017-10-31 08:21:32 +01:00
Dominik Csapak
f71a733c31 FirewallOptions: fix DHCP default value
we always had dhcp enabled by default in the backend, but
showed 'Disabled' on the gui, this patch show 'Enabled' by default

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-10-31 08:16:15 +01:00
Wolfgang Bumiller
131401db6d bump version to 5.1-36 2017-10-25 11:16:27 +02:00
Fabian Grünbichler
722cc48803 bump version to 5.1-35 2017-10-23 09:21:06 +02:00
Wolfgang Bumiller
b325d69e0e bump version to 5.0-34 2017-10-20 12:04:34 +02:00
Dominik Csapak
d7faccb044 make bluestore the default on the api
with this we also have to send '0' to from the frontend, when the
bluestore checkbox is not checked

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-10-20 12:01:41 +02:00
Emmanuel Kasper
9f67d8f117 Render full name of VirtIO Block controller
This will hopefully reduce confusion with SCSI VirtIO controller

Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-10-19 11:46:24 +02:00
Emmanuel Kasper
cf799879a4 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>
2017-10-19 11:46:24 +02:00
Emmanuel Kasper
b02cc619e6 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>
2017-10-19 11:46:24 +02:00