Commit Graph

2920 Commits

Author SHA1 Message Date
Dominik Csapak
02c92261ad add override for correct defaultButton behaviour
we disable the defaultButton behaviour on textarea and aria-multiline
fields, else we cannot input a newline into a textarea on a form with
a defaultButton defined

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-06-02 16:16:11 +02:00
Dietmar Maurer
d255af0128 PVE::Replication - use new PVE::ReplicationState class 2017-06-02 12:28:43 +02:00
Dietmar Maurer
6d645cb216 PVE::Replication - simplify code
Move all state writes into run_replication()
2017-06-02 12:28:43 +02:00
Emmanuel Kasper
4d02b4fe79 Do not internationalize 'Pools' when used in Ceph Context
This is a Ceph domain term and should not be translated like OSD, ...
Galician had "Virtual Groups" for Pools, which does not apply for
Ceph Context.
Also most languages were using 'Pools' anyway.
2017-06-02 10:09:45 +02:00
Dominik Csapak
0915ec99cb remove "read-only" option from container root disk
with root-only enabled, you cannot start the conainer anymore,
so we remove it there entirely

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-06-02 09:35:12 +02:00
Dominik Csapak
329ade0479 fix #1400: do not use defaultButton in NotesEdit window
with a defaultButton set, we cannot enter a newline into a textarea

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-06-02 09:25:53 +02:00
Dominik Csapak
b8ac8b0cec allow width and height parameter for vncshell
so that novnc can request a different screen size

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-06-02 09:19:07 +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
c4ca87e508 make check: run replication_test6.pl 2017-05-31 15:29:53 +02:00
Dietmar Maurer
d793b4a62b PVE::Replication::replicate - call get_ssh_info on demand
Only call get_ssh_info() when needed, and do not pass $migration_network
for a simply remove_job - this produces just overhead and is not required.
If we always call get_ssh_info() we can never delete jobs using non-existing
targets.
2017-05-31 15:19:26 +02:00
Wolfgang Link
6452af0da1 Untaint the content of pve-replication-state.json.
JSON::decode will not untaint the raw text, so we get problems with the
last_sync, which we use many times in the code with open3.
2017-05-31 14:35:52 +02:00
Dietmar Maurer
495aa710f2 replication - allow removal of jobs with target on local node 2017-05-31 13:54:40 +02:00
Dietmar Maurer
b7a20a34bf bump version to 5.0-11 2017-05-31 09:38:42 +02:00
Dietmar Maurer
20f5ac242c replication_test5.pl: add test for job removal 2017-05-31 08:23:47 +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
3c54bc912b PVE::API2Tools::resolve_proxyto - new helper
Call proxyto_callback if that method is defined.
2017-05-31 08:23:47 +02:00
Dietmar Maurer
1a9dc09e83 PVE::Replication - aquire guest_migration_lock during replication
To block guest migration.
2017-05-31 08:23:47 +02:00
Dietmar Maurer
ffe5a020b7 PVE::Replication - implement replicate_volume()
Simply call PVE::Storage::storage_migrate()
2017-05-31 08:23:47 +02:00
Dietmar Maurer
39c41c9dc5 ReplicationTestEnv.pm: avoid warning about undefined value 2017-05-31 08:23:47 +02:00
Dietmar Maurer
df16be460c bin/test/Makefile: run all replication tests 2017-05-31 08:23:47 +02:00
Dietmar Maurer
7f6ff9dd39 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
b11e512fae PVE::Replication::remote_finalize_local_job - new helper
Simple wrapper to call "pvesr finalize-local-job" on a remote
cluster node.
2017-05-31 08:23:47 +02:00
Dietmar Maurer
acea170e05 PVE::Replication::remote_prepare_local_job - new helper
Simple wrapper to call "pvesr prepare-local-job" on a remote
cluster node.
2017-05-31 08:23:47 +02:00
Dietmar Maurer
fcc22c0bfb pvesr finalize-local-job: add helper to cleanup job
This will be called after replication on the target node. For now, this
just removes old snapshots.
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
fae995063c pvesr prepare-local-job: new helper
Prepare for starting a replication job. This is called on the target
node before replication starts. This call is for internal use, and
return a JSON object on stdout. The method first test if VM <vmid>
reside on the local node. If so, stop immediately. After that the
method scans all volume IDs for snapshots, and removes all replications
snapshots with timestamps different than <last_sync>. It also removes
any unused volumes.

Returns a hash with boolean markers for all volumes with existing
replication snapshots.
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
6e572d46ef replication_test4.pl: Test replication job failure 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
6269a49c64 replication_test3.pl: regression test for replication to same node 2017-05-31 08:23:46 +02:00
Dietmar Maurer
5c180db3b5 PVE::Replication - use new calendar events instead of interval
And implement retry algorythm after failure:

  $next_sync = $state->{last_try} + 5*60*$fail_count;

and limit to 3 failures.
2017-05-31 08:23:46 +02:00
Dietmar Maurer
483f89dd47 PVE/Replication.pm: save pid/ptime to running job state
So that we can check which job is running.
2017-05-31 08:23:46 +02:00
Dietmar Maurer
816c01f85b replication_test2.pl: test replication scheduler 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
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
Emmanuel Kasper
7a58166094 Fix #1386: track postfix daemon status via postfix@- 2017-05-29 14:52:24 +02:00
Dominik Csapak
cf73d1efc9 optimize 'text' field in resourcestore
instead of doing a lot of string comparisons, we first check
the type with the most objects (vms/cts) via number operation

and in all other cases, we can simply use the type as property index

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-05-04 09:28:15 +02:00
Dominik Csapak
397dfdd3c4 add suspend/resume events to updateTree
this makes adding/modifying a large number of items a lot faster

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-05-04 07:00:16 +02:00
Dominik Csapak
2abb517fcc optimize resourcestore field collection
instead of doing weird if/elsif checks with nonsensical logic

we simply check the 3 properties we want (namely convert,calculate and
defaultValue) and add them to our field definition.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-05-04 06:59:54 +02:00
Dominik Csapak
ec8273637d optimize 'running' field
we do not need to check for qemu/lxc/node because the other types
do not have an uptime value

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-05-04 06:55:22 +02:00
Wolfgang Link
c6723ee58b Make a new systemd target.
This will ensure all storages are up before pveproxy is running.
2017-05-03 11:50:53 +02:00
Fabian Grünbichler
4280f25c17 ceph: init: rename disable-cephx to disable_cephx
for consistency
2017-05-03 11:37:08 +02:00
Fabian Grünbichler
97f050bb79 ceph: init: add warning to disable-cephx 2017-05-03 10:27:24 +02:00
Alexandre Derumier
77bb90b03b ceph: init: add optional disable-cephx option
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2017-05-03 10:27:18 +02:00
Alexandre Derumier
d70e3c4860 ceph: init: remove filestore xattr use omap
it's not used anymore since emperor

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2017-05-03 10:26:25 +02:00
Dominik Csapak
26eac3a63a fix #1359: change to vm when double clicking in pool member view
like in the resource grid

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-05-03 07:08:46 +02:00
Dietmar Maurer
786da0da93 bump version to 5.0-10 2017-04-24 07:46:07 +02:00
Dietmar Maurer
8a0cae0e35 PVE/APLInfo.pm: avoid locale specific time stamps 2017-04-24 07:24:12 +02:00
Dietmar Maurer
9f07075f0a vzdump: do not generate locale specific time stamps
Avoid perl warning: Wide character in print
2017-04-24 07:17:21 +02:00