Commit Graph

167 Commits

Author SHA1 Message Date
Dietmar Maurer
22ce136731 replication: improve schedule_job_now
do no not modify anything if there is no state
2017-06-28 12:01:50 +02:00
Wolfgang Bumiller
b90dc712c5 replication: add schedule_job_now helper 2017-06-28 11:54:11 +02:00
Wolfgang Bumiller
621b955fb8 replication: sort time stamps numerically 2017-06-28 09:52:17 +02:00
Dietmar Maurer
1b82f17117 replication: pass $noerr to run_replication_nolock 2017-06-28 07:54:11 +02:00
Wolfgang Link
14849765e5 Add new function delete_guest_states. 2017-06-27 12:51:44 +02:00
Wolfgang Bumiller
fd844180a7 replication: don't sync to offline targets on error states
There's no point in trying to replicate to a target node
which is offline. Note that if we're not already in an
error state we do still give it a try in order for this to
get logged as an error at least once.
2017-06-27 12:13:24 +02:00
Wolfgang Bumiller
3385399339 replication: keep retrying every 30 minutes in error state
Otherwise we never get out of it.
2017-06-27 12:13:24 +02:00
Dietmar Maurer
92a243e986 PVE::ReplicationState - cleanup job state on job removal
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2017-06-27 11:53:28 +02:00
Dietmar Maurer
44972014b2 PVE::ReplicationState::purge_old_states - new helper 2017-06-27 10:15:01 +02:00
Dietmar Maurer
2c508173ea PVE::ReplicationState::write_job_state - allow to remove state completely 2017-06-27 08:13:36 +02:00
Dietmar Maurer
5e93f430f8 PVE/Replication.pm: also log when we thaw the filesystem 2017-06-23 13:18:08 +02:00
Dietmar Maurer
6c2f0982fe bump version to 2.0-6 2017-06-22 13:05:10 +02:00
Dominik Csapak
93c3695b05 change replica log timestamp to a human readable format
modeled after the timestamps in vm migration

this does not impact the regression tests, because they
overwrite 'get_log_time' anyway

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-06-22 10:17:15 +02:00
Dietmar Maurer
04ec2e5220 bump version to 2.0-5 2017-06-22 08:44:18 +02:00
Dietmar Maurer
1c9607105a PVE::AbstractMigrate - new helpers to handle replication jobs 2017-06-21 12:24:57 +02:00
Dietmar Maurer
210a5f7970 PVE::ReplicationState::extract_vmid_tranfer_state - new helper
moved from PVE::QemuMigrate
2017-06-21 12:24:06 +02:00
Dietmar Maurer
18c369255d PVE::ReplicationConfig::switch_replication_job_target - new helper
moved from PVE::QemuMigrate
2017-06-21 11:43:24 +02:00
Dietmar Maurer
c64fb36899 PVE/ReplicationConfig.pm: store job id inside job config
To simplify code.
2017-06-20 13:19:53 +02:00
Dietmar Maurer
3ec43aafc8 PVE::Replication::run_replication - add verbose parameter
used for regression tests
2017-06-20 08:54:01 +02:00
Dietmar Maurer
5899ebbd2d PVE::Replication::run_replication - return replicated $volumes 2017-06-20 08:51:08 +02:00
Dietmar Maurer
c17dcb3eb3 PVE::ReplicationState - new helpers record_job_start/record_job_end 2017-06-20 07:13:00 +02:00
Dietmar Maurer
e4f6301672 PVE::Replication::find_common_replication_snapshot - new helper
This is just a cleanup (simply factor out code from replicate()).
2017-06-20 07:13:00 +02:00
Dietmar Maurer
637b7acd2e PVE::ReplicationConfig::find_local_replication_job - new helper 2017-06-20 07:13:00 +02:00
Wolfgang Bumiller
c475e16d11 replication: replicate_volume: rate can be undefined
as it is optional in which case we want to pass undef to
stogae_migrate
2017-06-19 09:58:08 +02:00
Dietmar Maurer
7862a35c71 replicate_volume: implement rate limit and insecure 2017-06-14 08:44:13 +02:00
Dietmar Maurer
c324e90764 call get_replicatable_volumes with $vmid parameter 2017-06-13 09:17:50 +02:00
Dietmar Maurer
54b79ff5e2 get_replicatable_volumes: add $vmid parameter 2017-06-13 09:00:24 +02:00
Dietmar Maurer
14f17b497a PVE/AbstractConfig.pm - include missing classes 2017-06-13 06:13:39 +02:00
Dietmar Maurer
55222f3747 PVE/ReplicationState.pm: implement write_vmid_job_states
Update all job states related to a specific $vmid
2017-06-12 11:33:05 +02:00
Wolfgang Link
683a30e062 Make rollback compatible with storage replica.
If we rollback we have to clean up all local replication snapshots.
2017-06-12 10:54:33 +02:00
Dietmar Maurer
d7f305c0bc PVE::Replication - pass $cleanup parameter to get_replicatable_volumes 2017-06-12 09:05:50 +02:00
Dietmar Maurer
3f85b14d89 PVE::AbstractConfig - add prototype for get_replicatable_volumes 2017-06-12 09:03:14 +02:00
Dietmar Maurer
b499eccbf0 PVE::Replication::prepare - allow to pass undefined $jobid
And remove all replication snapshots in that case. This is useful
for snapshot rollback.
2017-06-12 07:55:28 +02:00
Dietmar Maurer
a6538c1ec5 add PVE/Replication.pm - moved from pve-manager 2017-06-12 07:03:22 +02:00
Dietmar Maurer
571156eedc PVE::ReplicationConfig add delete_job helper
Moved from PVE::Replication.
2017-06-12 06:35:35 +02:00
Dietmar Maurer
c292c8e994 PVE::ReplicationState - add job_status, get_next_job, job_logfile_name helpers
Moved code from PVE::Replication.
2017-06-12 06:30:56 +02:00
Wolfgang Bumiller
40318e97f7 migrate: set migration_type
Moved from qemu-server: set $opts->{migration_type} to a
default or a value from datacenter.cfg.
2017-06-09 12:24:57 +02:00
Wolfgang Bumiller
7919c4820c GuestHelpers: allow overriding $lockdir in test environments 2017-06-09 12:00:51 +02:00
Dietmar Maurer
1fcde52aba PVE::ReplicationConfig - set computed properties after schema verification
Else we get schema verification errors.
2017-06-07 11:28:40 +02:00
Dietmar Maurer
0de175563a PVE::ReplicationConfig - remove useless guest property
We extract it from the jobid instead.
2017-06-07 10:06:25 +02:00
Dietmar Maurer
52dcecfcbb PVE::ReplicationState - new helper replication_snapshot_name()
Changed replication snapshot naming to __replicate_<jobid>_<lastsync>__
to avoid conflicts with normal snapshot names.
2017-06-06 11:47:38 +02:00
Dietmar Maurer
5d31e77b47 PVE::ReplicationConfig - new helper parse_replication_job_id
Allow job numbers 0..N
2017-06-06 11:44:28 +02:00
Dietmar Maurer
f87dd81da0 PVE::ReplicationConfig - use new ID format "<vmid>-<num>" 2017-06-02 12:18:41 +02:00
Dietmar Maurer
90c07bf789 PVE::ReplicationState - hold guest_migration_lock during state update 2017-06-02 09:51:01 +02:00
Dietmar Maurer
3f7cacffb1 PVE::ReplicationState - new helper class to read/write replication state 2017-06-02 09:17:36 +02:00
Dietmar Maurer
0e01a7ae93 bump version to 2.0-4 2017-05-31 09:15:52 +02:00
Dietmar Maurer
e258e4031b Makefile: cleanup *.buildinfo 2017-05-31 07:49:56 +02:00
Dietmar Maurer
151f1335d0 PVE/ReplicationConfig.pm: add remove_job property 2017-05-31 07:45:44 +02:00
Dietmar Maurer
94d526d7e0 PVE::GuestHelpers::guest_migration_lock - new helper
I create a separate class for common guest helpers.
We can move more code into this class later.
2017-05-30 12:06:08 +02:00
Dietmar Maurer
6e55d55a7b PVE::ReplicationConfig::check_for_existing_jobs - new helper
We want to use that before removing a guest.
2017-05-29 07:33:38 +02:00