Bug 1414618

Summary: Hypervisor host can't register to satellite web UI when hypervisor hostname using special character
Product: Red Hat Satellite Reporter: yanpliu <yanpliu>
Component: Subscriptions - virt-whoAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED NOTABUG QA Contact: Tom McKay <tomckay>
Severity: high Docs Contact: Tom McKay <tomckay>
Priority: unspecified    
Version: 6.2.7CC: bbuckingham, fgarciad, hsun, ktordeur, shihliu, tomckay, yuefliu
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-06-01 13:32:23 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:

Description yanpliu 2017-01-19 03:08:19 UTC
Description of problem:
Hypervisor host can't register to satellite WEB UI when using special character. but virt-who can send json information successfully.

Version-Release number of selected component (if applicable):
Hypervisor: libvirt

How reproducible:

Steps to Reproduce:

1. Register virt-who to satellite6.2.7 
2. Register Hypervisor guest to satellite6.2.7 on Organization:Default_Organization
3. change Hypervisor short hostname using special characters ,such as "hp-z220-06a!#$%^&*"
# hostname
# hostname -s
4. vim /etc/virt-who.d/libvirt.conf
5. restart virt-who service
# service virt-who restart
Stopping virt-who: [  OK  ]
Starting virt-who: [  OK  ]

6. hypervisor host and guest json info sent successfully, and the json info should be print with hypervisor's hostname with special characters.

MainProcess(10816):MainThread @subscriptionmanager.py:hypervisorCheckIn:194 - Sending update in hosts-to-guests mapping for config "test-libvirt": 1 hypervisors and 2 guests found
2017-01-18 21:41:52,011 [virtwho.main DEBUG] MainProcess(10816):MainThread @subscriptionmanager.py:hypervisorCheckIn:195 - Host-to-guest mapping: {
    "hp-z220-06a!#$%^&*": [
            "guestId": "1f994abe-2df4-9cbd-9b60-d7a07a8d6f67", 
            "state": 5, 
            "attributes": {
                "active": 0, 
                "virtWhoType": "libvirt"
            "guestId": "65681fef-4d66-a804-9825-66a4a22b053d", 
            "state": 5, 
            "attributes": {
                "active": 0, 
                "virtWhoType": "libvirt"
2017-01-18 21:41:55,968 [virtwho.main DEBUG] MainProcess(10816):MainThread @executor.py:send_report:101 - Report for config "test-libvirt" sent
2017-01-18 21:42:48,045 [virtwho.test-libvirt DEBUG] Libvirtd-1(10820):MainThread @libvirtd.py:_listDomains:245 - Libvirt domains found: 1f994abe-2df4-9cbd-9b60-d7a07a8d6f67, 65681fef-4d66-a804-9825-66a4a22b053d
7. check Default_Organization->Hosts->Content Hosts
Hypervisor host can not register to satellite in web ui.

Actual results:
Hypervisor host can not register to satellite in web ui.

Expected results:
Hypervisor host should be registered to satellite in web ui.

Additional info:

Comment 4 yanpliu 2017-03-28 08:36:38 UTC
Yes, it is a real hostname.

Comment 5 Brad Buckingham 2017-06-01 13:32:23 UTC
Based on discussion in triage involving PM, ENG, QE and CEE, this is not a bug, since hostnames within Satellite must be RFC compliant.  If you have any concerns about this, please feel free to contact Rich Jerrido. Thank you.