41 Commits

Author SHA1 Message Date
Dietmar Maurer
5c48475ddf replication: fix regression tests 2017-06-29 07:46:56 +02:00
Wolfgang Bumiller
d0013cdb6b tests: mock PVE::Cluster::get_members and adapt fail test
Commit 3385399339c94 ("replication: keep retrying every 30 minutes in
error state") changed the retry behavior to not stop after the 3rd error
and then stick to half-hour intervals. This needs to be reflected in the
tests. The numbers here match. (1900 + 30*60 = 3700).

Commit fd844180a7efa ("replication: don't sync to offline targets on
error states) changed the retry behavior to check whether the target
node is online. If this is not the case we fail right away. This
introduced a dependency on PVE::Cluster::get_members which we now need
to mock. Tests currently use node names "node{1,2,3}", so I just mock
those 3.
2017-06-28 06:05:44 +02:00
Wolfgang Bumiller
ac61e6415c tests: update pvesr_lock_path variable location 2017-06-27 15:16:41 +02:00
Dietmar Maurer
784abe61a5 PVE/API2/Replication.pm: add $verbose parameter run_jobs() 2017-06-20 08:58:48 +02:00
Dietmar Maurer
7519e92caa use new replication helpers from pve-guest-common 2017-06-12 06:59:21 +02:00
Dietmar Maurer
7feb60e968 PVE::Replication - remove dependency to PVE::LXC/PVE::QemuServer
So that we can move the whole class to package pve-guest-common.
2017-06-12 05:59:51 +02:00
Dietmar Maurer
6411310f09 PVE::Replication - pass guest_class to run_replication
So that we can (re)use methods from PVE::AbstractConfig.
2017-06-12 05:59:51 +02:00
Wolfgang Bumiller
b1bfcfc30a tests: override GuestHelper's lockdir
Otherwise the user running the tests may either create (and
end up being the ownderof) the system wide
/var/lock/pve-manager/* files, or the tests will fail (or
loop endlessly) if the user doesn't have access to them.
2017-06-09 12:06:30 +02:00
Dietmar Maurer
bb5cb56104 replication: add replication log files 2017-06-07 17:27:00 +02:00
Dietmar Maurer
b94223b028 replication: improve stale volume detection, allow sync from parent snapshot
We pass a list of storage to scan for stale volumes to prepare_local_job().
So we make sure that we only activate/scan related storages.

Snapshot rollback may remove local replication shapshots. In that case
we still have the $conf->{parent} snapshot on both sides, so we
can use that as base snapshot.
2017-06-07 17:26:56 +02:00
Dietmar Maurer
eda1b842bb replication: save list of used storage IDs 2017-06-07 11:30:52 +02:00
Dietmar Maurer
c482645c7a use new PVE::ReplicationState::replication_snapshot_name() 2017-06-07 09:40:08 +02:00
Dietmar Maurer
c823e097ac replication: add last_node to replication state
So that we know which node produced the state. This is not always
the local node, because we copy the state on migrate.
2017-06-06 06:49:05 +02:00
Dietmar Maurer
da95168678 PVE::Replication - do not pass time to logfunc
This is simply not neccessary.
2017-06-06 06:36:03 +02:00
Dietmar Maurer
b541d31729 PVE::Replication - use new PVE::ReplicationState class 2017-06-02 12:28:43 +02:00
Wolfgang Bumiller
c5e08dfe7e replication: use a dedicated lock file
Otherwise $update_job_state's file_set_contents() call
drops our lock.
2017-06-02 06:10:55 +02:00
Dietmar Maurer
2cbdbd8105 make check: run replication_test6.pl 2017-05-31 15:29:53 +02:00
Dietmar Maurer
1f7e36396e replication - allow removal of jobs with target on local node 2017-05-31 13:54:40 +02:00
Dietmar Maurer
f11e1a29a6 replication_test5.pl: add test for job removal 2017-05-31 08:23:47 +02:00
Dietmar Maurer
62a162e74d ReplicationTestEnv.pm: avoid warning about undefined value 2017-05-31 08:23:47 +02:00
Dietmar Maurer
f27584525a bin/test/Makefile: run all replication tests 2017-05-31 08:23:47 +02:00
Dietmar Maurer
0fb6a611cf PVE::Replication::replicate - implement replicate
The actual volume replication is done in replicate_volume(), which is just
a stub for now.

I also added a regression test replication_test5.pl to verify basic
functions.
2017-05-31 08:23:47 +02:00
Dietmar Maurer
6bc7d54ae9 ReplicationTestEnv.pm: mock get_ssh_info and ssh_info_to_command 2017-05-31 08:23:47 +02:00
Dietmar Maurer
757dcc6bc4 ReplicationTestEnv.pm: mock storage content methods 2017-05-31 08:23:46 +02:00
Dietmar Maurer
7c42d1713c pvesr run: add --verbose flag
We can now pass a $logfunc parameter to replicate() to
produce more verbose logs/output. This is especially useful
for regression testing.
2017-05-31 08:23:46 +02:00
Dietmar Maurer
a809ae4793 replication_test4.pl: Test replication job failure 2017-05-31 08:23:46 +02:00
Dietmar Maurer
dfdd945b97 ReplicationTestEnv.pm: add job tracking log
To generate persistent logs with job state/config changes.
2017-05-31 08:23:46 +02:00
Dietmar Maurer
5fd4efc2dd replication_test3.pl: regression test for replication to same node 2017-05-31 08:23:46 +02:00
Dietmar Maurer
beaf68f989 replication_test2.pl: test replication scheduler 2017-05-31 08:23:46 +02:00
Dietmar Maurer
e07cca0c70 add regression test environment for replication 2017-05-31 08:23:46 +02:00
Dietmar Maurer
0a06505efa perftest2.pl: use -k (keepalive) to show max performance 2016-12-28 12:06:27 +01:00
Dietmar Maurer
11be8d6e47 remove PVE::API2Client class and related examples
We now have all API client code in an extra package:

https://git.proxmox.com/?p=pve-apiclient.git;a=summary
2016-12-28 11:45:47 +01:00
Dietmar Maurer
75b024bbac code cleanup 2016-12-28 11:34:01 +01:00
Thomas Lamprecht
1ba0bf9cbc Makefile: fix distclean target
As some Makefiles in sub directories do not implement the distclean
target, namely:
PVE/Service/Makefile
PVE/CLI/Makefile

This target is broken.

As all other implementations just redirect to the 'clean' target I
do not implement the missing ones but rather remove all such
targets. Keep it just in the top level directory, for consistence
sake with other pve repos, and redirect it there directly to the
clean target.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2016-09-28 08:21:48 +02:00
Dietmar Maurer
51215f02dc cleanup performance test 2013-03-28 13:11:01 +01:00
Dietmar Maurer
7e9387f901 add performance test using Net::SSLeay 2013-03-28 09:48:09 +01:00
Dietmar Maurer
326ed96b62 add simply perf test using 'ab' 2013-03-28 09:47:51 +01:00
Dietmar Maurer
8372a03e8d implement new auto balloon algorithm
Moved code into PVE/AutoBalloon.pm, and added a regression tests in bin/test/balloontest.pl
2012-12-28 12:50:13 +01:00
Dietmar Maurer
96338cef75 fix APIClient and examples 2012-01-17 09:08:19 +01:00
Dietmar Maurer
c3731ed285 removed automake/autoconf, removed unused files 2011-08-23 16:11:04 +02:00
Dietmar Maurer
5910d3b7bd imported from svn 'pve-manager/pve2' 2011-08-23 07:40:22 +02:00