Bug 1566825 - Content View is not updated on Content Host when change is made via Hosts / All Hosts <Edit option>
Summary: Content View is not updated on Content Host when change is made via Hosts / A...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Hosts - Content
Version: 6.3.0
Hardware: All
OS: All
unspecified
high
Target Milestone: 6.4.0
Assignee: Andrew Kofink
QA Contact: Peter Ondrejka
URL:
Whiteboard:
: 1584226 1601466 1634762 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-04-13 05:06 UTC by Waldirio M Pinheiro
Modified: 2019-11-05 23:15 UTC (History)
16 users (show)

Fixed In Version: tfm-rubygem-foreman-tasks-0.13.3
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1624020 (view as bug list)
Environment:
Last Closed: 2018-10-16 19:14:47 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 23837 0 High Closed Content View is not updated on Content Host when change is made via Hosts / All Hosts <Edit option> 2020-06-15 18:19:38 UTC

Description Waldirio M Pinheiro 2018-04-13 05:06:10 UTC
Description of problem:
Customer normally update the CV via Hosts - All Hosts - Edit on the Content Host row - <Select the cv> - Submit. After this change the new info still on this page and if we check on Hosts - Content Hosts - <Content Host details page> - CV we can confirm the information was updated BUT on the Content Host indeed the value still the same, after execute subscription-manager identity we can see the value still unchangeable, executing the command subscription-manager refresh didn't do difference, still the same.

Attention point is, this works as explanation above until Satellite 6.2.14, on Satellite 6.3.x this doesn't work anymore. 

Version-Release number of selected component (if applicable):
6.3.x

How reproducible:
100%

Steps to Reproduce:
1. According explanation above and I'll do a complete description on the sequence
2.
3.

Actual results:
On the Content Host still the same Environment name, then as consequence customer change the CV but this is not reflected on the Content Host indeed.

Expected results:
See the CV name on the "Environment name" when executing subscription-manager identity and as consequence see the new content from repo/cv.

Additional info:

Comment 1 Waldirio M Pinheiro 2018-04-13 05:44:09 UTC
Hello all

Let's do the Same procedures on Satellite 6.2.14 and Satellite 6.3.0

The workflow will be
	- Content Host on Library
		# subscription-manager identity
	- Hosts - All Hosts - Edit - Define a new CV - Submit
		# subscription-manager identity
	- Hosts - Content Hosts - Select the Content Host - Define a new CV - Save
		# subscription-manager identity

After steps above, we will see the "Environment name" will be updated when we do the test on Satellite 6.2.14 BUT will not work on Satellite 6.3.x and the worst point is, no warning, no issues, just didn't work.

Note: If we change on *Hosts - All hosts* the information will be replicated on *Hosts - Content Hosts* and vice-versa, a new CV defined in one page will be displayed when checking the information on another one page.

## Satellite 6.2.14

// Content Host
---
[root@dhcp-10-12-211-151 ~]# subscription-manager identity
system identity: 777e6cc9-1c4b-40d1-b9c7-d375022ca9ad
name: dhcp-10-12-211-151.hq.gsslab.rdu.redhat.com
org name: ACME
org ID: ACME
environment name: Library
[root@dhcp-10-12-211-151 ~]# 
---

// On Satellite, changing via Hosts - All hosts to the CV cv_rhel73
---
[root@dhcp-10-12-211-151 ~]# subscription-manager identity
system identity: 777e6cc9-1c4b-40d1-b9c7-d375022ca9ad
name: dhcp-10-12-211-151.hq.gsslab.rdu.redhat.com
org name: ACME
org ID: ACME
environment name: Library/cv_rhel73
[root@dhcp-10-12-211-151 ~]# 
---

// On Satellite, changing via Hosts - Content Hosts to the CV cv_rhel73_10_2017
---
[root@dhcp-10-12-211-151 ~]# subscription-manager identity
system identity: 777e6cc9-1c4b-40d1-b9c7-d375022ca9ad
name: dhcp-10-12-211-151.hq.gsslab.rdu.redhat.com
org name: ACME
org ID: ACME
environment name: Library/cv_rhel73_10_2017
[root@dhcp-10-12-211-151 ~]# 
---

Ps.: No necessary execute subscription-manager refresh, just rerun the command and we are able to see the new value.



## Satellite 6.3.0

// Content Host
---
[root@dhcp-10-12-211-71 ~]# subscription-manager identity
system identity: 83c724bd-9bf4-45ea-b1b9-369613c369c9
name: 83c724bd-9bf4-45ea-b1b9-369613c369c9, dhcp-10-12-211-71.hq.gsslab.rdu.redhat.com
org name: ACME
org ID: ACME
environment name: Library
[root@dhcp-10-12-211-71 ~]# 
---

// On Satellite, changing via Hosts - All hosts to the CV cv_rhel7
---
[root@dhcp-10-12-211-71 ~]# subscription-manager identity
system identity: 83c724bd-9bf4-45ea-b1b9-369613c369c9
name: 83c724bd-9bf4-45ea-b1b9-369613c369c9, dhcp-10-12-211-71.hq.gsslab.rdu.redhat.com
org name: ACME
org ID: ACME
environment name: Library
[root@dhcp-10-12-211-71 ~]# 
---

Note: Change was made via webUI but on the Content Host the information still the same even after subscription-manager refresh.


// On Satellite, changing via Hosts - Content Hosts to the CV cv_rhel7_xx
---
[root@dhcp-10-12-211-71 ~]# subscription-manager identity
system identity: 83c724bd-9bf4-45ea-b1b9-369613c369c9
name: 83c724bd-9bf4-45ea-b1b9-369613c369c9, dhcp-10-12-211-71.hq.gsslab.rdu.redhat.com
org name: ACME
org ID: ACME
environment name: Library/cv_rhel7_xx
[root@dhcp-10-12-211-71 ~]# 
---

Note: On this case worked as expected.



Ps.: On both scenarios the Content Host was as *Unmanaged Host*


Best Regards
-- 
Waldirio M Pinheiro | Senior Software Maintenance Engineer

Comment 4 Andrew Kofink 2018-06-05 19:30:10 UTC
A workaround is to manually trigger the Host::Update action after editing the host in the Satellite:

In the `foreman-rake console`:

```
ForemanTasks.async_task(Actions::Katello::Host::Update, Host.find(2))
```

Be sure to change the command to use the proper host ID.

Comment 5 Andrew Kofink 2018-06-06 12:51:37 UTC
Created redmine issue http://projects.theforeman.org/issues/23837 from this bug

Comment 6 Brad Buckingham 2018-06-14 20:25:43 UTC
*** Bug 1584226 has been marked as a duplicate of this bug. ***

Comment 25 Ivan Necas 2018-07-16 13:04:57 UTC
*** Bug 1601466 has been marked as a duplicate of this bug. ***

Comment 27 Peter Ondrejka 2018-07-23 10:38:00 UTC
Checked again on 6.4 snap 13, content hosts got correctly updated after changing the CV for host in the ui, this applies to editing via hosts and content hosts page.

Comment 36 Brad Buckingham 2018-10-09 16:18:26 UTC
*** Bug 1634762 has been marked as a duplicate of this bug. ***

Comment 37 Bryan Kearney 2018-10-16 19:14:47 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://access.redhat.com/errata/RHSA-2018:2927


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