5
0
mirror of git://git.proxmox.com/git/pve-ha-manager.git synced 2025-02-01 09:47:24 +03:00

730 Commits

Author SHA1 Message Date
Fabian Ebner
76b83c7207 Add update_service_config to the HA environment interface and simulation
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2019-10-11 12:25:53 +02:00
Thomas Lamprecht
c9b21b5a0b followup: s/ss/sc/
fixes: dcb4a2a48404a8bf06df41e071fea348d0c971a4

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-05 20:25:34 +02:00
Thomas Lamprecht
6e8b0c2254 fix # 2241: VM resource: allow migration with local device, when not running
qemu-server ignores the flag if the VM runs, so just set it to true
hardcoded.

People have identical hosts with same HW and want to be able to
relocate VMs in such cases, so allow it here - qemu knows to complain
if it cannot work, as nothing bad happens then (VM stays just were it
is) we can only win, so do it.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-05 20:17:29 +02:00
Thomas Lamprecht
dcb4a2a484 get_verbose_service_state: render removal transition as 'deleting'
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-05 19:11:46 +02:00
Thomas Lamprecht
fbda265807 fix #1919, #1920: improve handling zombie (without node) services
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-05 18:58:26 +02:00
Thomas Lamprecht
b6da6101a4 read_and_check_resources_config: remove dead if branch
we only come to the if (!$vmd) check if the previous
if (my $vmd = $vmlist->{ids}->{$name) is taken, which means $vmd is
always true then.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-05 18:58:26 +02:00
Thomas Lamprecht
41236dcf61 LRM shutdown: factor out shutdown type to reuse message
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-05 17:55:09 +02:00
Thomas Lamprecht
a19f2576aa LRM shutdown request: propagate if we could not write out LRM status
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-05 17:51:21 +02:00
Fabian Ebner
1d9316ef54 factor out resource config update from api to HA::Config
This makes it easier to update the resource configuration from within the CRM/LRM stack,
which is needed for the new 'stop' command.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2019-10-04 17:20:25 +02:00
Fabian Ebner
b94b478580 Rename target to param in simulation
In preparation to introduce a stop command with a timeout parameter.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2019-09-30 17:14:10 +02:00
Fabian Ebner
3ac1ee6b24 Make parameters for LRM resource commands more flexible
This will allow for new parameters beside 'target' to be used.
This is in preparation to allow for a 'timeout' parameter for a new 'stop' command.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2019-09-30 16:49:08 +02:00
Fabian Ebner
3d42b01bf0 Cleanup
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2019-09-26 15:11:13 +02:00
Fabian Ebner
014cf130a9 Whitespace cleanup
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2019-09-26 15:09:46 +02:00
Thomas Lamprecht
58500679bc bump version to 3.0-2
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-11 19:27:27 +02:00
Thomas Lamprecht
9db3786bad buildsys: use DEB_VERSION_UPSTREAM for buildir
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-11 19:23:51 +02:00
Rhonda D'Vine
3cf61f860a Add missing Dependencies to pve-ha-simulator
This two missing dependencies makes it possible to install the package
on a stock Debian system (without PVE)

Signed-off-by: Rhonda D'Vine <rhonda@proxmox.com>
2019-06-27 22:10:22 +02:00
Christian Ebner
993af4280e fix #2234: fix typo in service description
replace Ressource by Resource

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2019-06-12 10:50:46 +02:00
Thomas Lamprecht
b9828b7552 services: update PIDFile to point directly to /run
fixes a complaint from system:
> PIDFile= references path below legacy directory /var/run/'

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-05-26 15:16:15 +02:00
Thomas Lamprecht
e7958dd420 buildsys: switch upload dist over to buster
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-05-23 18:18:16 +02:00
Thomas Lamprecht
bd29ad2938 bump version to 3.0-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-05-22 19:18:40 +02:00
Thomas Lamprecht
e72075d069 buildsys: use dpkg-dev makefile helpers for pkg info
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-05-22 19:11:29 +02:00
Thomas Lamprecht
d9906847c2 handle the case where a node gets fully removed
If an admin removes a node he may also remove /etc/pve/nodes/NODE
quite soon after that, if the "node really deleted" logic of our
NodeStatus module has not triggered until then (it waits an hour) the
current manager still tries to read the gone nodes LRM status, which
results in an exception. Move this exception to a warn and return a
node == unkown state in such a case.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-04-10 12:41:19 +02:00
Thomas Lamprecht
5d880e15ef coding style cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-04-10 12:29:49 +02:00
Thomas Lamprecht
42294dfd6b bump version to 2.0-9
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-04-04 16:27:49 +02:00
Thomas Lamprecht
ea998b07ef service data: only set failed_nodes key if needed
Currently we always set this, and thus each services gets a
"failed_nodes": null,
entry in the written out JSON ha/manager_status

so only set if neeed, which can reduce mananager_status quite a bit
with a lot of services.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-03-30 19:52:49 +01:00
Thomas Lamprecht
32ae610b9c partially revert previous unclean commit
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-03-30 19:21:03 +01:00
Thomas Lamprecht
31c1bd1f40 make clean: also clean source tar ball
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-03-30 19:17:03 +01:00
Thomas Lamprecht
5bb0c3daf4 d/control: remove obsolete dh-systemd dependency
We do not need to depend explicitly on dh-systemd as we have a
versioned debhelper dependency with >= 10~, and lintian on buster for
this .dsc even warns:

> build-depends-on-obsolete-package build-depends: dh-systemd => use debhelper (>= 9.20160709)

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-03-30 19:03:53 +01:00
Thomas Lamprecht
f936251577 add target to build DSC
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-03-30 18:59:36 +01:00
Thomas Lamprecht
dd0068052e add gitignore
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-03-30 18:59:01 +01:00
Thomas Lamprecht
06b64405fa d/control: remove unused libsystemd-dev from build dependencies
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-03-21 13:18:37 +01:00
Thomas Lamprecht
c5c7faf608 lrm: exit on restart and agent lock lost for > 90s
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-03-15 10:48:44 +01:00
Thomas Lamprecht
f3e2a4f269 PVE2 Env: get_ha_settings: don't die if pmxcfs failed
This is a method called in our shutdown path, so if we die here we
may silent a shutdown, nad just ignore it.
In combination with the fact that our service unit is configured
with: 'TimeoutStopSec=infinity' this means that a systemctl stop may
wait infinitely for this to happen, and any other systemctl command
will be queued for that long.

So if pmxcfs is stopped, we then get a shutdown request, we cannot
start pmxcfs again, at least not through systemd.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-03-15 09:46:07 +01:00
Thomas Lamprecht
289e478492 treewide trailing whitespace cleanup
generated by: find . -name '*.pm' -exec sed -i 's/\s*$//g' {} \;

As I touched almost any file here anyway I'm not scared to appear in
git blame ;-) also it has support to suppress whitespace changes.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-03-14 13:18:06 +01:00
Thomas Lamprecht
ffb4bc0d8a bump version to 2.0-8
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-03-06 08:07:09 +01:00
Thomas Lamprecht
6b10f92d23 d/control: do not track qemu-server and pve-container dependency
While it would be correct to have them tracked here we cannot do this
at the moment, as with those two also depend on pve-ha-manager, and
with dpkg packaged under strech there's an issue with such cyclic
dependencies and trigger cycle detection only resolved for buster[0]

Currently, the issue exists on the following condition:

* update of pve-ha-manager plus either pve-container or qemu-server
* but _no_ update of pve-manager in the same upgrade cycle

[0]: 7f43bf5f93

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-03-06 08:07:09 +01:00
Thomas Lamprecht
b65075d6a7 bump version to 2.0-7
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-03-04 10:37:35 +01:00
Thomas Lamprecht
9698b69403 d/control: bump version dependency to pve-doc-generator
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-02-22 13:31:32 +01:00
Christian Ebner
2dbc366995 1891 Add zsh command completion for ha-manager CLI tools
Add the zsh command completion generation for the ha-manager CLI tools.

This adds the automatic generation of the autocompletion scripts for zsh

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2019-02-22 11:44:13 +01:00
Thomas Lamprecht
6b68528bc6 api: delete resource: refactor and cleanup indentation
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-01-26 12:05:07 +01:00
Thomas Lamprecht
60d1b1cacf fix #1602: allow to delete 'ignored' services over API
service_is_ha_managed returns false if a service is in the resource
configuration but marked as 'ignore', as for the internal stack it is
as it wasn't HA managed at all.

But user should be able to remvoe it from the configuration easily
even in this state, without setting the requesttate to anything else
first.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-01-25 09:31:45 +01:00
Thomas Lamprecht
a9a49e32c1 fix #1794: VM resource: catch qmp command exceptions
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-01-25 09:27:28 +01:00
Thomas Lamprecht
2eb4a7efca api: resource migrate: add description for node parameter
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-01-24 14:19:36 +01:00
Thomas Lamprecht
7e92211a2c fix #1842: do not pass forceStop to CT shutdown
The vm_shutdown parameter forceStop differs in behaviour between VMs
and CTs. While on VMs it ensures that a VM gets stoppped if it could
not shutdown gracefully only after the timeout passed, the container
stack always ignores any timeout if forceStop is set and hard stops
the CT immediately.
To achieve this behaviour for CTs too, the timeout is enough, as
lxc-stop then does the hard stop after timeout itself.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-01-23 09:43:17 +01:00
Thomas Lamprecht
a2b2fffaa8 fence cfg: count_devices: improve comment
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-01-13 13:17:12 +01:00
Thomas Lamprecht
89d5a77854 fence cfg parser: check command explicit, mark fence_all as todo
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-01-13 13:07:00 +01:00
Thomas Lamprecht
9a77e05914 fence config parser: output all errors at once
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-01-13 12:45:45 +01:00
Thomas Lamprecht
8937a758df fence config parser: early return on ignored devices
We do not support all of the dlm.conf possibilities, but we also do
not want to die on such "unkown" keys/commands as an admin should be
able to share this config if it is already used for other purposes,
e.g. lockd, gfs, or such.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-01-13 12:45:45 +01:00
Thomas Lamprecht
98dca1a462 FenceConfig: move line parsing out to closure
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-01-13 12:45:45 +01:00
Thomas Lamprecht
92cfcee1ab FenceConfig: whitespace cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-01-13 12:45:45 +01:00