Bug 1347023
| Summary: | refresh_facts on a renamed discovered host creating second discovered host record | ||
|---|---|---|---|
| Product: | Red Hat Satellite | Reporter: | cchase |
| Component: | Discovery Plugin | Assignee: | Lukas Zapletal <lzap> |
| Status: | CLOSED ERRATA | QA Contact: | Nikhil Kathole <nkathole> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 6.2.0 | CC: | bbuckingham, bkearney, greartes, jmatthew, nkathole, sghai, sthirugn |
| Target Milestone: | Unspecified | Keywords: | Triaged |
| Target Release: | Unused | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| URL: | http://projects.theforeman.org/issues/15368 | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2018-02-21 17:04:14 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: | 1216188, 1212602 | ||
|
Description
cchase
2016-06-15 20:05:37 UTC
TRIAGE NOTES: Blocker for FUSOR team, z-stream candidate, small change, low impact. QA NOTES: To test this, discover host when there is existing one with same name and with different name (rename it using the technique above). Host should only be updated. Upstream patch pending review. Moving to POST since upstream bug http://projects.theforeman.org/issues/15368 has been closed *** Bug 1371231 has been marked as a duplicate of this bug. *** VERIFIED Version Tested: Satellite-6.3 Snap 26 steps: 1. hammer> discovery list ---|--------------------------------------|-------------------|------|--------|------------|------------|----------------------------|-------------------- ID | NAME | MAC | CPUS | MEMORY | DISK COUNT | DISKS SIZE | SUBNET | LAST REPORT ---|--------------------------------------|-------------------|------|--------|------------|------------|----------------------------|-------------------- 16 | 1fbe13b4-9f6a-4fbf-b9ac-b3ee6be44c73 | 52:54:00:c5:f5:3e | 1 | 993 | 1 | 10240 | foreman (192.168.100.0/24) | 2017/11/28 12:37:39 15 | 52540035f97e | 52:54:00:35:f9:7e | 1 | 993 | 1 | 10240 | foreman (192.168.100.0/24) | 2017/11/28 12:26:45 ---|--------------------------------------|-------------------|------|--------|------------|------------|----------------------------|--- 2. # foreman-rake console Loading production environment (Rails 4.2.6) irb(main):001:0> ::Host::Discovered.count => 2 irb(main):002:0> dh = ::Host::Discovered.find(16) => #<Host::Discovered id: 16, name: "1fbe13b4-9f6a-4fbf-b9ac-b3ee6be44c73", last_compile: nil, last_report: "2017-11-28 12:37:39", update d_at: "2017-11-28 12:37:39", created_at: "2017-11-28 12:17:48", root_pass: nil, architecture_id: nil, operatingsystem_id: nil, environmen t_id: nil, ptable_id: nil, medium_id: nil, build: false, comment: nil, disk: nil, installed_at: nil, model_id: 2, hostgroup_id: nil, owne r_id: 1, owner_type: "User", 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: 1, location_id: 2, type: "Host::Discovered", otp: nil, realm_id: nil, compute_profile_id: nil, provision_method: nil, grub_pass: "", discovery_rule_id: nil, content_view_id: nil, lifecycl e_environment_id: nil, global_status: 0, lookup_value_matcher: nil, pxe_loader: nil, openscap_proxy_id: nil> irb(main):003:0> dh.name = 'test' => "test" irb(main):004:0> dh.save => true irb(main):005:0> dh.refresh_facts => true irb(main):006:0> ::Host::Discovered.count => 2 irb(main):007:0> dh = ::Host::Discovered.find(16) => #<Host::Discovered id: 16, name: "test", last_compile: nil, last_report: "2017-11-29 09:05:06", updated_at: "2017-11-29 09:05:06", created_at: "2017-11-28 12:17:48", root_pass: nil, 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: 1, owner_type: "User", 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: 1, location_id: 2, type: "Host::Discovered", otp: nil, realm_id: nil, compute_profile_id: nil, provision_method: nil, grub_pass: "", discovery_rule_id: nil, content_view_id: nil, lifecycle_environment_id: nil, global_status: 0, lookup_value_matcher: nil, pxe_loader: nil, openscap_proxy_id: nil> 3. hammer> discovery list ---|--------------|-------------------|------|--------|------------|------------|----------------------------|-------------------- ID | NAME | MAC | CPUS | MEMORY | DISK COUNT | DISKS SIZE | SUBNET | LAST REPORT ---|--------------|-------------------|------|--------|------------|------------|----------------------------|-------------------- 16 | test | 52:54:00:c5:f5:3e | 1 | 993 | 1 | 10240 | foreman (192.168.100.0/24) | 2017/11/29 09:05:06 15 | 52540035f97e | 52:54:00:35:f9:7e | 1 | 993 | 1 | 10240 | foreman (192.168.100.0/24) | 2017/11/28 12:26:45 ---|--------------|-------------------|------|--------|------------|------------|----------------------------|-------------------- Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2018:0336 |