theforeman / foreman_omaha

Foreman Plugin to allow CoreOS Updates via Omaha Protocol.
GNU General Public License v3.0
8 stars 8 forks source link

Host report summary does not match host versions #24

Closed mleklund closed 6 years ago

mleklund commented 6 years ago

I am not sure where to start troubleshooting this. I am now using git version 632c251 (just before move to 1.18), I was using the 1.0 gem. Individual host reports look right, host summary page is wrong.

Host reports:

https://www.evernote.com/l/APc8PBSAsVJL5p1qy0i1RBxQfm25h9aWTyE

Host summary report:

https://www.evernote.com/l/APf2oZiS6mBCO74UFijT_obDnfyN_iW0eg8

mleklund commented 6 years ago

It occurs to me that the "Omaha Hosts" report might be reporting the "Operating system" and not be reporting the operating system facts. I have set foreman to "Stop updating Operating System from facts" since I really only want 3 versions of CoreOS in my OS list (alpha, beta, stable) and want my systems to auto update. And looking at the view that seems to be the case:

<%= link_to_if_authorized(host.operatingsystem.release, hash_for_edit_operatingsystem_path(host.operatingsystem)) %>

My preference would be for this to show OS facts because I do not want the ever growing list of Operating systems in foreman.

But this is obviously not a bug.

timogoebel commented 6 years ago

Ok, I see what's going on here. I believe we have the correct data in the omaha facet and it would be easy to display the data. Something like

<%= link_to_if_authorized(host.omaha_facet.version,  hash_for_edit_operatingsystem_path(host.operatingsystem)) %>

Does that sound good to you? Do you mind giving this a spin and if it works even open a PR?

mleklund commented 6 years ago

Made exactly that change on Friday and works perfectly. Will open a PR.

PR is #25

timogoebel commented 6 years ago

Closed via 9faea1c73ec849f4cfd8c89c3885095a40d77323, thanks @mleklund.