Commit Graph

20 Commits

Author SHA1 Message Date
Dominik Csapak
33b4554849 fix iteration over hash without keys
without 'keys' we iterate also over the values and use them as keys

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-11-20 15:34:27 +01:00
Thomas Lamprecht
09575ae8f6 replication: followup: include guest node in error message
tell the user what check actually failed..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-08-20 13:48:53 +02:00
Fabian Grünbichler
b88b01008b replication: check for source == target on job creation
and die.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-08-20 13:47:21 +02:00
Fabian Grünbichler
10257794f2 replication: target is a required parameter
no need to check for definedness

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-08-20 13:47:21 +02:00
Fabian Grünbichler
ef3fde16e2 replication: refactor source checks on job creation
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-08-20 13:47:21 +02:00
Fabian Ebner
9671488c5d Set source when creating a new replication job
If source is missing, pvesr will set it via job_status
on the next run. But the info is already present here,
so it doesn't hurt to use it.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-08-11 13:54:21 +02:00
Thomas Lamprecht
a7f047588e grammar fix: s/does not exists/does not exist/g
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-12-13 12:09:44 +01:00
Wolfgang Link
fa298bb000 Fix create replication job
Add node to load config. this is needed if you are on an other node then the guest.
2017-06-28 14:20:09 +02:00
Wolfgang Bumiller
1adc6f7ab3 replication: refuse to create jobs with nothing to do
When a VM has no disks or all of them are on shared storage
the replication job has nothing to do and fails, so catch
this when creating a new job.
2017-06-27 15:16:41 +02:00
Wolfgang Bumiller
25420507b2 refuse to create replication jobs for unreplicatable VMs 2017-06-27 06:28:33 +02:00
Dominik Csapak
dc9bc76843 implement delete parameter for replicationconfig
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-06-14 07:30:05 +02:00
Dominik Csapak
a4dc8611e6 implement digest checking for ReplicationConfig update
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-06-12 16:02:53 +02:00
Dietmar Maurer
9a427c6cc8 PVE::API2::ReplicationConfig->delete - use raise_param_exc 2017-06-09 06:12:02 +02:00
Wolfgang Link
948136a4f0 Add force parameter for delete replica job.
This parameter is helpful if an unsolvable situation occurs or the vmconfig was delete manually.
2017-06-09 06:00:18 +02:00
Dietmar Maurer
4542a42ab3 PVE/API2/ReplicationConfig.pm: add job creation checks
Check if the target and guest exists to avoid creation of faulty jobs.
2017-06-08 10:01:45 +02:00
Dietmar Maurer
bc1ec7bc1b pvesr: add a message that job removal will take some time 2017-06-08 09:42:12 +02:00
Dietmar Maurer
a9da300ded PVE::API2::ReplicationConfig - extract guest ID from job ID 2017-06-07 11:30:52 +02:00
Dominik Csapak
4b48563a88 use correct field for child link
namely id instead of vmid, so that the child links are working in the
api inspector and pvesh

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-06-02 16:23:30 +02:00
Dietmar Maurer
f9d38c545c PVE::API2::ReplicationConfig - implement delete
We just set the remove_job property in the configuration. Actual removal
is done asynchronous inside replicate().
2017-05-31 08:23:47 +02:00
Dietmar Maurer
892821fd87 pvesr: add pve storage replication tool
Just added code to configure jobs. Replication itself is not
implemented.
2017-05-31 08:23:46 +02:00