]> git.proxmox.com Git - pve-guest-common.git/log
pve-guest-common.git
4 years agobump version to 3.0-3
Fabian Grünbichler [Mon, 11 Nov 2019 10:28:23 +0000 (11:28 +0100)]
bump version to 3.0-3

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agod/control: add more missing build-dependencies
Fabian Grünbichler [Mon, 11 Nov 2019 10:28:22 +0000 (11:28 +0100)]
d/control: add more missing build-dependencies

pve-cluster is used by the test cases

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
4 years agod/control: add (build-)depends on libpve-cluster-perl
Fabian Grünbichler [Mon, 11 Nov 2019 10:28:21 +0000 (11:28 +0100)]
d/control: add (build-)depends on libpve-cluster-perl

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
4 years agouse PVE::SSHInfo
Fabian Grünbichler [Mon, 11 Nov 2019 10:28:20 +0000 (11:28 +0100)]
use PVE::SSHInfo

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
4 years agouse PVE::DataCenterConfig
Fabian Grünbichler [Mon, 11 Nov 2019 10:28:19 +0000 (11:28 +0100)]
use PVE::DataCenterConfig

to make sure that the corresponding cfs_read_file works() works.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
4 years agobump version to 3.0-2
Thomas Lamprecht [Fri, 18 Oct 2019 19:12:04 +0000 (21:12 +0200)]
bump version to 3.0-2

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agod/control: break pve-manager (<< 6.0-10) due to vzdump parser move
Thomas Lamprecht [Fri, 18 Oct 2019 19:11:54 +0000 (21:11 +0200)]
d/control: break pve-manager (<< 6.0-10) due to vzdump parser move

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agotests: remove some redundant trailing commas
Thomas Lamprecht [Fri, 18 Oct 2019 19:05:53 +0000 (21:05 +0200)]
tests: remove some redundant trailing commas

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agocleanup_pending: refactor and fix $force
Thomas Lamprecht [Fri, 18 Oct 2019 18:31:10 +0000 (20:31 +0200)]
cleanup_pending: refactor and fix $force

pull out $conf->{pending} in a intermediate variable.

While for now only a force key could be in a pending delete value it
still is completely wrong to say the whole hash value is thus $force.

Fix that by omitting that intermediate variable completely and copy
over directly from the source hash.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoadd cleanup_pending tests
Thomas Lamprecht [Fri, 18 Oct 2019 18:29:20 +0000 (20:29 +0200)]
add cleanup_pending tests

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agotests: add map_expect_to_param_id feature for checking side-effects
Thomas Lamprecht [Fri, 18 Oct 2019 18:28:59 +0000 (20:28 +0200)]
tests: add map_expect_to_param_id feature for checking side-effects

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agotests: add checks for remove_from_pending_delete
Thomas Lamprecht [Fri, 18 Oct 2019 17:45:58 +0000 (19:45 +0200)]
tests: add checks for remove_from_pending_delete

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agorefactor/cleanup remove_from_pending_delete sligthly
Thomas Lamprecht [Fri, 18 Oct 2019 17:44:40 +0000 (19:44 +0200)]
refactor/cleanup remove_from_pending_delete sligthly

return $conf for tests, use intermediate variable for
$conf->{pending}, which besides shorter lines avoids also the
autovification of $config stuff.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agotests: add checks for add_to_pending_delete
Thomas Lamprecht [Fri, 18 Oct 2019 17:26:51 +0000 (19:26 +0200)]
tests: add checks for add_to_pending_delete

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agorefactor/cleanup add_to_pending_delete sligthly
Thomas Lamprecht [Fri, 18 Oct 2019 17:27:31 +0000 (19:27 +0200)]
refactor/cleanup add_to_pending_delete sligthly

no need to delete, then re-fill by autovification; just explicitly
overwrite with new value.

Also explicitly populate pending hash if not defined, avoids
auto-vivification which is a bit intransparent.

explicitly return $conf for tests

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoprint_pending_delete: make deterministical
Thomas Lamprecht [Fri, 18 Oct 2019 15:55:28 +0000 (17:55 +0200)]
print_pending_delete: make deterministical

for tests and UX

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agorefactor print_pending_delete slightly
Thomas Lamprecht [Fri, 18 Oct 2019 15:15:46 +0000 (17:15 +0200)]
refactor print_pending_delete slightly

while this was much better than the old mess from
parse_pending_delete it still was a bit much nested into one line.

split that up a bit, add a render_key helper which does the clunky
"add !" check and just call that one in the map {}

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agotests: add print_pending_delete ones
Thomas Lamprecht [Fri, 18 Oct 2019 15:15:07 +0000 (17:15 +0200)]
tests: add print_pending_delete ones

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agorefactor parse_pending_delete to sane implemenation
Thomas Lamprecht [Fri, 18 Oct 2019 14:43:25 +0000 (16:43 +0200)]
refactor parse_pending_delete to sane implemenation

this was quite the mess, a perl greedy match over non-whitespace
character is equivalent to a split on whitespace on, but the latter
is much easier to grasp when looking at this the first time.

Do a real for loop with real variable names and less nest everything
into one line.

the test added in the previous commit should give use the safety net
for that cleanup.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoadd basic abstract config test system
Thomas Lamprecht [Fri, 18 Oct 2019 14:42:36 +0000 (16:42 +0200)]
add basic abstract config test system

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agohelpers: s/conf_table_with_pending/config_with_pending_array/ and comment
Thomas Lamprecht [Fri, 18 Oct 2019 10:53:43 +0000 (12:53 +0200)]
helpers: s/conf_table_with_pending/config_with_pending_array/ and comment

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agohelpers: add method to represent config as a table
Oguz Bektas [Mon, 14 Oct 2019 08:28:36 +0000 (10:28 +0200)]
helpers: add method to represent config as a table

in vm_pending API, this method is used to represent the configuration as
a table with current, pending and delete columns.

by adding it as a guesthelper, we can also use it for container pending
changes.

Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
4 years agohelpers: add pending-aware guest config printer from qemu-server
Oguz Bektas [Mon, 14 Oct 2019 08:28:35 +0000 (10:28 +0200)]
helpers: add pending-aware guest config printer from qemu-server

Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
4 years agoabstractconfig: add load_current_config and load_snapshot_config
Oguz Bektas [Mon, 14 Oct 2019 08:28:34 +0000 (10:28 +0200)]
abstractconfig: add load_current_config and load_snapshot_config

this code is already used by qemu-server's GET config API call. it is
however better to split this into to methods and decide what to run in
the API call.

this general implementation uses some $class helpers which allow to abstract
away the difference in the child classes. this will be used for
containers once they can do pending changes.

Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
4 years agoabstractconfig: add pending changes related helpers
Oguz Bektas [Mon, 14 Oct 2019 08:28:33 +0000 (10:28 +0200)]
abstractconfig: add pending changes related helpers

use a better naming scheme for methods from qemuserver:

split_flagged_list -> parse_pending_delete
join_flagged_list -> print_pending_delete
vmconfig_delete_pending_option -> add_to_pending_delete
vmconfig_undelete_pending_option -> remove_from_pending_delete
vmconfig_cleanup_pending -> cleanup_pending

parse_pending_delete now has a better representation of the force value,
which is encoded in a perl hash i.e. $conf->{$opt}->{force} = 1 or 0
depending on if the string in config has '!' or not.

Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
4 years agobase guest config: add common destroy_config implementation
Thomas Lamprecht [Fri, 18 Oct 2019 06:47:31 +0000 (08:47 +0200)]
base guest config: add common destroy_config implementation

copied over from pve-containers implementation with the same name.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agofix #1291: implement remove_vmid_from_backup_jobs
Christian Ebner [Tue, 15 Oct 2019 11:00:20 +0000 (13:00 +0200)]
fix #1291: implement remove_vmid_from_backup_jobs

remove_vmid_from_backup_jobs updates the vzdump.cron backup jobs,
excluding the given vmid.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agovzdump: move registration of vzdump.cron from manager to guest-common to avoid cyclic...
Christian Ebner [Tue, 15 Oct 2019 11:00:19 +0000 (13:00 +0200)]
vzdump: move registration of vzdump.cron from manager to guest-common to avoid cyclic dependency

The registration of the vzdump.cron file was handled in pve-manager.
By moving the relevant code to pve-guest-common, cyclic dependencies
for cfs registration are avoided.
This makes this patch of guest-common a build dependency for the other
packages touched in this patch series.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agofollowup: rename to print_snapshot_tree, add comment and rename $res param
Thomas Lamprecht [Tue, 1 Oct 2019 15:20:21 +0000 (17:20 +0200)]
followup: rename to print_snapshot_tree, add comment and rename $res param

This was taken from a CLI helper, there $res is a common parameter
name which denotes that it's the res from the API call the CLI
command bases on. But here that makes no sense and is not really
telling about what the value(s) of $res could be. Further explain
that with a comment.

As this also prints uncoditionally to STDOUT let's say so through the
method name.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoreformat code for snapshot tree into GuestHelpers
Oguz Bektas [Tue, 1 Oct 2019 07:32:45 +0000 (09:32 +0200)]
reformat code for snapshot tree into GuestHelpers

qm/pct listsnapshot lack feature parity w.r.t. showing snapshots in a
tree ordered by the date. by moving this code into GuestHelpers, it can
be shared.

Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
4 years agoimplement remove_vmid_jobs for ReplicationConfig
Christian Ebner [Mon, 1 Jul 2019 13:43:48 +0000 (15:43 +0200)]
implement remove_vmid_jobs for ReplicationConfig

Allows to remove replication jobs from the config based on the vmid.

Preparations for #1291 fix

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agobuildsys: no need to include arch detection for arch-independent package
Thomas Lamprecht [Tue, 21 May 2019 20:24:59 +0000 (22:24 +0200)]
buildsys: no need to include arch detection for arch-independent package

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agobuildsys: switch upload dist over to buster
Thomas Lamprecht [Tue, 21 May 2019 19:08:05 +0000 (21:08 +0200)]
buildsys: switch upload dist over to buster

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agobump version to 3.0-1
Thomas Lamprecht [Tue, 21 May 2019 19:03:47 +0000 (21:03 +0200)]
bump version to 3.0-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agobuildsys: use dpkg-dev makefile helpers for pkg info
Thomas Lamprecht [Tue, 21 May 2019 19:00:28 +0000 (21:00 +0200)]
buildsys: use dpkg-dev makefile helpers for pkg info

while we already dynamically resolved the version from the changelog
using dpkg-parsechangelog, and those dpkg-dev helpers also use that
tool, let's switch to them nonetheless to have a bit more stream
lined dev environment.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoset debian source format to 1.0
Thomas Lamprecht [Tue, 21 May 2019 19:00:13 +0000 (21:00 +0200)]
set debian source format to 1.0

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoincrease max reading replication state file size.
Wolfgang Link [Wed, 17 Apr 2019 07:09:27 +0000 (09:09 +0200)]
increase max reading replication state file size.

In this file, the error of a failed job will also be stored.
The default 32768 bytes are not very much.

This file is on the local filesystem so there is no filesystem
size restrictions like in /etc/pve.

5 years agobump version to 2.0-20
Thomas Lamprecht [Fri, 1 Feb 2019 11:52:20 +0000 (12:52 +0100)]
bump version to 2.0-20

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agod/control: bump version dependency of libpve-storage-perl
Thomas Lamprecht [Fri, 1 Feb 2019 11:51:54 +0000 (12:51 +0100)]
d/control: bump version dependency of libpve-storage-perl

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agofollouwp: saner exception handling
Thomas Lamprecht [Fri, 1 Feb 2019 09:08:07 +0000 (10:08 +0100)]
follouwp: saner exception handling

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoadd check/exec_hookscript to GuestHelpers
Dominik Csapak [Thu, 31 Jan 2019 13:33:38 +0000 (14:33 +0100)]
add check/exec_hookscript to GuestHelpers

check_hookscript will be used for the container/vm api to check if the
hookscript volume id is correct

exec_hookscript can be called to execute a hookscript

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
5 years agobump version to 2.0-19
Wolfgang Bumiller [Thu, 3 Jan 2019 08:58:17 +0000 (09:58 +0100)]
bump version to 2.0-19

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agoreplace complete_snapshot_name with snapshot_list
Wolfgang Bumiller [Thu, 3 Jan 2019 09:09:45 +0000 (10:09 +0100)]
replace complete_snapshot_name with snapshot_list

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agoMakefile: use dpkg-parsechangelog
Wolfgang Bumiller [Thu, 3 Jan 2019 08:55:14 +0000 (09:55 +0100)]
Makefile: use dpkg-parsechangelog

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agofix deprecated unescaped left brace in regex
Thomas Lamprecht [Fri, 14 Dec 2018 13:06:08 +0000 (14:06 +0100)]
fix deprecated unescaped left brace in regex

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoBash completion helper for snapshot name
Rhonda D'Vine [Mon, 12 Nov 2018 13:58:48 +0000 (14:58 +0100)]
Bash completion helper for snapshot name

This is the bash completion helper function for completing the snapshot
name.  This is used both in qemu-server and pve-container.

This patch is the base for the patches in qemu-server and pve-container.

Signed-off-by: Rhonda D'Vine <rhonda@proxmox.com>
5 years agod/control: remove perl from build-depends
Fabian Grünbichler [Wed, 24 Oct 2018 08:19:43 +0000 (10:19 +0200)]
d/control: remove perl from build-depends

it is not needed at all.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
5 years agod/control: add misc:Depends
Fabian Grünbichler [Wed, 24 Oct 2018 08:19:42 +0000 (10:19 +0200)]
d/control: add misc:Depends

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
5 years agod/control|compat: bump to 10
Fabian Grünbichler [Wed, 24 Oct 2018 08:19:41 +0000 (10:19 +0200)]
d/control|compat: bump to 10

default and recommended compat level in Debian Stretch

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
5 years agod/control: wrap-and-sort
Fabian Grünbichler [Wed, 24 Oct 2018 08:19:40 +0000 (10:19 +0200)]
d/control: wrap-and-sort

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
5 years agod/control: bump standards version
Fabian Grünbichler [Wed, 24 Oct 2018 08:19:39 +0000 (10:19 +0200)]
d/control: bump standards version

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
5 years agobuild: add dsc target
Fabian Grünbichler [Wed, 24 Oct 2018 08:19:38 +0000 (10:19 +0200)]
build: add dsc target

to build a source package

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
5 years agod/control: fixup missing comma in Breaks
Thomas Lamprecht [Mon, 17 Sep 2018 13:54:04 +0000 (15:54 +0200)]
d/control: fixup missing comma in Breaks

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agobump version to 2.0-18
Thomas Lamprecht [Mon, 17 Sep 2018 13:24:06 +0000 (15:24 +0200)]
bump version to 2.0-18

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agobreak qemu-server (<< 5.0-35)
Thomas Lamprecht [Mon, 17 Sep 2018 13:24:57 +0000 (15:24 +0200)]
break qemu-server (<< 5.0-35)

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoadd snapshot rollback hook and remove qemu machine code
Dominik Csapak [Fri, 14 Sep 2018 12:08:40 +0000 (14:08 +0200)]
add snapshot rollback hook and remove qemu machine code

instead move the QEMU machine logic inside qemu-server package with
the help of the new snapshot rollback hook

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
5 years agobump version to 2.0-17
Thomas Lamprecht [Tue, 19 Jun 2018 12:07:19 +0000 (14:07 +0200)]
bump version to 2.0-17

5 years agoadd create_and_lock_config
Thomas Lamprecht [Fri, 1 Jun 2018 14:37:38 +0000 (16:37 +0200)]
add create_and_lock_config

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agocleanup: ReplicationConfig: be specific about write_config
Wolfgang Bumiller [Mon, 14 May 2018 11:51:24 +0000 (13:51 +0200)]
cleanup: ReplicationConfig: be specific about write_config

Since it doesn't write but returns the text to be written,
let's be specific about the fact that we're returning a
value.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agobump version to 2.0-16
Fabian Grünbichler [Mon, 14 May 2018 09:15:20 +0000 (11:15 +0200)]
bump version to 2.0-16

5 years agoAdd lock to pervent lost update.
Wolfgang Link [Wed, 9 May 2018 12:48:27 +0000 (14:48 +0200)]
Add lock to pervent lost update.

5 years agoSwap source and target in replication config, if VM was stolen.
Wolfgang Link [Wed, 9 May 2018 12:48:26 +0000 (14:48 +0200)]
Swap source and target in replication config, if VM was stolen.

5 years agoAdd function: swap source and target in replication config
Wolfgang Link [Wed, 9 May 2018 12:48:25 +0000 (14:48 +0200)]
Add function: swap source and target in replication config

5 years agoGet snapshots when no state is available.
Wolfgang Link [Wed, 9 May 2018 12:48:24 +0000 (14:48 +0200)]
Get snapshots when no state is available.

With this patch we can restore the state of a state less job.
It may happen that there are more replication snapshots,
because no job state is known can not delete any snapshot.
Existing multiple replication-snapshot happens
when a node fails in middel of a replication
and then the VM is moved to another node.
That's why we have to test if we have a common base on both nodes.
Given this, we take this as a replica state.
After we have a state again, the rest of the snapshots can be deleted on the next run.

5 years agoDelete replication snapshots only if last_sync is not 0.
Wolfgang Link [Wed, 9 May 2018 12:48:23 +0000 (14:48 +0200)]
Delete replication snapshots only if last_sync is not 0.

If last_sync is 0, the VM configuration has been stolen
(either manually or by HA restoration).
Under this condition, the replication snapshot should not be deleted.
This snapshot is used to restore replication state.
If the last_snap is greater than 0 and does not match the snap name
it must be a remnant of an earlier sync and should be deleted.

5 years agoAdd config parameter 'source'.
Wolfgang Link [Wed, 9 May 2018 12:48:22 +0000 (14:48 +0200)]
Add config parameter 'source'.

This parameter is useful for restoring the replication status.
It is also corrected if it is missing or wrong.

5 years agoCleanup for stateless jobs.
Wolfgang Link [Wed, 9 May 2018 12:48:21 +0000 (14:48 +0200)]
Cleanup for stateless jobs.

If a VM configuration has been manually moved or recovered by HA,
there is no status on this new node.
In this case, the replication snapshots still exist on the remote side.
It must be possible to remove a job without status,
otherwise, a new replication job on the same remote node will fail
and the disks will have to be manually removed.
When searching through the sorted_volumes generated from the VMID.conf,
we can be sure that every disk will be removed in the event
of a complete job removal on the remote side.

In the end, the remote_prepare_local_job calls on the remote side a prepare.

6 years agobump version to 2.0-15
Dietmar Maurer [Mon, 16 Apr 2018 09:48:13 +0000 (11:48 +0200)]
bump version to 2.0-15

6 years agoReplication.pm: code cleanup
Dietmar Maurer [Mon, 16 Apr 2018 08:52:24 +0000 (10:52 +0200)]
Replication.pm: code cleanup

6 years agoPVE/Replication.pm: fix error message
Dietmar Maurer [Mon, 16 Apr 2018 08:48:49 +0000 (10:48 +0200)]
PVE/Replication.pm: fix error message

6 years agofix #1694: make failure of snapshot removal non-fatal
Wolfgang Link [Fri, 13 Apr 2018 10:24:39 +0000 (12:24 +0200)]
fix #1694: make failure of snapshot removal non-fatal

In certain high-load scenarios ANY ZFS operation can block,
including registering an (async) destroy.
Since ZFS operations are implemented via ioctl's,
killing the user space process
does not affect the waiting kernel thread processing the ioctl.

Once "zfs destroy" has been called, killing it does not say anything
about whether the destroy operation will be aborted or not.
Since running into a timeout effectively means killing it,
we don't know whether the snapshot exists afterwards or not.
We also don't know how long it takes for ZFS to catch up on pending ioctls.

Given the above problem, we must to not die on errors when deleting a no
longer needed snapshot fails (under a timeout) after an otherwise
successful replication. Since we retry on the next run anyway, this is
not problematic.

The snapshot deletion error will be logged in the replication log
and the syslog/journal.

6 years agovzdump: add common log sub-method
Thomas Lamprecht [Thu, 14 Dec 2017 06:58:36 +0000 (07:58 +0100)]
vzdump: add common log sub-method

Add a general log method here which supports to pass on the "log to
syslog too" functionality and makes it more clear what each
parameter of logerr and logginfo means.

Further, we can now also log wlith a 'warn' level, which can be
useful to notice an backup user of a possible problem which isn't a
error per se, but may need the users attention.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 years agovzdump: allow all defined log levels
Thomas Lamprecht [Thu, 14 Dec 2017 06:58:35 +0000 (07:58 +0100)]
vzdump: allow all defined log levels

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 years agobump version to 2.0-14
Wolfgang Bumiller [Wed, 13 Dec 2017 13:51:50 +0000 (14:51 +0100)]
bump version to 2.0-14

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
6 years agoRemove noerr form replication.
Wolfgang Link [Thu, 7 Dec 2017 11:06:59 +0000 (12:06 +0100)]
Remove noerr form replication.

We will handle this errors in the API and decide what to do.

Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Acked-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
6 years agobump version to 2.0-13
Fabian Grünbichler [Tue, 17 Oct 2017 13:04:41 +0000 (15:04 +0200)]
bump version to 2.0-13

and add versioned dependency on libpve-storage-perl for storage_migrate
signature change (added logfunc parameter).

6 years agoreplication: purge states: verify the vmlist
Wolfgang Bumiller [Wed, 11 Oct 2017 12:24:58 +0000 (14:24 +0200)]
replication: purge states: verify the vmlist

Instead of clearing out the local state if the last
cfs_update failed.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
6 years agoAdd logfunc in storage_migration.
Wolfgang Link [Tue, 10 Oct 2017 07:43:51 +0000 (09:43 +0200)]
Add logfunc in storage_migration.

This will redirect export and import output to the correct log, instead of paring it into the syslog.

6 years agobuild: reformat debian/control
Fabian Grünbichler [Wed, 4 Oct 2017 09:05:33 +0000 (11:05 +0200)]
build: reformat debian/control

using wrap-and-sort -abt

6 years agobump version to 2.0-12
Wolfgang Bumiller [Thu, 21 Sep 2017 07:46:53 +0000 (09:46 +0200)]
bump version to 2.0-12

6 years agoVZDump/Plugin: avoid cyclic dependency
Thomas Lamprecht [Wed, 13 Sep 2017 08:30:14 +0000 (10:30 +0200)]
VZDump/Plugin: avoid cyclic dependency

pve-guest-common is above qemu-server, pve-container and thus also
pve-manager in the package hierarchy.
The latter hosts PVE::VZDump, so using it here adds a cyclic
dependency between pve-manager and pve-guest-common.

Move the log method to the base plugin class and inline the
run_command function directly do the plugins cmd method.

pve-manager's PVE::VZDump may use this plugins static log function
then instead of its own copy.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 years agoAbstractMigrate: remove unused obsolete variables
Thomas Lamprecht [Wed, 13 Sep 2017 08:40:52 +0000 (10:40 +0200)]
AbstractMigrate: remove unused obsolete variables

6 years agoAbstractMigrate: do not overwrite global signal handlers
Thomas Lamprecht [Wed, 6 Sep 2017 11:29:04 +0000 (13:29 +0200)]
AbstractMigrate: do not overwrite global signal handlers

perls 'local' must be either used in front of each $SIG{...}
assignments or they must be put in a list, else it affects only the
first variable and the rest are *not* in local context.

This may cause weird behaviour where daemons seemingly do not get
terminating signals delivered correctly and thus may not shutdown
gracefully anymore.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 years agoFix #1480: die if snapshot name is not found before set_lock is used
Alwin Antreich [Mon, 28 Aug 2017 09:08:12 +0000 (11:08 +0200)]
Fix #1480: die if snapshot name is not found before set_lock is used

Signed-off-by: Alwin Antreich <a.antreich@proxmox.com>
6 years agobump version to 2.0-11
Wolfgang Bumiller [Mon, 3 Jul 2017 12:51:10 +0000 (14:51 +0200)]
bump version to 2.0-11

6 years agoreplication: we must call storage_migrate with with_snapshots true
Wolfgang Bumiller [Mon, 3 Jul 2017 09:58:41 +0000 (11:58 +0200)]
replication: we must call storage_migrate with with_snapshots true

6 years agobump version to 2.0-10
Dietmar Maurer [Thu, 29 Jun 2017 08:57:07 +0000 (10:57 +0200)]
bump version to 2.0-10

6 years agoreplication job_status: add get_disabled parameter
Thomas Lamprecht [Thu, 29 Jun 2017 08:08:28 +0000 (10:08 +0200)]
replication job_status: add get_disabled parameter

allows the API/frontend to get the disabled jobs easier

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 years agobump version to 2.0-9
Dietmar Maurer [Thu, 29 Jun 2017 05:29:29 +0000 (07:29 +0200)]
bump version to 2.0-9

6 years agoRevert "Add guest type at find_local_replication_job"
Dietmar Maurer [Thu, 29 Jun 2017 05:27:16 +0000 (07:27 +0200)]
Revert "Add guest type at find_local_replication_job"

This reverts commit 914b6647a4467d323af1d3b501293270c70c3fd1.

No longer required.

6 years agoPVE::Replication - do not use $jobcfg->{vmtype}
Dietmar Maurer [Thu, 29 Jun 2017 05:25:28 +0000 (07:25 +0200)]
PVE::Replication - do not use $jobcfg->{vmtype}

6 years agobump version to 2.0-8
Wolfgang Bumiller [Wed, 28 Jun 2017 12:32:56 +0000 (14:32 +0200)]
bump version to 2.0-8

6 years agoAdd guest type at find_local_replication_job
Wolfgang Link [Wed, 28 Jun 2017 12:27:37 +0000 (14:27 +0200)]
Add guest type at find_local_replication_job

We need this at migration time.

6 years agobump version to 2.0-7
Dietmar Maurer [Wed, 28 Jun 2017 10:47:05 +0000 (12:47 +0200)]
bump version to 2.0-7

6 years agofix previous commit
Dietmar Maurer [Wed, 28 Jun 2017 10:05:18 +0000 (12:05 +0200)]
fix previous commit

6 years agoreplication: improve schedule_job_now
Dietmar Maurer [Wed, 28 Jun 2017 10:00:25 +0000 (12:00 +0200)]
replication: improve schedule_job_now

do no not modify anything if there is no state

6 years agoreplication: add schedule_job_now helper
Wolfgang Bumiller [Wed, 28 Jun 2017 09:35:06 +0000 (11:35 +0200)]
replication: add schedule_job_now helper

6 years agoreplication: sort time stamps numerically
Wolfgang Bumiller [Wed, 28 Jun 2017 07:02:29 +0000 (09:02 +0200)]
replication: sort time stamps numerically

6 years agoreplication: pass $noerr to run_replication_nolock
Dietmar Maurer [Wed, 28 Jun 2017 05:54:11 +0000 (07:54 +0200)]
replication: pass $noerr to run_replication_nolock

6 years agoAdd new function delete_guest_states.
Wolfgang Link [Tue, 27 Jun 2017 10:20:23 +0000 (12:20 +0200)]
Add new function delete_guest_states.