Comments (7)
@miq-bot add_label bug
from manageiq-automation_engine.
@d-m-u Can you try to reproduce this error with the suggested dialog?
@romanblanco Can you provide some details on the context in which you are using the dialog? Is it connected to a Service order, Custom Button or Catalog Item?
from manageiq-automation_engine.
@gmcculloug I've imported the dialog (Automate → Automation → Customization → Import/Export accordion) and tried to edit it in the Dialog Editor, it's not connected to any order, button or item.
from manageiq-automation_engine.
I cannot reproduce this, but I do occasionally see errors close to it if I need to restart the server.
from manageiq-automation_engine.
@romanblanco This issue has always been the result of running Rails in development mode and modifying code for a model. When Rails reloads the class it has the same name but the class object has a new object_id
which ultimately causes the failure. We do not have any accounts of this issue happening in production.
As @d-m-u mentioned above the only real solution is to restart the server.
Here is an example of how the class object gets updated in Rails dev mode:
[master x] ~/work/manageiq $ ber c
Loading development environment (Rails 5.0.6)
irb(main):001:0> a = Account.first
=> #<Account id: 1, name: "Test", acctid: nil, homedir: nil, local: nil, domain: nil, accttype: nil, vm_or_template_id: nil, display_name: nil, comment: nil, expires: nil, enabled: nil, last_logon: nil, host_id: nil>
Then comment out some methods in the app/model/account.rb
file and save the file.
irb(main):002:0> reload!
Reloading...
=> true
irb(main):003:0> b = Account.first
=> #<Account id: 1, name: "Test", acctid: nil, homedir: nil, local: nil, domain: nil, accttype: nil, vm_or_template_id: nil, display_name: nil, comment: nil, expires: nil, enabled: nil, last_logon: nil, host_id: nil>
irb(main):004:0> a.class.name
=> "Account"
irb(main):005:0> a.class.object_id
=> 70107371952440
irb(main):006:0> b.class.name
=> "Account"
irb(main):007:0> b.class.object_id
=> 70107299065540
irb(main):008:0>
As you can see objects a
and b
are object say the are based on the Account
class but each class object has a different object_id
.
Running the same basic test but with Automate Service models reproduces the error:
irb(main):002:0> $evm = MiqAeMethodService::MiqAeService.new(MiqAeEngine::MiqAeWorkspaceRuntime.new)
=> #<MiqAeMethodService::MiqAeService:0x00007f83643a1e18 @drb_server_references=[], @inputs={}, @workspace=#<MiqAeEngine::MiqAeWorkspaceRuntime:0x00007f83643a20e8 @readonly=false, @nodes=[], @current=[], @datastore_cache={}, @class_methods={}, @dom_search=#<MiqAeEngine::MiqAeDomainSearch:0x00007f83643a1fa8 @fqns_id_cache={}, @fqns_id_class_cache={}, @partial_ns=[], @prepend_namespace=nil>, @persist_state_hash={}, @current_state_info={}, @state_machine_objects=[], @ae_user=nil, @rbac=false>, @persist_state_hash={}, @logger=#<Vmdb::Loggers::MulticastLogger:0x00007f8361858a18 @loggers=#<Set: {#<VMDBLogger:0x00007f8361858cc0 @level=1, @progname=nil, @default_formatter=#<Logger::Formatter:0x00007f8361858c20 @datetime_format=nil>, @formatter=#<VMDBLogger::Formatter:0x00007f8361858ab8 @datetime_format=nil>, @logdev=#<Logger::LogDevice:0x00007f8361858bd0 @shift_period_suffix="%Y%m%d", @shift_size=1048576, @shift_age=0, @filename=#<Pathname:/Users/gmccullough/work/manageiq/log/automation.log>, @dev=#<File:/Users/gmccullough/work/manageiq/log/automation.log>, @mon_owner=nil, @mon_count=0, @mon_mutex=#<Thread::Mutex:0x00007f8361858b80>>, @write_lock=#<Thread::Mutex:0x00007f8361858a68>, @local_levels={}>}>, @level=0>>
irb(main):003:0> a = $evm.vmdb('account').first
=> #<MiqAeServiceAccount:0x3fc1b21b1904 @object=#<Account id: 1, name: "Test", acctid: nil, homedir: nil, local: nil, domain: nil, accttype: nil, vm_or_template_id: nil, display_name: nil, comment: nil, expires: nil, enabled: nil, last_logon: nil, host_id: nil>, @virtual_columns=["href_slug", "region_description", "region_number"], @associations=["host", "vm_or_template"]>
irb(main):004:0> reload!
Reloading...
=> true
irb(main):005:0> b = $evm.vmdb('account').first
SystemStackError: stack level too deep
from /Users/gmccullough/.gem/ruby/2.4.3/bundler/gems/manageiq-automation_engine-2b24b4e0421e/lib/miq_automation_engine/engine/miq_ae_method_service.rb:3:in `const_missing'
from /Users/gmccullough/.gem/ruby/2.4.3/bundler/gems/manageiq-automation_engine-2b24b4e0421e/lib/miq_automation_engine/engine/miq_ae_method_service.rb:3:in `const_missing'
from /Users/gmccullough/.gem/ruby/2.4.3/bundler/gems/manageiq-automation_engine-2b24b4e0421e/lib/miq_automation_engine/engine/miq_ae_method_service.rb:3:in `const_missing'
To work around this issue you'll need to restart the Rails server.
from manageiq-automation_engine.
@gmcculloug Thanks for the explaination 👍
from manageiq-automation_engine.
@fdupont-redhat ☝️ January 22, 2018 11:23 AM
from manageiq-automation_engine.
Related Issues (20)
- Modify YAML for Service Model encoding/decoding to store minimal object properties HOT 2
- Datastore import - name source HOT 5
- MiqAeNamespace should use ancestry instead of acts_as_tree HOT 3
- [Automate Engine] Looking up objects in the database is expensive HOT 2
- [RFE] Git management of automate code / merge automate domains HOT 2
- Investigate replacing `require_relative` with `require_dependency` HOT 8
- Add specs for classes using EmsOperationsMixin based on queue_name change HOT 2
- Unable to Pass A List As Extra Variable For Ansible Playbooks HOT 3
- Add option for quota to be applied on group but enforced at user level
- Vmware "memory_reserve_expand" param cannot be set as true HOT 1
- Not getting proper error message while updating Automate method HOT 1
- Provision dialog for ec2 with public images fails - high worker memory utilization HOT 5
- Embedded Ansible - Add support for ansible.cfg files in user repositories HOT 1
- Incorrect error when deleting a VMware ESXi host. HOT 3
- Attribute value pairs message is not considered while simulation HOT 2
- Custom message attribute is not considering with instance in logs in automation.log HOT 2
- Automate expression method broken in jansa and kasparov HOT 1
- Bug with handling of Arrays in Automate HOT 4
- Multiselect value is stored in a different format. HOT 15
- Dependency Dashboard
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from manageiq-automation_engine.