Bug 1114645 - Setting host build flag via API doesn't clear facts and reports
Summary: Setting host build flag via API doesn't clear facts and reports
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Provisioning
Version: 6.0.4
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: Unspecified
Assignee: Dominic Cleal
QA Contact: Kedar Bidarkar
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-06-30 14:25 UTC by Bryan Kearney
Modified: 2019-09-26 14:33 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-09-11 12:27:24 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 6177 0 None None None 2016-04-22 16:49:16 UTC

Description Bryan Kearney 2014-06-30 14:25:56 UTC
When setting the build attribute on a host to true from the API (or CLI) doesn't clear facts and reports from the hosts.  This differs from the UI as it calls Host::Managed#setBuild, while the API is just setting the attribute.

The clear facts/reports might be best moved to the model when the attribute is changed, and the setBuild action on HostsController could just update the attribute.

Comment 1 Bryan Kearney 2014-06-30 14:25:58 UTC
Created from redmine issue http://projects.theforeman.org/issues/6177

Comment 2 Bryan Kearney 2014-06-30 14:26:02 UTC
Upstream bug assigned to dcleal

Comment 4 Bryan Kearney 2014-06-30 14:37:36 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/6177 has been closed

Comment 6 Bryan Kearney 2014-07-14 20:03:57 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/6177 has been closed
-------------
Dominic Cleal
https://github.com/theforeman/foreman/pull/1511
-------------
Dominic Cleal
Applied in changeset commit:aa19255e85c1121ae1896466089d286243b814d7.

Comment 7 Jason Montleon 2014-07-15 14:21:14 UTC
git cherry-pick --continue 
[SATELLITE-6.0.4 b78a884] fixes #6177 - clear host facts/reports when build=true set over API
 Author: Dominic Cleal <dcleal>
 5 files changed, 74 insertions(+), 3 deletions(-)
 create mode 100644 test/factories/facts_related.rb
 create mode 100644 test/factories/reports_related.rb

Comment 9 Tomas Strachota 2014-09-01 11:14:05 UTC
DEVELOPER VERIFIED:
`hammer host update --id 5 --build true` clears the facts and reports.

Comment 11 Kedar Bidarkar 2014-09-01 18:01:30 UTC
Tested with Sat6-GA-snap7

`hammer host update --id <host-id> --build true`  clears the facts and reports.

Once triggered the facts and reports are no longer seen via the UI.


Installed Packages

    candlepin-0.9.23-1.el6_5.noarch
    candlepin-common-1.0.1-1.el6_5.noarch
    candlepin-scl-1-5.el6_4.noarch
    candlepin-scl-quartz-2.1.5-5.el6_4.noarch
    candlepin-scl-rhino-1.7R3-1.el6_4.noarch
    candlepin-scl-runtime-1-5.el6_4.noarch
    candlepin-selinux-0.9.23-1.el6_5.noarch
    candlepin-tomcat6-0.9.23-1.el6_5.noarch
    createrepo-0.9.9-21.2.pulp.el6sat.noarch
    elasticsearch-0.90.10-6.el6sat.noarch
    katello-1.5.0-30.el6sat.noarch
    katello-certs-tools-1.5.6-1.el6sat.noarch
    katello-default-ca-1.0-1.noarch
    katello-installer-0.0.64-1.el6sat.noarch
    katello-server-ca-1.0-1.noarch
    mod_wsgi-3.4-1.pulp.el6sat.x86_64
    pulp-katello-0.3-4.el6sat.noarch
    pulp-nodes-common-2.4.1-0.5.rc1.el6sat.noarch
    pulp-nodes-parent-2.4.1-0.5.rc1.el6sat.noarch
    pulp-puppet-plugins-2.4.1-0.5.rc1.el6sat.noarch
    pulp-puppet-tools-2.4.1-0.5.rc1.el6sat.noarch
    pulp-rpm-plugins-2.4.1-0.6.beta.el6sat.noarch
    pulp-selinux-2.4.1-0.5.rc1.el6sat.noarch
    pulp-server-2.4.1-0.5.rc1.el6sat.noarch
    python-gofer-qpid-1.3.0-1.el6sat.noarch
    python-isodate-0.5.0-1.pulp.el6sat.noarch
    python-kombu-3.0.15-12.pulp.el6sat.noarch
    python-pulp-bindings-2.4.1-0.5.rc1.el6sat.noarch
    python-pulp-common-2.4.1-0.5.rc1.el6sat.noarch
    python-pulp-puppet-common-2.4.1-0.5.rc1.el6sat.noarch
    python-pulp-rpm-common-2.4.1-0.6.beta.el6sat.noarch
    python-qpid-0.22-14.el6sat.noarch
    python-qpid-qmf-0.22-37.el6.x86_64
    qpid-cpp-client-0.22-42.el6.x86_64
    qpid-cpp-server-0.22-42.el6.x86_64
    qpid-cpp-server-linearstore-0.22-42.el6.x86_64
    qpid-java-client-0.22-6.el6.noarch
    qpid-java-common-0.22-6.el6.noarch
    qpid-proton-c-0.7-1.el6.x86_64
    qpid-qmf-0.22-37.el6.x86_64
    qpid-tools-0.22-12.el6.noarch
    ruby193-rubygem-katello-1.5.0-86.el6sat.noarch
    rubygem-hammer_cli_katello-0.0.4-14.el6sat.noarch
    rubygem-smart_proxy_pulp-1.0.1-1.1.el6sat.noarch

Comment 12 Bryan Kearney 2014-09-11 12:27:24 UTC
This was delivered with Satellite 6.0 which was released on 10 September 2014.


Note You need to log in before you can comment on or make changes to this bug.