Bug 1218293
Summary: | Entering Discovered Host - Provision edit form deletes attributes immediately | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Satellite | Reporter: | Sachin Ghai <sghai> | ||||
Component: | Discovery Plugin | Assignee: | Lukas Zapletal <lzap> | ||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Sachin Ghai <sghai> | ||||
Severity: | high | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 6.1.0 | CC: | bbuckingham, bkearney, lzap, orabin | ||||
Target Milestone: | Unspecified | Keywords: | Triaged | ||||
Target Release: | Unused | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
URL: | http://projects.theforeman.org/issues/10375 | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2015-08-12 14:02:03 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 1193977 | ||||||
Attachments: |
|
Description
Sachin Ghai
2015-05-04 14:10:23 UTC
Created attachment 1022067 [details]
two discovered hosts with mem/disk zero
Created redmine issue http://projects.theforeman.org/issues/10375 from this bug discovery_attribute_set should have been created when the hosts were discovered. I reproduced only when trying to use hosts discovered before discovery_attribute_set was added or removing the record from the DB. If you find steps to recreate a discovered hosts with no memory please send them to me. There is a workaround so I don't think it should be a blocker. You can see in the logs that the host id is 2 so refresh it's facts by: hammer discovery refresh-facts --id 2 and then try listing the discovered hosts again. If this happens with more hosts refresh their facts too. Refreshing the facts will recreate the discovery_attribute_set. REPRODUCER: 1) Discover a host 2) Host::Discovered.all.first.memory -> OK 3) Click on Provision button to get to the form (do not yet submit or anything) 4) Host::Discovered.all.first.memory 2015-05-06 09:54:38 [D] Host::Discovered Load (0.5ms) SELECT "hosts".* FROM "hosts" WHERE "hosts"."type" IN ('Host::Discovered') 2015-05-06 09:54:38 [D] DiscoveryAttributeSet Load (0.2ms) SELECT "discovery_attribute_sets".* FROM "discovery_attribute_sets" WHERE "discovery_attribute_sets"."host_id" = 80 LIMIT 1 RuntimeError: Host::Discovered#memory delegated to discovery_attribute_set.memory, but discovery_attribute_set is nil: #<Host::Discovered id: 80, name: "mac525400302472", last_compile: nil, last_freshcheck: nil, last_report: "2015-05-06 07:54:20", updated_at: "2015-05-06 07:54:20", source_file_id: nil, created_at: "2015-05-06 07:54:00", root_pass: nil, serial: nil, puppet_status: 0, architecture_id: nil, operatingsystem_id: nil, environment_id: nil, ptable_id: nil, medium_id: nil, build: false, comment: nil, disk: nil, installed_at: nil, model_id: 2, hostgroup_id: nil, owner_id: nil, owner_type: nil, enabled: true, puppet_ca_proxy_id: nil, managed: false, use_image: nil, image_file: nil, uuid: nil, compute_resource_id: nil, puppet_proxy_id: nil, certname: nil, image_id: nil, organization_id: 4, location_id: 7, type: "Host::Discovered", otp: nil, realm_id: nil, compute_profile_id: nil, provision_method: nil, grub_pass: "", discovery_rule_id: nil> from /home/lzap/work/foreman_discovery/app/models/host/discovered.rb:15:in `rescue in memory' Upstream bug assigned to lzap Verified with Sat6.1 GA snap5. Looks like the reported issue is no longer reproducible. Now If I close the discovered host form without updating or submitting. UI shows all facts correctly. Earlier all facts were being set to '0'. Since this issue is no longer reproducible. Moving this verified.. This bug is slated to be released with Satellite 6.1. This bug was fixed in version 6.1.1 of Satellite which was released on 12 August, 2015. |