Project

General

Profile

Bug #24940

Host Group information when provisioning a discovered host doesn't autofill

Added by Marek Hulán 3 months ago. Updated 2 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Host groups
Target version:
-
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1627709

Description of problem:
Host Group information when provisioning a discovered host doesn't autofill

Version-Release number of selected component (if applicable):
satellite-6.4.0-13.el7sat.noarch
foreman-1.18.0.18-1.el7sat.noarch
foreman-discovery-image-3.4.4-5.el7sat.noarch
tfm-rubygem-hammer_cli_foreman_discovery-1.0.0-2.el7sat.noarch
rubygem-smart_proxy_discovery-1.0.4-1.el7sat.noarch
tfm-rubygem-foreman_discovery-12.0.2-1.el7sat.noarc

How reproducible:
100%

Steps to Reproduce:
1. Create a Host Group with some values
2. Discoverer a host and click on Customize Host
3. Select a Host Group, which should auto-fill the values from the Host Group, but it's always empty.

Actual results:
Host Group details don't fill during provisioning a discovered host.

Expected results:
Values should be populated from the Host Group

Additional info:


Related issues

Related to Foreman - Refactor #24951: No local variable `host` exists.Closed

Associated revisions

Revision 38a870c4 (diff)
Added by Rahul Bajaj 3 months ago

Fixes #24940,#24951 - hostgroup does not fill for non-managed host

Revision a8749ff4 (diff)
Added by Lukas Zapletal 3 months ago

Refs #24940 - refresh hosts now loads puppet tab

History

#1 Updated by Marek Hulán 3 months ago

  • Subject changed from Host Group information when provisioning a discovered host doesn't autofill to Host Group information when provisioning a discovered host doesn't autofill

here's the log from debug after changing value in hostgroup selector

2018-09-14T11:42:34 [I|app|] Started POST "/hosts/process_hostgroup" for ::1 at 2018-09-14 11:42:34 +0200
2018-09-14T11:42:34 [I|app|7bf88] Processing by HostsController#process_hostgroup as */*
2018-09-14T11:42:34 [I|app|7bf88]   Parameters: {"utf8"=>"", "authenticity_token"=>"DDCHnB+lFIL27WbTJObgYT9H0IviSBxA45F/Hx9pas7ZwOJdyjdEzspQcw2aZ9jNxlMSaQSL2KRQUCdJV5m0Bw==", "host"=>{"name"=>"mac52e84c4b71d7", "organization_id"=>"3", "location_id"=>"2", "hostgroup_id"=>"5", "environment_id"=>"", "puppet_proxy_id"=>"", "puppet_ca_proxy_id"=>"", "managed"=>"true", "progress_report_id"=>"[FILTERED]", "type"=>"Host::Managed", "interfaces_attributes"=>{"0"=>{"_destroy"=>"0", "mac"=>"", "identifier"=>"", "name"=>"mac52e84c4b71d7", "domain_id"=>"", "subnet_id"=>"", "ip"=>"", "ip6"=>"", "managed"=>"1", "primary"=>"1", "provision"=>"1", "tag"=>"", "attached_to"=>"", "id"=>"3363"}}, "architecture_id"=>"", "operatingsystem_id"=>"", "build"=>"1", "medium_id"=>"", "ptable_id"=>"", "disk"=>"", "is_owned_by"=>"3-Users", "enabled"=>"1", "model_id"=>"", "comment"=>"", "overwrite"=>"false", "id"=>"2357"}, "fakepassword"=>"[FILTERED]"}
2018-09-14T11:42:34 [D|sql|7bf88]   User Load (0.4ms)  SELECT  "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2  [["id", 3], ["LIMIT", 1]]
2018-09-14T11:42:34 [D|sql|7bf88]   AuthSource Load (0.4ms)  SELECT  "auth_sources".* FROM "auth_sources" WHERE "auth_sources"."id" = $1 LIMIT $2  [["id", 1], ["LIMIT", 1]]
2018-09-14T11:42:34 [I|app|7bf88] Current user set to admin (admin)
2018-09-14T11:42:34 [D|app|7bf88] Current location set to none
2018-09-14T11:42:34 [D|app|7bf88] Current organization set to none
2018-09-14T11:42:34 [D|sql|7bf88]    (0.2ms)  SELECT  "taxonomies"."id" FROM "taxonomies" WHERE "taxonomies"."type" IN ('Location') LIMIT $1  [["LIMIT", 1]]
2018-09-14T11:42:34 [D|sql|7bf88]    (0.2ms)  SELECT  "taxonomies"."id" FROM "taxonomies" WHERE "taxonomies"."type" IN ('Organization') LIMIT $1  [["LIMIT", 1]]
2018-09-14T11:42:34 [D|sql|7bf88]   Organization Load (0.3ms)  SELECT  "taxonomies".* FROM "taxonomies" WHERE "taxonomies"."type" IN ('Organization') AND "taxonomies"."id" = $1 ORDER BY "taxonomies"."title" ASC LIMIT $2  [["id", 3], ["LIMIT", 1]]
2018-09-14T11:42:34 [D|sql|7bf88]   Location Load (0.2ms)  SELECT  "taxonomies".* FROM "taxonomies" WHERE "taxonomies"."type" IN ('Location') AND "taxonomies"."id" = $1 ORDER BY "taxonomies"."title" ASC LIMIT $2  [["id", 2], ["LIMIT", 1]]
2018-09-14T11:42:34 [D|sql|7bf88]   Hostgroup Load (0.3ms)  SELECT  "hostgroups".* FROM "hostgroups" WHERE "hostgroups"."id" = $1 ORDER BY hostgroups.title LIMIT $2  [["id", 5], ["LIMIT", 1]]
2018-09-14T11:42:34 [D|sql|7bf88]   Host::Base Load (0.3ms)  SELECT  "hosts".* FROM "hosts" WHERE "hosts"."id" IS NULL LIMIT $1  [["LIMIT", 1]]
2018-09-14T11:42:34 [D|sql|7bf88]   Hostgroup Load (0.3ms)  SELECT  "hostgroups".* FROM "hostgroups" WHERE "hostgroups"."title" = $1 ORDER BY hostgroups.title LIMIT $2  [["title", "5"], ["LIMIT", 1]]
2018-09-14T11:42:34 [D|sql|7bf88]   CACHE Hostgroup Load (0.0ms)  SELECT  "hostgroups".* FROM "hostgroups" WHERE "hostgroups"."id" = $1 ORDER BY hostgroups.title LIMIT $2  [["id", 5], ["LIMIT", 1]]
2018-09-14T11:42:34 [D|sql|7bf88]   Hostgroup Load (0.4ms)  SELECT "hostgroups".* FROM "hostgroups" WHERE "hostgroups"."id" IN (1) AND (compute_profile_id is not NULL) ORDER BY coalesce("hostgroups"."ancestry", '')
2018-09-14T11:42:34 [D|sql|7bf88]   Hostgroup Load (0.3ms)  SELECT "hostgroups".* FROM "hostgroups" WHERE "hostgroups"."id" IN (1) AND (realm_id is not NULL) ORDER BY coalesce("hostgroups"."ancestry", '')
2018-09-14T11:42:34 [D|sql|7bf88]   Hostgroup Load (0.4ms)  SELECT "hostgroups".* FROM "hostgroups" WHERE "hostgroups"."id" IN (1) AND (compute_resource_id is not NULL) ORDER BY coalesce("hostgroups"."ancestry", '')
2018-09-14T11:42:34 [D|sql|7bf88]   User Load (0.4ms)  SELECT  "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY firstname LIMIT $2  [["id", 3], ["LIMIT", 1]]
2018-09-14T11:42:34 [D|app|7bf88] not found: Couldn't find Nic::Base with ID=3363 for Host::Managed with ID=
2018-09-14T11:42:34 [I|app|7bf88]   Rendering common/404.html.erb within layouts/application
2018-09-14T11:42:34 [I|app|7bf88]   Rendered common/404.html.erb within layouts/application (0.7ms)
2018-09-14T11:42:34 [I|app|7bf88]   Rendered layouts/_application_content.html.erb (0.5ms)
2018-09-14T11:42:34 [I|app|7bf88]   Rendering layouts/base.html.erb
2018-09-14T11:42:35 [I|app|7bf88]   Rendered layouts/base.html.erb (131.1ms)
2018-09-14T11:42:35 [I|app|7bf88] Completed 404 Not Found in 159ms (Views: 134.6ms | ActiveRecord: 3.9ms)

#2 Updated by Rahul Bajaj 3 months ago

  • Assignee changed from Lukas Zapletal to Rahul Bajaj

#3 Updated by Rahul Bajaj 3 months ago

  • Project changed from Discovery to Foreman

#4 Updated by The Foreman Bot 3 months ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/6072 added

#5 Updated by Lukas Zapletal 3 months ago

#6 Updated by Lukas Zapletal 3 months ago

  • Fixed in Releases 1.20.0 added

#7 Updated by Rahul Bajaj 3 months ago

  • Status changed from Ready For Testing to Closed

#8 Updated by The Foreman Bot 3 months ago

  • Pull request https://github.com/theforeman/foreman/pull/6088 added

#9 Updated by Tomer Brisker 2 months ago

  • Category set to Host groups

Also available in: Atom PDF