Commit Graph

80 Commits

Author SHA1 Message Date
Fabian Grünbichler
3b81e495cd aplinfo: improve checksum handling
instead of calling md5sums, use perl's Digest::MD5.
also support SHA512 via perl's Digest::SHA, to enable a
transition away from MD5.
2016-08-24 10:09:12 +02:00
Fabian Grünbichler
c351eda952 aplinfo: replace system() with run_command/rename 2016-08-24 09:48:15 +02:00
Caspar Smit
d6c493923a Fixed a small typo
Signed-off-by: Caspar Smit <casparsmit@supernas.eu>
Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2016-03-31 10:56:49 +02:00
Caspar Smit
92c11ee1ca Allow migrate-all button on HA enabled VMs
Signed-off-by: Caspar Smit <casparsmit@supernas.eu>
Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2016-03-31 10:56:22 +02:00
Caspar Smit
6677f6402e Skip templates when using the start all VMs button
Refactored and now using PVE::QemuConfig and PVE::LXC::Config
Moved the next if.. statements into the corresponding branches

Signed-off-by: Caspar Smit <casparsmit@supernas.eu>
Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2016-03-31 10:51:11 +02:00
Caspar Smit
17e3b3b27f Allow non-root to use start/stop/migrate all buttons
Signed-off-by: Caspar Smit <casparsmit@supernas.eu>
Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2016-03-31 10:50:34 +02:00
Fabian Grünbichler
bbcfdc08cc use PVE::Storage::config(), not cfs_read_file() 2016-03-30 10:35:58 +02:00
Fabian Grünbichler
7141ae254a Use methods from PVE::QemuConfig
use config_file and load_config from PVE::QemuConfig
2016-03-08 11:53:33 +01:00
Fabian Grünbichler
e93408d600 LXC refactoring
call load_config in PVE::LXC::Config instead of PVE::LXC
2016-03-03 10:44:02 +01:00
Thomas Lamprecht
01b753b6b1 syslog: allow since/until parameters
allow the since/until parameters which journalctl understands
We use a really simple regex to check a valit date (time) stamp.

This can be done as this API call gets mainly used by the GUI where
we have full controll over what we send and additional journalctl
has already a good timestamp parser which can handle that.
2016-03-02 06:24:55 +01:00
Dietmar Maurer
05b252dc5c PVE::API2::Nodes::Nodeinfo: import raise_param_exc 2016-03-01 09:22:39 +01:00
Wolfgang Link
82282acf4f add pveam download
With this function you can download templates from the repositories.
2016-02-26 11:37:11 +01:00
Thomas Lamprecht
89ceb8026a use max_workers from datacenter.cfg for stopall/migrateall
If set limit the maximal worker count to the new datacenter.cfg
setting 'max_workers'.

For stopall we prefer this over the cpu count if it's set.

For migrateall we prefer the parameter but allow now to ommit
the parameter and then we use the new setting if set.
if both are not set we throw an error.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2016-02-11 11:13:55 +01:00
Thomas Lamprecht
10a9a736ed fix PVE::HA use clause so HA resources get registered
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2016-01-27 17:11:21 +01:00
Wolfgang Bumiller
675946f221 fix #871: netstat: include veth devices
Include container's veth devices in /nodes/{node}/netstat
2016-01-25 10:59:48 +01:00
Dietmar Maurer
37bec89547 improve log messages at sytem shutdown 2016-01-22 11:24:17 +01:00
Thomas Lamprecht
efedd8c36f make startall wait up to 60 seconds for quorum
Previously we waited 10 seconds, in PVE 4 system sometimes need more
time to initialize all services so the didn't execute the startall
command even if a few seconds later cfs quorum was etablished.
This is a background process started from the pve-manager init
script, thus waiting doesn't interferes with other processes, so
wait long enough.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2015-11-10 07:48:20 +01:00
Emmanuel Kasper
6bbdf981d1 Use protected mode to be able to execute root system commands
Signed-off-by: Emmanuel Kasper <e.kasper@proxmox.com>
2015-11-06 10:06:11 +01:00
Dietmar Maurer
cdb5a20942 report: change return type to string 2015-11-03 18:14:51 +01:00
Emmanuel Kasper
34ada77a13 Add REST endpoint for /report call 2015-11-03 18:10:44 +01:00
Thomas Lamprecht
3625a09137 Fix check if vm is ha managed in get_start_stop_list
The check used was completely wrong and so the startall and stopall
API calls touched HA managed service, which they shouldn't.

Using the vm_is_ha_managed call from the HA stack fixes that.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2015-10-20 09:50:00 +02:00
Thomas Lamprecht
04b2004b36 fix lxc config key in get_start_stop_list sub
When adding the new LXC config format we forgot to adapt the
get_start_stop_list and do s/pve.startup/onboot/

This fixes that qemu VMs were started always before LXC CTs,
irregardless of the defined order.

This also let's us simplify the surrounding code and reduce code
reuse.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2015-10-20 09:46:16 +02:00
Wolfgang Bumiller
7a9486a7e1 DNS ui/api: ipv6 support 2015-10-05 12:33:42 +02:00
Emmanuel Kasper
eb5d01365b Rename onboot and startup parameters to follow vm.conf synthax
This fixes the problem of containers not autostarting with onboot=1
2015-09-08 11:13:32 +02:00
Dietmar Maurer
b38516ebec add use clause for PVE::API2::LXC::Status 2015-09-07 11:01:03 +02:00
Emmanuel Kasper
1b5e56f283 Fix package path to startup and shutdown subroutines 2015-09-07 10:58:12 +02:00
Thomas Lamprecht
c2dbc5e32d fix bug #662: wrong subroutine for parsing startup order
Changed from old, now missing, subroutine parse_startup() to new
pve_parse_startup_order()

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2015-07-28 09:31:09 +02:00
Dietmar Maurer
761a2b311c allow to download templates with type lxc 2015-07-02 11:25:08 +02:00
Dietmar Maurer
317146196c API change: remove bootlog API, use new dump_journal helper for syslog
The systemd journal contains boot log entries.
2015-06-09 12:18:30 +02:00
Dietmar Maurer
74e3975e12 remove UBC GUI 2015-06-02 11:53:19 +02:00
Wolfgang Bumiller
eb6d749792 pass port family to next_vnc_port 2015-05-12 12:16:26 +02:00
Dietmar Maurer
2c27e4b7c7 lxc: implement startup and onboot option 2015-04-22 10:49:30 +02:00
Dietmar Maurer
989b774393 depend on new pve-container package, activate LXC API 2015-04-18 09:40:44 +02:00
Dietmar Maurer
0532bd2857 re-add template download code
this was removed by accident.
2015-04-16 07:58:50 +02:00
Dietmar Maurer
dafb62468e remove OpenVZ related code
There is still no OpenVZ for kernel 3.10 or newer, so we remove that code now.
2015-03-27 13:43:59 +01:00
Dietmar Maurer
7e5cb2f0b8 use PVE::HA::Config to skip HA enabled VMs 2015-03-27 13:43:59 +01:00
Dietmar Maurer
42a55af27b skip test for HA managed VMs
unless we have a replavement for rgmanager
2015-03-03 09:20:20 +01:00
Alexandre Derumier
9c8a09a76d api2 : node : add migrate_all
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2015-02-11 07:01:44 +01:00
Alexandre Derumier
c09c7160a5 api2: node : startall : add force option
force start if onboot = 0

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2015-02-11 07:01:31 +01:00
Dietmar Maurer
8dfca17e2e cleanup novnc console code
And implement novnc console for openvz and shell (needs vncterm update).
2014-06-24 17:35:17 +02:00
Dietmar Maurer
4a07fcedb7 depend on pve-firewall, connect firewall API 2014-05-06 12:43:41 +02:00
Dietmar Maurer
9dace87245 Merge remote-tracking branch 'origin/pve-ceph' 2013-12-21 08:03:57 +01:00
Dietmar Maurer
a51ceeb704 fix execute API 2013-12-10 12:05:02 +01:00
Dietmar Maurer
7774df7851 use get_standard_option() for spice options 2013-12-10 10:03:10 +01:00
Dietmar Maurer
b289829f91 factor out common code into run_spiceterm 2013-12-10 09:46:00 +01:00
Dietmar Maurer
f25af3a938 set correct keymap for spiceterm 2013-12-10 08:36:58 +01:00
Dietmar Maurer
2d802f8c3b include spiceterm 2013-12-10 07:35:57 +01:00
Dietmar Maurer
409935933e fix execute API
- remove command from index (so that pvesh does not list it)
- use POST instead of GET
- correctly check permissions
- return value with status codes and data (allow expections)
2013-12-09 11:08:02 +01:00
Stefan Priebe
87c3e93147 support to execute multiple commands in one request 2013-12-09 08:44:25 +01:00
Dietmar Maurer
38db610ae6 move code to Ceph.pm, create API for ceph 2013-11-13 06:59:07 +01:00