Commit Graph

19 Commits

Author SHA1 Message Date
Wolfgang Bumiller
b03b47491f test: mock PVE::Cluster::cfs_update
Because the replication's purge_old_state() function now
fails if cfs_update() fails, and since it tries to access
the actual local pmxcfs it should never have been called by
tests anyway.
2017-10-18 15:31:00 +02:00
Wolfgang Bumiller
12c206a5ab 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
5b35845009 tests: update pvesr_lock_path variable location 2017-06-27 15:16:41 +02:00
Dietmar Maurer
2aa029571c PVE/API2/Replication.pm: add $verbose parameter run_jobs() 2017-06-20 08:58:48 +02:00
Dietmar Maurer
d092dc4f83 use new replication helpers from pve-guest-common 2017-06-12 06:59:21 +02:00
Dietmar Maurer
810c6776d9 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
Wolfgang Bumiller
72741c0b94 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
f842e812e0 replication: add replication log files 2017-06-07 17:27:00 +02:00
Dietmar Maurer
356fbf797f replication: save list of used storage IDs 2017-06-07 11:30:52 +02:00
Dietmar Maurer
e137f69fd8 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
c364b61f8e PVE::Replication - do not pass time to logfunc
This is simply not neccessary.
2017-06-06 06:36:03 +02:00
Dietmar Maurer
d255af0128 PVE::Replication - use new PVE::ReplicationState class 2017-06-02 12:28:43 +02:00
Wolfgang Bumiller
dc213d136f 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
39c41c9dc5 ReplicationTestEnv.pm: avoid warning about undefined value 2017-05-31 08:23:47 +02:00
Dietmar Maurer
331025d954 ReplicationTestEnv.pm: mock get_ssh_info and ssh_info_to_command 2017-05-31 08:23:47 +02:00
Dietmar Maurer
4550bb78c3 ReplicationTestEnv.pm: mock storage content methods 2017-05-31 08:23:46 +02:00
Dietmar Maurer
f70997ea80 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
c5014e65b2 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
d0920c29e6 add regression test environment for replication 2017-05-31 08:23:46 +02:00