Bug 1227418 - Foreman - Can not assign a host to a hostgroup without locations
Summary: Foreman - Can not assign a host to a hostgroup without locations
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Provisioning
Version: 5.4.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: GA
: 5.4.1
Assignee: Brandon Dunne
QA Contact: Jan Krocil
URL:
Whiteboard:
Depends On:
Blocks: 1234497
TreeView+ depends on / blocked
 
Reported: 2015-06-02 15:45 UTC by Keenan Brock
Modified: 2015-07-30 13:10 UTC (History)
6 users (show)

Fixed In Version: 5.4.1.0
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1234497 (view as bug list)
Environment:
Last Closed: 2015-07-30 13:10:58 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:1511 0 normal SHIPPED_LIVE CFME 5.4.1 bug fixes, and enhancement update 2015-07-30 17:10:05 UTC

Description Keenan Brock 2015-06-02 15:45:59 UTC
Description of problem:
Typically, a server has locations enabled or disabled.
But in some cases, locations is enabled but not assigned to a host or hostgroup.

A host needs to have a location.
But a hostgroup can have an empty list of locations.

In formean, you can assign this hostgroup to a host.
In cfme, you can not assign this hostgroup to a host.

Version-Release number of selected component (if applicable):
5.4, and satellite or foreman

How reproducible:
always

Steps to Reproduce:
1. have foreman with locations
2. have host with location
3. have hostgroup with no locations

Actual results:
provision host
hostgroup is not there

Expected results:
hostgroup is in list to assign

Additional info:

Comment 2 Keenan Brock 2015-06-04 18:27:09 UTC
If you have a hostgroup with a host, but the location is removed.
It still shows up in the ui.
So the user doesn't know that the hostgroup doesn't have a location.

If we point the user to "fix" the problem, they don't understand because it looks good.
If they were to remove the host associated with the hostgroup, the hostgroup would indeed show that there is no location set. But only after the hostgroup has all hosts removed.

Thanks @JKrocil for tracking this down

Created a BZ over in sat6 to note this behavior.

https://bugzilla.redhat.com/show_bug.cgi?id=1228365

Comment 3 CFME Bot 2015-06-17 05:26:11 UTC
New commit detected on manageiq/master:
https://github.com/ManageIQ/manageiq/commit/2871a6b73b5354ad9ba54be419fa80b85bc5caed

commit 2871a6b73b5354ad9ba54be419fa80b85bc5caed
Author:     Brandon Dunne <bdunne>
AuthorDate: Mon Jun 8 14:30:00 2015 -0400
Commit:     Brandon Dunne <bdunne>
CommitDate: Wed Jun 10 12:37:05 2015 -0400

    Update specs to handle testing nil locations and organizations on ConfigurationProfiles
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1227418

 .../configured_system_foreman/placement_spec.rb    | 38 +++++++++++++++++-----
 1 file changed, 30 insertions(+), 8 deletions(-)

Comment 4 CFME Bot 2015-06-17 05:26:15 UTC
New commit detected on manageiq/master:
https://github.com/ManageIQ/manageiq/commit/53c95e9e3386359ad56b5df8a95c090fc82a9909

commit 53c95e9e3386359ad56b5df8a95c090fc82a9909
Author:     Brandon Dunne <bdunne>
AuthorDate: Mon Jun 8 15:51:51 2015 -0400
Commit:     Brandon Dunne <bdunne>
CommitDate: Wed Jun 10 12:37:05 2015 -0400

    Partially Revert "Change from Preload to Active Record to increase readability"
    
    This partially reverts commit 46bbcdb9d04390c099dca926c01829aa4a88e6c9.
    https://bugzilla.redhat.com/show_bug.cgi?id=1227418

 vmdb/app/models/configured_system_foreman/placement.rb | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)

Comment 5 CFME Bot 2015-06-17 05:26:18 UTC
New commit detected on manageiq/master:
https://github.com/ManageIQ/manageiq/commit/a8fa17329c8f543977966df15e3c0c734c80641d

commit a8fa17329c8f543977966df15e3c0c734c80641d
Author:     Brandon Dunne <bdunne>
AuthorDate: Mon Jun 8 17:04:55 2015 -0400
Commit:     Brandon Dunne <bdunne>
CommitDate: Wed Jun 10 12:37:05 2015 -0400

    Include ConfigurationProfiles that don't have a location or organization
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1227418

 vmdb/app/models/configured_system_foreman/placement.rb | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comment 6 CFME Bot 2015-06-22 15:29:55 UTC
New commit detected on cfme/5.4.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=5cd81afe54d29d929732845d022e202a9f5f20d1

commit 5cd81afe54d29d929732845d022e202a9f5f20d1
Author:     Brandon Dunne <bdunne>
AuthorDate: Mon Jun 8 14:30:00 2015 -0400
Commit:     Brandon Dunne <bdunne>
CommitDate: Wed Jun 17 09:40:05 2015 -0400

    Update specs to handle testing nil locations and organizations on ConfigurationProfiles
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1227418

 .../configured_system_foreman/placement_spec.rb    | 38 +++++++++++++++++-----
 1 file changed, 30 insertions(+), 8 deletions(-)

Comment 7 CFME Bot 2015-06-22 15:29:59 UTC
New commit detected on cfme/5.4.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=42e001e6c479032febf0007668db63f9de9a91ec

commit 42e001e6c479032febf0007668db63f9de9a91ec
Author:     Brandon Dunne <bdunne>
AuthorDate: Mon Jun 8 15:51:51 2015 -0400
Commit:     Brandon Dunne <bdunne>
CommitDate: Wed Jun 17 09:40:17 2015 -0400

    Partially Revert "Change from Preload to Active Record to increase readability"
    
    This partially reverts commit 46bbcdb9d04390c099dca926c01829aa4a88e6c9.
    https://bugzilla.redhat.com/show_bug.cgi?id=1227418

 vmdb/app/models/configured_system_foreman/placement.rb | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)

Comment 8 CFME Bot 2015-06-22 15:30:03 UTC
New commit detected on cfme/5.4.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=d32d71a8c7ea219faefe5715d76dc73d6298c875

commit d32d71a8c7ea219faefe5715d76dc73d6298c875
Author:     Brandon Dunne <bdunne>
AuthorDate: Mon Jun 8 17:04:55 2015 -0400
Commit:     Brandon Dunne <bdunne>
CommitDate: Wed Jun 17 09:40:31 2015 -0400

    Include ConfigurationProfiles that don't have a location or organization
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1227418

 vmdb/app/models/configured_system_foreman/placement.rb | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comment 10 Jan Krocil 2015-07-21 15:46:33 UTC
Verified fixed in 5.4.1.0 - 5.4.1.0.20150717083323_6ed7e1c.

During provisioning, hostgroup with no location is now available in the hostgroups selectbox as well.

Comment 12 errata-xmlrpc 2015-07-30 13:10:58 UTC
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://rhn.redhat.com/errata/RHBA-2015-1511.html


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