Project

General

Profile

Actions

Bug #10427

closed

Foreman 1.8 VM accociation doesn't work

Added by Operations ooVoo about 9 years ago. Updated about 9 years ago.

Status:
Closed
Priority:
High
Assignee:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

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

image004.png View image004.png 37.9 KB associate VM warnning Operations ooVoo, 05/08/2015 10:21 AM
image005.png View image005.png 48.3 KB Operations ooVoo, 05/08/2015 10:23 AM
Actions #2

Updated by Dominic Cleal about 9 years ago

  • translation missing: en.field_release deleted (50)
Actions #3

Updated by Dominic Cleal about 9 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

Actions #4

Updated by Anonymous about 9 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.

Actions

Also available in: Atom PDF