Description of problem: Automate method to revert a vm's snapshot fails with the following error. [----] I, [2014-11-24T19:16:33.936495 #31692:3e23a6c] INFO -- : Q-task_id([automation_task_13387]) <User-Defined Method> revertSnapshot - Reverting Snapshot:<sdlc0296> Description:<> Date:<2014-11-24 18:38:42 UTC> for VM:<sdlc0296> [----] E, [2014-11-24T19:16:33.938632 #31692:3e23a6c] ERROR -- : Q-task_id([automation_task_13387]) The following error occurred during instance method <vm> for AR object <#<Snapshot id: 46565, uid: "2014-07-08T20:48:12.421667Z", parent_uid: nil, name: "sdlc0296", description: "", current: 1, total_size: 335754890, filename: nil, create_time: "2014-07-08 20:48:12", disks: [], created_on: "2014-09-14 07:15:33", updated_on: "2014-11-24 18:38:42", parent_id: nil, vm_or_template_id: 15863, uid_ems: "2014-07-08T20:48:12.421667Z", ems_ref_obj: "--- !ruby/string:VimString\nstr: snapshot-235579\nxsi...", ems_ref: "snapshot-235579">> [----] E, [2014-11-24T19:16:33.939029 #31692:3e23a6c] ERROR -- : Q-task_id([automation_task_13387]) MiqAeServiceModelBase.ar_method raised: <NoMethodError>: <undefined method `vm' for #<Snapshot:0x0000000a9f4a48>> [----] E, [2014-11-24T19:16:33.939171 #31692:3e23a6c] ERROR -- : Q-task_id([automation_task_13387]) /opt/rh/ruby193/root/usr/share/gems/gems/activemodel-3.2.13/lib/active_model/attribute_methods.rb:407:in `method_missing' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.13/lib/active_record/attribute_methods.rb:149:in `method_missing' Appears this error is occurring from the split of vm/template. Version-Release number of selected component (if applicable): 5.2.5 How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info: Temporary workaround; Go to /var/www/miq/vmdb/lib/miq_automation_engine/service_models/ Edit the miq_ae_service_snapshot.rb Replace the 3 references to vm with vm_or_template.
New commit detected on manageiq/master: https://github.com/ManageIQ/manageiq/commit/30d1ceac2a35c2fdac5b4f950792100d2f17d375 commit 30d1ceac2a35c2fdac5b4f950792100d2f17d375 Author: Greg McCullough <gmccullo> AuthorDate: Tue Dec 2 16:32:28 2014 -0500 Commit: Greg McCullough <gmccullo> CommitDate: Tue Dec 2 16:54:07 2014 -0500 Fixed broken vm reference in snapshot service model. https://bugzilla.redhat.com/show_bug.cgi?id=1169930 .../miq_automation_engine/service_models/miq_ae_service_snapshot.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
New commit detected on cfme/5.3.z: https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=91556448907dd13024312f9e675cdd36a127cb07 commit 91556448907dd13024312f9e675cdd36a127cb07 Author: Greg McCullough <gmccullo> AuthorDate: Tue Dec 2 16:32:28 2014 -0500 Commit: Greg McCullough <gmccullo> CommitDate: Thu Dec 4 10:30:13 2014 -0500 Fixed broken vm reference in snapshot service model. https://bugzilla.redhat.com/show_bug.cgi?id=1169930 .../miq_automation_engine/service_models/miq_ae_service_snapshot.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
Created attachment 1029384 [details] sumulation
Created attachment 1029385 [details] snapshot
Hard to tell what actually happened without seeing the automation.log. Can you please provide that as well.
Created attachment 1030469 [details] automation log
Have attached the automation log.
The automate method you are running is InspectMe which is designed to dump properties of objects to the automate log. I saw that in the screenshots but thought maybe you were using that wiring but had overridden the method with the method you are trying to test. So the question now is where is the actual method that is taking the VM and snap_shot name and trying to test the automate method? One possibility is that you did override the InspectMe method but it is in a domain that is marked as disabled. It is clear from the logging that the revertSnapshot method is not what is being executed.
Yes,the domain was disabled.I retried in the enabled domain and the snapshot got reverted.
Snapshot reverted.see attached automation.log Verified: 5.4.0.4.20150528174021_88cc76c
Created attachment 1033116 [details] automation log - snapshot reverted
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2015-1100.html