Bug 1347214

Summary: 2.0: /api/v2/info displays fqdn with host shortname
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Harish NV Rao <hnallurv>
Component: CalamariAssignee: Boris Ranto <branto>
Calamari sub component: Back-end QA Contact: Vidushi Mishra <vimishra>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: unspecified CC: branto, ceph-eng-bugs, gmeno, kdreyer
Version: 2.0   
Target Milestone: rc   
Target Release: 2.3   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: RHEL: calamari-server-1.5.6-1.el7cp Ubuntu: calamari_1.5.6-2redhat1xenial Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-06-19 13:25:55 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:

Description Harish NV Rao 2016-06-16 10:09:16 UTC
Description of problem:
 /api/v2/info displays 'fqdn' with host shortname and 'hostname' with 'fqdn'. Looks like they are interchanged..


GET /api/v2/info
HTTP 200 OK
Vary: Accept
Content-Type: text/html; charset=utf-8
Allow: GET, HEAD, OPTIONS

{
    "version": "1.4.1-0 ", 
    "license": "N/A", 
    "registered": "N/A", 
    "hostname": "magna004.ceph.redhat.com", 
    "fqdn": "magna004", 
    "ipaddr": "10.8.128.4", 
    "bootstrap_url": "https://10.8.128.4:8002/bootstrap", 
    "bootstrap_rhel": "curl https://10.8.128.4:8002/bootstrap | sudo python", 
    "bootstrap_ubuntu": "wget -O - https://10.8.128.4:8002/bootstrap | sudo python"
}

[ubuntu@magna004 ~]$ sudo hostname
magna004

[ubuntu@magna004 ~]$ sudo hostname -f
magna004.ceph.redhat.com

Version-Release number of selected component (if applicable):calamari-server-1.4.1-1.el7cp.x86_64


How reproducible: always


Steps to Reproduce:
1. issue https://<mon ip>:8002/api/v2/info from browser

Actual results:
'fqdn' shows host shortname
'hostname' shows fqdn

Expected results:
show right values for fqdn and hostname

Additional info:

Comment 4 Christina Meno 2016-06-16 23:07:08 UTC
I don't believe there is impact to console as this API was broken entirely till a few days ago. This can wait to 2.1

Comment 6 Christina Meno 2017-03-31 15:55:39 UTC
Boris,

I am guessing that this is already fiex.
Would you please check and close as current release if so?

Comment 7 Ken Dreyer (Red Hat) 2017-04-25 17:46:57 UTC
Boris would you please check if this is already fixed in v1.5.5?

Comment 8 Boris Ranto 2017-04-25 18:41:17 UTC
It is just a simple bug where we mismatched fqdn/hostname in the Info class. I have tested the patch on my testing cluster and it fixed the issue for me.

Upstream PR:
https://github.com/ceph/calamari/pull/516

Comment 9 Ken Dreyer (Red Hat) 2017-04-25 22:30:31 UTC
Boris would you please tag v1.5.6 with that change and I'll build it for RHEL and Ubuntu?

Comment 15 errata-xmlrpc 2017-06-19 13:25:55 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/RHBA-2017:1497