Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

At least one snapshot has to be active to create a new snapshot for this VM #19396

Closed
kruge002 opened this issue Oct 14, 2019 · 3 comments · Fixed by #19458
Closed

At least one snapshot has to be active to create a new snapshot for this VM #19396

kruge002 opened this issue Oct 14, 2019 · 3 comments · Fixed by #19458
Assignees
Labels

Comments

@kruge002
Copy link
Contributor

kruge002 commented Oct 14, 2019

When trying to create a snapshot for a VMware VM we sometimes see the following error message: "At least one snapshot has to be active to create a new snapshot for this VM". The error is raised in the following code fragment:

if !snapshots.blank? && snapshots.first.get_current_snapshot.nil?
  unsupported_reason_add(:snapshot_create, _("At least one snapshot has to be active to create a new snapshot for this VM"))
end

Creating a new snapshot should be possible independent of another snapshot having the “currentSnapshot” property set.

Reference:
http://talk.manageiq.org/t/at-least-one-snapshot-has-to-be-active-to-create-a-new-snapshot-for-this-vm/4590
https://github.com/ManageIQ/manageiq/blob/master/app/models/vm_or_template/operations/snapshot.rb
https://github.com/ManageIQ/manageiq/blob/master/app/models/snapshot.rb
https://code.vmware.com/apis/358/vsphere/doc/vim.vm.SnapshotInfo.html#currentSnapshot

@agrare agrare self-assigned this Oct 14, 2019
@agrare agrare added the bug label Oct 14, 2019
@agrare
Copy link
Member

agrare commented Oct 31, 2019

@gmcculloug I know it was a long time ago but do you happen to remember why this was added?

@gmcculloug
Copy link
Member

@agrare I do not recall off the top of my head. I will spend a little more time digging into the history.

@gmcculloug
Copy link
Member

@agrare @kruge002 I traced the message At least one snapshot has to be active to create a new snapshot for this VM back to May of 2008 but it is unclear why it was originally added.

agrare added a commit to agrare/manageiq that referenced this issue Nov 5, 2019
When creating a new snapshot and there is at least one snapshot already
we are checking to ensure that the first snapshot is "current".

This check isn't necessary and can prevent new snapshots from being
created through MIQ when it is entirely possible through the underlying
provider.

Fixes ManageIQ#19396
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants