Project

General

Profile

Actions

Bug #26505

open

When using seperate provisioning/primary interface manual addition of hostname before it to work

Added by Olmo Rupert about 5 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Network
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

When using seperate provisioning/primary interface you need to manually update the hostname value of your seperate provisioning interface.

Only the primary interface is auto filled with the value registered on the first tab when creating an host.

When you do not specify this value, foreman will proceed without errors, but no DHCP entry will be created for the provisioning interface.

When configuring the provisioning interface in the foreman wizard, and selecting the provisioning network, I can see the logs in the foreman-proxy that it requests an available IP. ( 17:50 ). You can also see later when actually creating the node object ( 17:53 ) it does do some stuff for the PXE configuration:

foreman-proxy.log

2019-04-01T17:50:42 2330084b [I] Started GET /172.21.99.0/unused_ip from=172.21.99.10&to=172.21.99.250
2019-04-01T17:50:44 2330084b [I] Finished GET /172.21.99.0/unused_ip with 200 (2011.02 ms)
2019-04-01T17:50:49 2330084b [I] Started GET /172.21.99.0/unused_ip from=172.21.99.10&to=172.21.99.250
2019-04-01T17:50:51 2330084b [I] Finished GET /172.21.99.0/unused_ip with 200 (2007.67 ms)
2019-04-01T17:53:08 2330084b [I] Started POST /
2019-04-01T17:53:08 2330084b [I] Finished POST / with 200 (40.66 ms)
2019-04-01T17:53:08 2330084b [I] Started POST /
2019-04-01T17:53:08 2330084b [I] Finished POST / with 200 (18.43 ms)
2019-04-01T17:53:08 2330084b [I] Started POST /PXELinux/00:xx:xx:xx:a2:a2
2019-04-01T17:53:08 2330084b [I] Finished POST /PXELinux/00:xx:xx:xx:a2:a2 with 200 (1.17 ms)
2019-04-01T17:53:08 2330084b [I] Started POST /fetch_boot_file
2019-04-01T17:53:08 2330084b [I] Finished POST /fetch_boot_file with 200 (0.9 ms)
2019-04-01T17:53:08 2330084b [I] Started POST /fetch_boot_file
2019-04-01T17:53:08 2330084b [I] Finished POST /fetch_boot_file with 200 (0.85 ms)

though i can see in foreman's production.log that it is only performing the the actual dhcp allocation when creating the node (after the ip proposal). but this happens only for the primary interface (logs attached), and not for the provisioning interface. That happens only when you manually re-entered the hostname in the provisioning interface. The wizard continues without foreman warning that it would not create the DHCP record because it appears not satisfied.

I guess auto populate it when creating a separate provisioning interface, or when tagging the respective flag. I guess you can always change it when you really want, but it has to be present for the actual operation to work so I guess this can and should be auto populated to get rid of human error in this operation.

production.log:
2019-04-01T17:53:05 [I|app|8ccf2] Processing by HostsController#create as */*
2019-04-01T17:53:05 [I|app|8ccf2]   Parameters: {"utf8"=>"✓", "authenticity_token"=>"sk00t", "host"=>{"name"=>"te-k8-olmo203", "hostgroup_id"=>"25", "compute_resource_id"=>"8", "environment_id"=>"2", "puppet_proxy_id"=>"6", "puppet_ca_proxy_id"=>"4", "puppetclass_ids"=>["", "486"], "managed"=>"true", "progress_report_id"=>"[FILTERED]", "type"=>"Host::Managed", "interfaces_attributes"=>{"0"=>{"_destroy"=>"0", "type"=>"Nic::Managed", "mac"=>"", "identifier"=>"ens192", "name"=>"te-k8-olmo203", "domain_id"=>"5", "subnet_id"=>"44", "ip"=>"172.21.6.34", "ip6"=>"", "managed"=>"1", "primary"=>"1", "provision"=>"0", "virtual"=>"0", "tag"=>"", "attached_to"=>"", "compute_attributes"=>{"type"=>"VirtualE1000", "network"=>"network-34628"}}, "1"=>{"_destroy"=>"0", "type"=>"Nic::Managed", "mac"=>"", "identifier"=>"ens224", "name"=>"", "domain_id"=>"6", "subnet_id"=>"4", "ip"=>"172.21.99.107", "ip6"=>"", "managed"=>"1", "primary"=>"0", "provision"=>"1", "virtual"=>"0", "tag"=>"", "attached_to"=>"", "compute_attributes"=>{"type"=>"VirtualE1000", "network"=>"network-92873"}}}, "compute_attributes"=>{"cpus"=>"2", "corespersocket"=>"2", "memory_mb"=>"30720", "firmware"=>"bios", "cluster"=>"FR2_Clu", "resource_pool"=>"Resources", "path"=>"/Datencenter/prod1/vm", "guest_id"=>"centos7_64Guest", "hardware_version"=>"vmx-13", "memoryHotAddEnabled"=>"0", "cpuHotAddEnabled"=>"0", "add_cdrom"=>"0", "start"=>"1", "annotation"=>"", "scsi_controllers"=>"{\"scsiControllers\":[{\"type\":\"ParaVirtualSCSIController\",\"shared_bus\":\"noSharing\",\"unit_number\":7,\"key\":1000}],\"volumes\":[{\"thin\":true,\"name\":\"Hard disk 1\",\"mode\":\"persistent\",\"controllerKey\":1000,\"serverId\":\"500e3b25-97fe-371b-20dc-9775d596d78d\",\"datastore\":\"vol-stor-fr2-02\",\"id\":\"6000C297-996d-6b7c-2114-514e43e9a184\",\"filename\":\"[vol-stor-fr2-02] te-k8-olmo202.ffm.xxx.cloud/te-k8-olmo202.ffm.xxx.cloud.vmdk\",\"size\":26214400,\"unitNumber\":0,\"sizeGb\":25}]}"}, "architecture_id"=>"1", "operatingsystem_id"=>"13", "provision_method"=>"build", "build"=>"1", "medium_id"=>"1", "ptable_id"=>"", "pxe_loader"=>"PXELinux BIOS", "disk"=>"zerombr\r\nclearpart --all --drives=sda --initlabel\r\npartition /boot --fstype ext4 --size=1024 --ondisk=sda\r\npartition pv.2 --size=0 --grow --ondisk=sda\r\nvolgroup vg_system --pesize=32768 pv.2\r\nlogvol / --fstype ext4 --name=root --vgname=vg_system --size=5120\r\nlogvol /var --fstype xfs --name=var --vgname=vg_system --size=16384", "root_pass"=>"[FILTERED]", "is_owned_by"=>"5-Users", "enabled"=>"1", "comment"=>"", "overwrite"=>"false"}}
2019-04-01T17:53:05 [I|app|8ccf2] Current user set to ruperto (admin)
2019-04-01T17:53:05 [I|app|8ccf2] Adding Compute instance for te-k8-olmo203.ffm.xxx.cloud
2019-04-01T17:53:08 [I|app|8ccf2] Create DHCP reservation te-k8-olmo203.ffm.xxx.cloud for te-k8-olmo203.ffm.xxx.cloud-00:xx:xx:xx:e5:4f/172.21.6.34
2019-04-01T17:53:08 [I|app|8ccf2] Add DNS A record for te-k8-olmo203.ffm.xxx.cloud/172.21.6.34
2019-04-01T17:53:08 [I|app|8ccf2] Add DNS PTR record for 172.21.6.34/te-k8-olmo203.ffm.xxx.cloud
2019-04-01T17:53:08 [I|app|8ccf2] Deploying TFTP PXELinux configuration for te-k8-olmo203.ffm.xxx.cloud
2019-04-01T17:53:08 [I|app|8ccf2] Skipping TFTP PXEGrub2 configuration for te-k8-olmo203.ffm.xxx.cloud
2019-04-01T17:53:08 [I|app|8ccf2] Skipping TFTP PXEGrub configuration for te-k8-olmo203.ffm.xxx.cloud
2019-04-01T17:53:08 [I|app|8ccf2] Skipping TFTP iPXE configuration for te-k8-olmo203.ffm.xxx.cloud
2019-04-01T17:53:08 [I|app|8ccf2] Fetching required TFTP boot files for te-k8-olmo203.ffm.xxx.cloud
2019-04-01T17:53:08 [I|app|8ccf2] Powering up Compute instance for te-k8-olmo203.ffm.xxx.cloud
2019-04-01T17:53:09 [I|app|8ccf2] Processed 11 tasks from queue 'Host::Managed Main', completed 11/11
2019-04-01T17:53:10 [I|app|8ccf2] Remove puppet certificate for te-k8-olmo203.ffm.xxx.cloud
2019-04-01T17:53:11 [I|app|8ccf2] Adding autosign entry for te-k8-olmo203.ffm.xxx.cloud
2019-04-01T17:53:11 [I|app|8ccf2] Processed 2 tasks from queue 'Host::Managed Post', completed 2/2
2019-04-01T17:53:11 [I|app|8ccf2] Redirected to https://foreman.xxx.net/hosts/te-k8-olmo203.ffm.xxx.cloud
2019-04-01T17:53:11 [I|app|8ccf2] Completed 302 Found in 6245ms (ActiveRecord: 108.5ms)

also it says it creates E1000 interfaces which is not true.

No data to display

Actions

Also available in: Atom PDF