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

Error after deleting intermediate snapshot #13540

Closed
kruge002 opened this issue Jan 17, 2017 · 3 comments
Closed

Error after deleting intermediate snapshot #13540

kruge002 opened this issue Jan 17, 2017 · 3 comments
Assignees

Comments

@kruge002
Copy link
Contributor

(Euwe) After deleting an intermediate snapshot of multiple snapshots, clicking on 'Snapshots' within the VM details page has no effect. In production.log the error is seen.

Steps to reproduce the issue:

  1. Go to the details page of a VMware VM
  2. Click on 'Snapshots' (see screenshot below)
  3. Add a snapshot
  4. Wait for the completion of the snapshot (refresh details page and observe Snapshots count)
  5. Add a second snapshot
  6. Wait for the completion of the snapshot (refresh details page and observe Snapshots count)
  7. Delete the first snapshot
  8. Wait for the deletion of the first snapshot (refresh details page and observe Snapshots count)
  9. Click on 'Snapshots' on the VM details page
  10. You would expect the Snapshots details page to show but nothing happens and a fatal error is logged to production.log

After logging out and logging in again the snapshots management page is reachable again.

production.log

[----] I, [2017-01-17T16:09:07.479652 #24178:16202a4]  INFO -- : Started POST "/vm_infra/show/1000000000022?display=snapshot_info" for 127.0.0.1 at 2017-01-17 16:09:07 +0100
[----] I, [2017-01-17T16:09:07.523259 #24178:16202a4]  INFO -- : Processing by VmInfraController#show as JS
[----] I, [2017-01-17T16:09:07.523409 #24178:16202a4]  INFO -- :   Parameters: {"authenticity_token"=>"oF2W8IHE20Bk0azZOdWGCjbmpAjF/qmsZUpnRJxC/bpCv71RV8Y+iioXyzoIyjbynAIimbDceNr68IUwwsAxYw==", "display"=>"snapshot_info", "id"=>"1000000000022"}
[----] I, [2017-01-17T16:09:07.622176 #24178:16202a4]  INFO -- :   Rendered layouts/_flash_msg.html.haml (0.1ms)
[----] I, [2017-01-17T16:09:07.633864 #24178:16202a4]  INFO -- :   Rendered vm_common/_snapshots_desc.html.haml (6.5ms)
[----] I, [2017-01-17T16:09:07.634002 #24178:16202a4]  INFO -- :   Rendered vm_common/_config.html.haml (16.6ms)
[----] F, [2017-01-17T16:09:07.634234 #24178:16202a4] FATAL -- : Error caught: [ActionView::Template::Error] Couldn't find Snapshot with 'id'=1000000000022
/opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/activerecord-5.0.0.1/lib/active_record/core.rb:173:in `find'
/var/www/miq/vmdb/app/views/vm_common/_snapshots_desc.html.haml:5:in `_app_views_vm_common__snapshots_desc_html_haml___319794043838976554_233122420'
/opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/actionview-5.0.0.1/lib/action_view/template.rb:158:in `block in render'
/opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.0.1/lib/active_support/notifications.rb:166:in `instrument'
/opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/actionview-5.0.0.1/lib/action_view/template.rb:348:in `instrument'
/opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/actionview-5.0.0.1/lib/action_view/template.rb:156:in `render'

2017-01-17_16h24_24

@kruge002 kruge002 changed the title Error caught: [ActionView::Template::Error] Couldn't find Snapshot with 'id'=1000000000022 Error after deleting intermediate snapshot Jan 19, 2017
@agrare
Copy link
Member

agrare commented Jan 19, 2017

Thanks for the bug report @kruge002 !

I was able to reproduce this and I suspect it is a UI issue.

This is the error on upstream/master:

[----] F, [2017-01-19T11:27:07.810357 #32231:2ad497fc0ae4] FATAL -- : Error caught: [ActionView::Template::Error] Couldn't find Snapshot with 'id'=2
/var/lib/gems/2.3.0/gems/activerecord-5.0.1/lib/active_record/core.rb:173:in `find'
/home/agrare/.bundle/ruby/2.3.0/manageiq-ui-classic-90608b7beb94/app/views/vm_common/_snapshots_desc.html.haml:5:in `__home_agrare__bundle_ruby_______manageiq_ui_classic______b_beb___app_views_vm_common__snapsho
/var/lib/gems/2.3.0/gems/actionview-5.0.1/lib/action_view/template.rb:159:in `block in render'

If we look at https://github.com/ManageIQ/manageiq-ui-classic/blob/master/app/views/vm_common/_snapshots_desc.html.haml#L5

It is trying to find the previous snapshot that you had selected: selected_id = Snapshot.find(session[:snap_selected]) but the snapshot that you had selected is now removed from the db.

Assigning to the UI team.

@dclarizio
Copy link

This issue was moved to ManageIQ/manageiq-ui-classic#209

@dclarizio
Copy link

@Fryguy @chessbyte please close this issue as I've copied it over to the ui-classic repo. Thx, Dan

@agrare agrare closed this as completed Jan 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants