Actions
Bug #1705
closedError creating a new host, provisioned as Virtual Machine on Libvirt compute resource: undefined method `associated_type' for #<Audited::Adapters::ActiveRecord::Audit:0x7fd85849ed68>
Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Description
This happened just now when I was trying to provision a new host as a VM on a Libvirt compute resource. Using Foreman develop from Git, commit 59be369d3651f86d372ff6777a5e8ec7e4b951a7. I currently have the workaround for issue #1639 applied, but I don't think that matters.
NoMethodError undefined method `associated_type' for #<Audited::Adapters::ActiveRecord::Audit:0x7fd85849ed68> lib/audit_extensions.rb:46:in `fix_auditable_type' app/controllers/hosts_controller.rb:93:in `create'
From the logs:
Started POST "/hosts" for 10.216.236.14 at Mon Jun 25 18:47:49 +0200 2012 Processing by HostsController#create as Parameters: {"host"=>{"environment_id"=>"1", "name"=>"pbxdev07", "puppetclass_ids"=>[""], "host_parameters_attributes"=>{"0"=>{"nested"=>"", "name"=>"", "value"=>"[FILTERED]", "_destroy"=>"false"}}, "is_owned_by"=>"1-Usergroups", "enab led"=>"1", "puppet_proxy_id"=>"1", "managed"=>"true", "model_id"=>"", "sp_ip"=>"", "provision_method"=>"build", "root_pass"=>"[FILTERED]", "compute_resource_id"=>"2", "hostgroup_id"=>"3", "sp_name"=>"", "build"=>"1", "subnet_id"=>"4", "s p_mac"=>"", "sp_subnet_id"=>"", "compute_attributes"=>{"cpus"=>"1", "nics_attributes"=>{"0"=>{"bridge"=>"brvlan63", "_delete"=>""}, "new_nics"=>{"bridge"=>"", "_delete"=>""}}, "memory"=>"536870912", "volumes_attributes"=>{"new_volumes"=> {"format_type"=>"raw", "_delete"=>"", "pool_name"=>"default", "capacity"=>"10G"}, "0"=>{"format_type"=>"raw", "_delete"=>"", "pool_name"=>"virthosts", "capacity"=>"20G"}}, "start"=>"1"}, "mac"=>"", "ip"=>"10.1.63.7", "operatingsystem_id" =>"1", "ptable_id"=>"11", "disk"=>"", "progress_report_id"=>"[FILTERED]", "domain_id"=>"1", "comment"=>"", "overwrite"=>"false", "architecture_id"=>"1", "medium_id"=>"3"}, "utf8"=>"✓", "authenticity_token"=>"Nyl/Uev2FG3k7MBct3QGSZWoJqXOb zr1x1+ASzZtUys=", "capabilities"=>"build"} Adding Compute instance for pbxdev07.pbx.dev.rz01.riseops.at Create DHCP reservation for pbxdev07.pbx.dev.rz01.riseops.at-52:54:00:9d:68:0d/10.1.63.7 Add DNS A record for pbxdev07.pbx.dev.rz01.riseops.at/10.1.63.7 Add the TFTP configuration for pbxdev07.pbx.dev.rz01.riseops.at Fetching required TFTP boot files for pbxdev07.pbx.dev.rz01.riseops.at Powering up Compute instance for pbxdev07.pbx.dev.rz01.riseops.at Operation FAILED: undefined method `associated_type' for #<Audited::Adapters::ActiveRecord::Audit:0x7fd85849ed68> Rendered common/500.rhtml (6.2ms) Completed 500 Internal Server Error in 3613ms (Views: 10.5ms | ActiveRecord: 79.5ms)
Updated by Ohad Levy almost 12 years ago
- Status changed from New to Need more information
Updated by Andreas Ntaflos almost 12 years ago
Well, I feel silly now :) Running `RAILS_ENV=production rake db:migrate` fixed it, thanks. Same goes for issue #1704.
So what is the correct update procedure when running Foreman from the develop branch?
- `git pull`
- `bundle update`
- `RAILS_ENV=production rake db:migrate`
Anything else?
Updated by Ohad Levy almost 12 years ago
- Status changed from Need more information to Resolved
Actions