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.
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>
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>
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>
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>
- 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)
Changes since V2:
- swap in / out / transmit / receive again
Changes since V1:
- new return format (use an arrayref instead of a hash to be JS compatible)
- swap in / out / transmit / receive
Signed-off-by: Stefan Priebe <s.priebe@profihost.ag>