Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1412874 - satellite modify character "_" to "-" if hostname with this special character
Summary: satellite modify character "_" to "-" if hostname with this special character
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Hosts - Content
Version: 6.2.6
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-13 03:00 UTC by Liushihui
Modified: 2017-02-07 07:18 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-01-26 15:45:43 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Liushihui 2017-01-13 03:00:28 UTC
Description of problem:
When virt-who send host's hostname with "_" to satellite, such as "test_name", satellite will modify it to "-"("test-name")

Version-Release number of selected component (if applicable):
Satellie6.2.7
katello-3.0.0-15.el6sat.noarch
candlepin-0.9.54.15-1.el6.noarch
foreman-1.11.0.64-4.el6sat.noarch
virt-who-0.17-10.el6sat.noarch

How reproducible:
Always

Steps to Reproduce:
1. Configure virt-who run at rhevm mode and a host's name with underline which is "test_name"

2. Restart virt-who service and check virt-who's log, virt-who send "test_name" to satellite.
2017-01-12 21:28:47,967 [virtwho.main DEBUG] MainProcess(16679):MainThread @subscriptionmanager.py:hypervisorCheckIn:195 - Host-to-guest mapping: {
    "test_name": []
}

3. Open satellite webUI, go to Hosts-->Content hosts, check the registered hypervisor.


Actual results:
It will show "test-name" other than "test_name", it has update underline to midline. please see screenshot name_on_satellite.jpeg.

Expected results:
It shouldn't update underline to Midline, it should show original
hostname.

Additional info:

Comment 1 Tomas Strachota 2017-01-13 09:34:30 UTC
Is it a valid real world Virt Who configuration or was the test performed with some dummy data?

Underscores are not allowed in hostnames by specification and I believe that's why satellite replaces them with hyphens. So I would say renaming itself is not a bug. I'm not sure what are the consequences of keeping the host with changed hostname in satellite though.

Comment 2 Liushihui 2017-01-18 06:11:33 UTC
I agree it is not a bug if Underscores are not allowed in hostname by specification. However, I still suggest to add the hostname's auto renaming("_" to "-") in specification since windows system still can use underline in hostname. Thanks.

(In reply to Tomas Strachota from comment #1)
> Is it a valid real world Virt Who configuration or was the test performed
> with some dummy data?
> 
> Underscores are not allowed in hostnames by specification and I believe
> that's why satellite replaces them with hyphens. So I would say renaming
> itself is not a bug. I'm not sure what are the consequences of keeping the
> host with changed hostname in satellite though.

Comment 3 Daniel Lobato Garcia 2017-01-26 15:45:43 UTC
Sorry, it's still kind of unclear to me how to move on. 

* I moved this to Host - Content as it's an issue with Content Hosts, however, Content Hosts will never be Windows hosts in Satellite as far as I know. 

* The replacement of _ to - seems proper to me because it's what the hostname specification says. 

Liushihui, how do you want us to move forward? If this is not a bug, it should be closed as one. If there's something else here that might be wrong, I would ask you to explain what is it and edit the bugzilla.

I will close this for the moment, but feel free to reopen if you feel there is a bug in here we have not caught and describe which steps we have to do. Leaving the '_' in the hostname would be a bug, so that's not an option we should do.

Comment 4 Liushihui 2017-02-07 02:09:54 UTC
I agree it's not a bug if hostname specification says hostname can't allow with "_". but I would like to suggest add description in specification about "hostname with "_" will auto update to "-" in satellite.". is that acceptable?

Comment 5 Tomas Strachota 2017-02-07 07:18:55 UTC
So it sounds to me as a documentation issue. In such case I vote for opening a new bug in the docs component.


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