When an automate method calls the inspect function on MiqAeServiceObject marshaled via Drb, the results are different between version's 5.3 and 5.4. In version 5.3 we were using Ruby 1.9.3 and in version 5.4 we are using Ruby 2.0. The inspect method is not being defined in MiqAeServiceObject so in ruby 2.0 it calls the Object.inspect instead of the to_s method which is defined in MiqAeServiceObject. The solution would be to implement the inspect method in MiqAeServiceObject. The inspect method like the to_s method should return the name of the object. The error that we see [too large packet 27396444] is happening when we try and log one of the objects returned via $evm.instantiate. We call the inspect method on the object before logging it, the inspect method yields a string of size 27,396,444 which is over the 25 MB limit that is defined in DRb when exchanging objects. lib/drb/drb.rb @@load_limit = 256 * 102400
New commit detected on manageiq/master: https://github.com/ManageIQ/manageiq/commit/684600fdafb686b58719ae6e2da6041a6173b281 commit 684600fdafb686b58719ae6e2da6041a6173b281 Author: Madhu Kanoor <mkanoor> AuthorDate: Fri Jul 24 11:23:58 2015 -0400 Commit: Madhu Kanoor <mkanoor> CommitDate: Fri Jul 24 17:09:41 2015 -0400 Define inspect method for MiqAeServiceObject Notes from ruby 2.0 incompatibilities Object#inspect does always return a string like #<ClassName:0x…> instead of delegating to #to_s. [#2152] Since we didn't have the inspect method defined it would call the Object#inspect causing the entire workspace and rest of automate objects to be added as strings generating data over 27MB when an inspect is called in any of the Drb returned objects. The automate methods would then try to log this string and get the error [too large packet xxxxxxxx] inspect now outputs the class, object_id and name https://bugzilla.redhat.com/show_bug.cgi?id=1245724 lib/miq_automation_engine/engine/miq_ae_service.rb | 5 +++++ spec/lib/miq_automation_engine/miq_ae_service_spec.rb | 10 +++++++++- 2 files changed, 14 insertions(+), 1 deletion(-)
New commit detected on cfme/5.4.z: https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=b23dd0c3543668739b8f87113c9a035d37ed6eb2 commit b23dd0c3543668739b8f87113c9a035d37ed6eb2 Author: Madhu Kanoor <mkanoor> AuthorDate: Fri Jul 24 11:23:58 2015 -0400 Commit: Madhu Kanoor <mkanoor> CommitDate: Mon Jul 27 14:26:29 2015 -0400 Define inspect method for MiqAeServiceObject Notes from ruby 2.0 incompatibilities Object#inspect does always return a string like #<ClassName:0x…> instead of delegating to #to_s. [#2152] Since we didn't have the inspect method defined it would call the Object#inspect causing the entire workspace and rest of automate objects to be added as strings generating data over 27MB when an inspect is called in any of the Drb returned objects. The automate methods would then try to log this string and get the error [too large packet xxxxxxxx] inspect now outputs the class, object_id and name https://bugzilla.redhat.com/show_bug.cgi?id=1245724 vmdb/lib/miq_automation_engine/engine/miq_ae_service.rb | 5 +++++ vmdb/spec/lib/miq_automation_engine/miq_ae_service_spec.rb | 10 +++++++++- 2 files changed, 14 insertions(+), 1 deletion(-)
New commit detected on cfme/5.4.z: https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=7a409d25a2fda1cb05230efb6fdd2ab7a3db24f4 commit 7a409d25a2fda1cb05230efb6fdd2ab7a3db24f4 Merge: 70ed07a b23dd0c Author: Greg McCullough <gmccullo> AuthorDate: Tue Jul 28 09:12:25 2015 -0400 Commit: Greg McCullough <gmccullo> CommitDate: Tue Jul 28 09:12:25 2015 -0400 Merge branch 'test_54_bz_1245724' into '5.4.z' Define inspect method for MiqAeServiceObject Notes from ruby 2.0 incompatibilities Object#inspect does always return a string like #<ClassName:0x…> instead of delegating to #to_s. [#2152] Since we didn't have the inspect method defined it would call the Object#inspect causing the entire workspace and rest of automate objects to be added as strings generating data over 27MB when an inspect is called in any of the Drb returned objects. The automate methods would then try to log this string and get the error [too large packet xxxxxxxx] inspect now outputs the class, object_id and name https://bugzilla.redhat.com/show_bug.cgi?id=1245724 See merge request !193 vmdb/lib/miq_automation_engine/engine/miq_ae_service.rb | 5 +++++ vmdb/spec/lib/miq_automation_engine/miq_ae_service_spec.rb | 10 +++++++++- 2 files changed, 14 insertions(+), 1 deletion(-)
In order to test this issue From an automate method call evm.instantiate and then call log on the inspect obj=$evm.instantiate('/Test/System/Demo/Fred') $evm.log("info","Object Inspect data is #{obj.inspect}") Before this fix is applied the log will have huge amounts of data depending on your Automate model, after you apply this fix it should print the class_name, id and object name. If you try this in previous version it will just print the name of the instance.
Verified fixed in version 5.5.0.12
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://access.redhat.com/errata/RHSA-2015:2551