Description of problem: When an automate method runs we get a recycled object exception. Version-Release number of selected component (if applicable): 5.4 How reproducible: Depends on when the Ruby Garbage collector runs, if the object is deleted on the Automate Engine side (server) and the automate method (client) needs to use it. Steps to Reproduce: 1. Make sure that the RedHat domain is present in automate 2. Do a VM provisioning by default we run the vmware_best_fit_with_scope.rb or redhat_best_placement_with_scope.rb 3. The above methods use the prov.check_quota(:active_provisions) which returns a Ruby Hash with default proc. 4. The provision might fail, its not guaranteed because we depend on when the Ruby Garbage collector frees up the objects Actual results: Automate method fails and stops the provisioning Expected results: Automate method should succeed Additional info: This bug was introduced when we removed the GC.disable before we dispatched an automate method. This code is present only in 5.4 and bugs like these are difficult to reproduce.
New commit detected on manageiq/master: https://github.com/ManageIQ/manageiq/commit/af95cd753f78be70075bbf9a027df5dc4835ef64 commit af95cd753f78be70075bbf9a027df5dc4835ef64 Author: Madhu Kanoor <mkanoor> AuthorDate: Tue Mar 17 14:33:58 2015 -0400 Commit: Madhu Kanoor <mkanoor> CommitDate: Tue Mar 17 14:33:58 2015 -0400 Added drb_return in check_quota https://bugzilla.redhat.com/show_bug.cgi?id=1202427 Hashes with default_proc are sent to the client as references which need to exist on the server side while the automate method is running. .../service_models/mixins/miq_ae_service_miq_provision_mixin.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
The provision is successful when Redhat domain is enabled. But In automation logs vmware_best_fit_with_scope.rb or redhat_best_placement_with_scope.rb is not seen .
You would have to copy the methods in /RedHat/Infrastructure/VM/Provisioning/Placement/ as default. This will cause one of those methods to be used. Also you would have to enable tagging for this provision to work. By default the Provisioning uses /ManageIQ/Infrastructure/VM/Provisioning/Placement/default
Steps to Verify ; 1. Copy the Modify the /ManageIQ/Infrastructure/VM/Provisioning/Placement/Default instance to your own writable domain. 2. Modify your newly copied instance: YOURDOMAIN/Infrastructure/VM/Provisioning/Placement/Default. Change redhat_best_fit_cluster to redhat_best_placement_with_scope Change vmware_best_fit_least_utilized to vmware_best_fit_with_scope 3. Provision VM . 4. In Automation logs look for : Invoking [inline] method [/Default/Infrastructure/VM/Provisioning/Placement/vmware_best_fit_with_scope] with inputs [{}] Provision successful and methods seen in logs.
Git hub link - https://github.com/ManageIQ/manageiq/issues/2150
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