Bug #10427
closedForeman 1.8 VM accociation doesn't work
Description
Step to reproduce:
Computer Resources -> XenServer -> VM List -> Click on relevant VM -> Associate VM
foreman page original DB schema doesn’t include field IP under hosts table.
Table schema:
create_table "hosts", :force => true do |t|
t.string "name", :null => false
t.datetime "last_compile"
t.datetime "last_freshcheck"
t.datetime "last_report"
t.datetime "updated_at"
t.integer "source_file_id"
t.datetime "created_at"
t.string "root_pass"
t.string "serial"
t.integer "puppet_status", :limit => 8, :default => 0, :null => false
t.integer "architecture_id"
t.integer "operatingsystem_id"
t.integer "environment_id"
t.integer "ptable_id"
t.integer "medium_id"
t.boolean "build", :default => false
t.text "comment"
t.text "disk"
t.datetime "installed_at"
t.integer "model_id"
t.integer "hostgroup_id"
t.integer "owner_id"
t.string "owner_type"
t.boolean "enabled", :default => true
t.integer "puppet_ca_proxy_id"
t.boolean "managed", :default => false, :null => false
t.boolean "use_image"
t.string "image_file", :limit => 128
t.string "uuid"
t.integer "compute_resource_id"
t.integer "puppet_proxy_id"
t.string "certname"
t.integer "image_id"
t.integer "organization_id"
t.integer "location_id"
t.string "type"
t.string "otp"
t.integer "realm_id"
t.integer "compute_profile_id"
t.string "provision_method"
t.string "grub_pass", :default => ""
end
Files
Updated by Operations ooVoo about 10 years ago
- File image005.png image005.png added
Updated by Dominic Cleal about 10 years ago
- Translation missing: en.field_release deleted (
50)
Updated by Dominic Cleal about 10 years ago
- Project changed from Foreman to Xen
This is by design in 1.8, the old IP/MAC/domain etc attributes that were on host itself moved to NICs/interfaces, making handling of the primary interface more consistent.
Compute resources should scan the "nics" table for known MACs/IPs. The easiest way is a new "associate_by" method which is used in other compute resources. See these examples:
https://github.com/theforeman/foreman/blob/1.8.0/app/models/compute_resources/foreman/model/ec2.rb#L98
https://github.com/theforeman/foreman/blob/1.8.0/app/models/compute_resources/foreman/model/ovirt.rb#L223
Updated by Anonymous almost 10 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
- Pull request https://github.com/theforeman/foreman-xen/pull/23 added
- Pull request deleted (
)
Reported to be fixed, thanks to Ben Bettridge. foreman_xen 0.1.0 (which needs Foreman 1.8.1) contains the fix.