Commit Graph

3402 Commits

Author SHA1 Message Date
Dominik Csapak
ec3d837288 show hostpci devices in gui
so one can see which pci devices are assigned to which vm

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-06-08 16:06:16 +02:00
Dominik Csapak
8eb6f213f2 add pci icon/css class
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-06-08 16:06:16 +02:00
Dominik Csapak
2668ba649c use usbedit window to add/edit usb devices
the usb device button gets disabled when there are
already 5 usb devices

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-06-08 16:05:27 +02:00
Dominik Csapak
f46721af8e add usbselector and usb edit window for qemu
the edit window has 3 radiobuttons (spice,device,port)

and a checkbox for usb3 (which gets disabled and checked
if you choose a usb3 device)

also it makes use of the help feature

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-06-08 15:57:56 +02:00
Dominik Csapak
fa522e4867 show usb devices in qemu hardware view
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-06-08 15:57:56 +02:00
Dominik Csapak
77c9518192 add css and image for usb devices
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-06-08 15:57:56 +02:00
Dominik Csapak
5222800148 fix #1385: display no rbd user by default
when having an rbd storage with no user, we displayed 'admin' by default,
this patch sets '' and will be overwritten from the backend if a value is set

when creating a rbd storage, the textfield still has 'admin' in
there by default

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-06-08 15:13:38 +02:00
Fabian Grünbichler
0fcced161f use physical NIC regexp
because in >= Stretch, most systems don't have ethX devices any more.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2017-06-08 15:00:59 +02:00
Fabian Grünbichler
544bb4e2a0 pvesr: prepare_local_job: fixup
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2017-06-08 11:53:30 +02:00
Fabian Grünbichler
d8cd8e8cf9 pvesr: prepare_local_job: use PVE::replication::prepare
to reduce code duplication. this slightly changes behaviour
compared to the previous version:

only disks with the correct prefix are cleaned up, not all
disks with __replication* snapshots.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2017-06-08 11:13:47 +02:00
Fabian Grünbichler
fa64c3fb0e Replication::prepare: track cleaned up volumes
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2017-06-08 10:45:09 +02:00
Wolfgang Link
37efc934a7 Fix: list_images returns now a array of hashes so adopt the code. 2017-06-08 10:29:11 +02:00
Wolfgang Link
db4c35c3a3 Permit set parent_snapname if it is not set. 2017-06-08 10:27:09 +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
535a24b2a5 PVE::Replication::replicate - Set $running to 0 if undef. 2017-06-08 09:31:09 +02:00
Dietmar Maurer
51506f9a2b PVE::API2::Tasks - remove dead code 2017-06-08 08:52:22 +02:00
Dietmar Maurer
4b70f596b3 PVE::API2::Tasks - use PVE::Tools::dump_logfile 2017-06-08 07:36:33 +02:00
Dietmar Maurer
fc527b4da1 PVE::API2::Replication: rework replication status API
/nodes/<node>/replication => list status of all jobs

/nodes/<node>/replication/<id>/status => individual job status

/nodes/<node>/replication/<id>/log => job log
2017-06-08 07:16:39 +02:00
Dietmar Maurer
f842e812e0 replication: add replication log files 2017-06-07 17:27:00 +02:00
Dietmar Maurer
91ee6a2fec 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
4ce4ae7047 Remove $vmid form ssh prepare and finalize command. 2017-06-07 17:25:41 +02:00
Dietmar Maurer
356fbf797f replication: save list of used storage IDs 2017-06-07 11:30:52 +02:00
Dietmar Maurer
a9da300ded PVE::API2::ReplicationConfig - extract guest ID from job ID 2017-06-07 11:30:52 +02:00
Dietmar Maurer
9b24b5d4ed use new PVE::ReplicationState::replication_snapshot_name() 2017-06-07 09:40:08 +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
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
f5b53d4c31 PVE/API2/Replication.pm: change vmid => guest 2017-06-02 16:22:46 +02:00
Dominik Csapak
c1b20fca93 add vmid parameter to replication status
so that one can limit the status list for one vm/ct

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-06-02 16:19:26 +02:00
Dominik Csapak
551456ff6e add defaultButton to loginWindow
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-06-02 16:17:03 +02:00
Dominik Csapak
461833217b add defaultButton and focus to snapshot window
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-06-02 16:16:51 +02:00
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