one icon indicating copy to clipboard operation
one copied to clipboard

onevm: disk-snapshot-create does not handle error if live snapshot feature is disabled

Open abbbi opened this issue 2 years ago • 0 comments

Description

If the live snapshot feature is disabled, onevm disk-snapshot-create still exits with zero exit code and reports that an snapshot was successfully created.

To Reproduce

  1. in /etc/one/vmm_exec/vmm_execrc set LIVE_DISK_SNAPSHOTS=""
  2. Restart services (not sure if required)
  3. Attempt to create an snapshot:

root@debian11-one:/home/vagrant# onevm disk-snapshot-create 1 0 TESTSNAPSHOT2 -v VM 1: disk snapshot created root@debian11-one:/home/vagrant# echo $? 0

  1. in the VM logfile it is to be seen, that snapshot creation failed:
Wed Aug 10 10:13:07 2022 [Z0][VM][I]: New state is ACTIVE
Wed Aug 10 10:13:07 2022 [Z0][VM][I]: New LCM state is DISK_SNAPSHOT
Wed Aug 10 10:13:07 2022 [Z0][VMM][E]: DISKSNAPSHOTCREATE: Cannot perform a live DISKSNAPSHOTCREATE operation

Expected behavior

onevm disk-snapshot-create should exit with error code != 0 and report cause for failure.

Details Version used: opennebula 6.2 on Debian Bullseye.

Progress Status

  • [ ] Code committed
  • [ ] Testing - QA
  • [ ] Documentation (Release notes - resolved issues, compatibility, known issues)

abbbi avatar Aug 10 '22 08:08 abbbi