Bug #5325

onevm snapshot-delete does not accept a snapshot name

Added by Roy Keene almost 4 years ago. Updated almost 4 years ago.

Status:ClosedStart date:08/25/2017
Priority:NormalDue date:
Assignee:Sergio Semedi% Done:

100%

Category:CLI
Target version:Release 5.4.1
Resolution:fixed Pull request:
Affected Versions:OpenNebula 4.14

Description

"onevm snapshot-delete" does not accept a snapshot name. If you give it something non-numeric for the snapshot name it interprets it as snapshot id 0, meaning the wrong snapshot will get deleted.

Either an error should be raised when non-numeric snapshot IDs are supplied, or they should be treated as a snapshot name.

Example:

[test] root@aurae-dashboard:/var/log# onevm snapshot-create 1 aaaa
[test] root@aurae-dashboard:/var/log# onevm snapshot-create 1 bbbb
[test] root@aurae-dashboard:/var/log# onevm show 1
...
SNAPSHOTS
  ID         TIME NAME                                           HYPERVISOR_ID
   0  08/25 17:21 aaaa                                           one-8439e67a-a0
   1  08/25 17:21 bbbb                                           one-630b749e-5f
...
[test] root@aurae-dashboard:/var/log# onevm snapshot-delete 1 bbbb
[test] root@aurae-dashboard:/var/log# onevm show 1
...
SNAPSHOTS
  ID         TIME NAME                                           HYPERVISOR_ID
   1  08/25 17:21 bbbb                                           one-630b749e-5f
...

Associated revisions

Revision ea065409
Added by Sergio Semedi almost 4 years ago

B #5325 Fixed snapshot-delete problem (#454)

Revision 78ea91a8
Added by Sergio Semedi almost 4 years ago

B #5325 Fixed snapshot-delete problem (#454)

(cherry picked from commit ea065409b6c24b7c23f5b8a04ef6bc4bf6db650b)

History

#1 Updated by Ruben S. Montero almost 4 years ago

  • Category set to CLI
  • Status changed from Pending to New
  • Assignee set to Sergio Semedi
  • Target version set to Release 5.4.1
  • Affected Versions OpenNebula 5.4 added

#2 Updated by Sergio Semedi almost 4 years ago

  • % Done changed from 0 to 100

#3 Updated by Javi Fontan almost 4 years ago

  • Status changed from New to Closed
  • Resolution set to fixed
  • Affected Versions OpenNebula 4.14 added

Merged Pull Request to master and one-5.4 branches

https://github.com/OpenNebula/one/pull/454

Also available in: Atom PDF