[pve-devel] [PATCH ha-manager 00/10] improve pve-ha-simulator all over the place

Thomas Lamprecht t.lamprecht at proxmox.com
Wed Dec 21 16:44:37 CET 2016


After not touching the HA simulator I tried to make some improvements and
bugfixes.

The changes summarized are:
First two patches fix some longer known problems with the cluster logs
scrollable text view.
Some small fixes, like using POSIX::_exit instead of perls exit and making
the reading from the childs stdout and stderr more robust.

The status gets now composed in the same way as the API status call does.
Fixing the sim.pl test script, see commit for details.

Two preparation commits for allowing us to factor and unify the
sim_hardware_cmd more easily.
And lastly the first GUI change which allows us to set all possible service
request states.

This should nowhere affect the real world PVE2 env. and as all regression
test run through unchanged the TestHardware should work as good as it had.

I have some other small fixes and feature patches in work, but need more
time finalizing them. But I wanted to send a few changes already before
Christmas.

The bigger changes (last four patches) can be seen as RFC.

Thomas Lamprecht (10):
  Simulator: do not use cursor position to insert log
  Simulator: fix scrolling to end of cluster log view
  use POSIX::_exit
  Status: factor out new service state calculation
  more robust log read from child
  ensure test/sim.pl always use the currently developed code
  allocate HA Env only once per service and node
  use HA environments after_fork to close all inherited FDs
  factor out and unify sim_hardware_cmd
  Simulator: allow new service request states

 src/PVE/API2/HA/Status.pm      |  53 +-------------
 src/PVE/HA/Sim/Hardware.pm     | 146 ++++++++++++++++++++++++++++++++++++++
 src/PVE/HA/Sim/RTEnv.pm        |  13 ++++
 src/PVE/HA/Sim/RTHardware.pm   | 149 ++++++++++++++++++++-------------------
 src/PVE/HA/Sim/TestHardware.pm | 156 +++++++----------------------------------
 src/PVE/HA/Tools.pm            |  49 +++++++++++++
 src/test/sim.pl                |  45 ++++++++++--
 7 files changed, 352 insertions(+), 259 deletions(-)

-- 
2.1.4





More information about the pve-devel mailing list