Skip to content

Commit

Permalink
Version 1.9.32
Browse files Browse the repository at this point in the history
  • Loading branch information
abbbi committed Aug 1, 2023
1 parent 4decdbd commit 7f5adfc
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 10 deletions.
6 changes: 6 additions & 0 deletions Changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
Version 1.9.32
---------
* Fix TypeError during backup of transient virtual machines: do not pass
flags to checkpointCreateXML as list. (#122)
* Add simple test for transient virtual machine handling.

Version 1.9.31
---------
* setup.cfg: fix obsolete description-file warning
Expand Down
2 changes: 1 addition & 1 deletion libvirtnbdbackup/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
"""

__version__ = "1.9.31"
__version__ = "1.9.32"
6 changes: 2 additions & 4 deletions libvirtnbdbackup/virt/checkpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,10 +224,8 @@ def redefine(domObj: libvirt.virDomain, args: Namespace) -> bool:
try:
domObj.checkpointCreateXML(
checkpointConfig.decode(),
[
libvirt.VIR_DOMAIN_CHECKPOINT_CREATE_REDEFINE,
libvirt.VIR_DOMAIN_CHECKPOINT_CREATE_REDEFINE_VALIDATE,
],
libvirt.VIR_DOMAIN_CHECKPOINT_CREATE_REDEFINE
| libvirt.VIR_DOMAIN_CHECKPOINT_CREATE_REDEFINE_VALIDATE,
)
except libvirt.libvirtError as e:
log.error("Redefining checkpoint failed: [%s]: %s", checkpointName, e)
Expand Down
4 changes: 2 additions & 2 deletions man/virtnbdbackup.1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
.TH VIRTNBDBACKUP "1" "July 2023" "virtnbdbackup 1.9.31" "User Commands"
.TH VIRTNBDBACKUP "1" "July 2023" "virtnbdbackup 1.9.32" "User Commands"
.SH NAME
virtnbdbackup \- backup utility for libvirt
.SH DESCRIPTION
Expand Down Expand Up @@ -48,7 +48,7 @@ Backup only disk with target dev name (\fB\-i\fR vda)
Exclude disk(s) with target dev name (\fB\-x\fR vda,vdb)
.TP
\fB\-f\fR SOCKETFILE, \fB\-\-socketfile\fR SOCKETFILE
Use specified file for NBD Server socket (default: \fI\,/var/tmp/virtnbdbackup.67375\/\fP)
Use specified file for NBD Server socket (default: \fI\,/var/tmp/virtnbdbackup.734824\/\fP)
.TP
\fB\-n\fR, \fB\-\-noprogress\fR
Disable progress bar
Expand Down
2 changes: 1 addition & 1 deletion man/virtnbdmap.1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
.TH VIRTNBDMAP "1" "July 2023" "virtnbdmap 1.9.31" "User Commands"
.TH VIRTNBDMAP "1" "July 2023" "virtnbdmap 1.9.32" "User Commands"
.SH NAME
virtnbdmap \- map virtnbdbackup image files to nbd devices
.SH DESCRIPTION
Expand Down
4 changes: 2 additions & 2 deletions man/virtnbdrestore.1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
.TH VIRTNBDRESTORE "1" "July 2023" "virtnbdrestore 1.9.31" "User Commands"
.TH VIRTNBDRESTORE "1" "July 2023" "virtnbdrestore 1.9.32" "User Commands"
.SH NAME
virtnbdrestore \- restore utility for libvirt
.SH DESCRIPTION
Expand Down Expand Up @@ -40,7 +40,7 @@ Process only disk matching target dev name. (default: None)
Disable progress bar
.TP
\fB\-f\fR SOCKETFILE, \fB\-\-socketfile\fR SOCKETFILE
Use specified file for NBD Server socket (default: \fI\,/var/tmp/virtnbdbackup.67380\/\fP)
Use specified file for NBD Server socket (default: \fI\,/var/tmp/virtnbdbackup.734829\/\fP)
.TP
\fB\-r\fR, \fB\-\-raw\fR
Copy raw images as is during restore. (default: False)
Expand Down
15 changes: 15 additions & 0 deletions t/tests.bats
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,21 @@ toOut() {
[ "$status" -eq 0 ]
rm -rf ${TMPDIR}/ext-checkpoint
}
@test "Backup: test backup in transient environment" {
[ -z $INCTEST ] && skip "skipping"
run ../virtnbdbackup -d $VM -l full -o ${TMPDIR}/transient -C ${TMPDIR}/transient_checkpoints
echo "output = ${output}"
[ "$status" -eq 0 ]
# remove the checkpoint metadata
run virsh checkpoint-delete $VM --checkpointname virtnbdbackup.0 --metadata
echo "output = ${output}"
[ "$status" -eq 0 ]
# create inc backup, must recreate checkpoints.
run ../virtnbdbackup -d $VM -l inc -o ${TMPDIR}/transient -C ${TMPDIR}/transient_checkpoints
echo "output = ${output}"
[ "$status" -eq 0 ]
[[ "${output}" =~ "Redefine missing checkpoint" ]]
}
@test "Backup: create full backup" {
[ -z $INCTEST ] && skip "skipping"
run ../virtnbdbackup -d $VM -l full -o ${TMPDIR}/inctest
Expand Down

0 comments on commit 7f5adfc

Please sign in to comment.