Bug 1786282

Summary: Unable to test network configuration for hostname if underscore("_") available in hostname
Product: Red Hat CloudForms Management Engine Reporter: Devidas Gaikwad <dgaikwad>
Component: ApplianceAssignee: drew uhlmann <duhlmann>
Status: CLOSED CURRENTRELEASE QA Contact: Devidas Gaikwad <dgaikwad>
Severity: medium Docs Contact: Red Hat CloudForms Documentation <cloudforms-docs>
Priority: high    
Version: 5.11.1CC: abellott, dmetzger, duhlmann, obarenbo, yrudman
Target Milestone: GAKeywords: Reopened, TestOnly, ZStream
Target Release: 5.12.0Flags: mfeifer: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1805800 (view as bug list) Environment:
Last Closed: 2020-10-26 16:25:56 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: Bug
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: CFME Core Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1805800    
Attachments:
Description Flags
hostname with undercore("_")
none
console where I got error none

Description Devidas Gaikwad 2019-12-24 07:55:31 UTC
Created attachment 1647462 [details]
hostname with undercore("_")

Description of problem:
when we test network configuration for hostname it does not work only if underscore available in the hostname 


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

How reproducible: 100%


Steps to Reproduce:
1. Set hostname with an underscore("_").
2. Test Network Configuration for hostname, Perform the following commands:
  - ap
  - space
  - option 1 - Configure Network
  - option 4 - Test Network Configuration
  - Enter hostname which we set on step 1

Actual results:
Getting "Please provide a valid Hostname or IP Address." message when entering the correct hostname

Expected results:

We should get a "success" message while entering the correct hostname. 


Additional info:
Also facing this issue on 5.10.13.1 version

Comment 2 Devidas Gaikwad 2019-12-24 07:56:47 UTC
Created attachment 1647463 [details]
console where I got error

Comment 3 drew uhlmann 2019-12-24 14:24:09 UTC
Per Yuri, 
"as described in https://tools.ietf.org/html/rfc952: underscore ("_") is not permitted character for host name"

Closing because this isn't a bug.

Comment 4 Devidas Gaikwad 2019-12-24 14:41:59 UTC
Hi drew,
As you are saying we are not permitting hostname with an underscore then we should disallow underscore while setting hostname but we are not. I think there is an issue while setting the hostname with an underscore.
Please have a look in attachment



Thanks,
Devidas Gaikwad

Comment 5 drew uhlmann 2019-12-24 14:46:43 UTC
I'd like to see a reproducer, please, since my regex doesn't match underscores.

Comment 7 Devidas Gaikwad 2019-12-24 14:53:47 UTC
drew, Do we need to re-open this issue?

Comment 8 drew uhlmann 2019-12-26 01:55:42 UTC
No. This isn't an issue. I can't set a hostname with an underscore and from your description, you can't either.

Comment 9 Devidas Gaikwad 2019-12-26 07:03:25 UTC
drew, as per my comment I already re-produced this issue with hostname "_test1", re-opening this issue.

Comment 10 drew uhlmann 2019-12-26 14:22:36 UTC
Yeah, like I said, I can't reproduce this and I'm on the stated version. Please either give me a reproducer or close this.

Comment 12 drew uhlmann 2019-12-27 15:57:37 UTC
Thanks!

Yuri, I know it's break, I hope you don't look at this till you get back cause it's low prio but setting the hostname from the options chosen in comment 11 isn't running the regex for validation, should it be?

Comment 13 Yuri Rudman 2019-12-28 15:24:19 UTC
Hi Drew, yes, I think it should run validation. Looks like bug...

Comment 15 CFME Bot 2020-01-16 15:07:20 UTC
New commit detected on ManageIQ/manageiq-appliance_console/master:

https://github.com/ManageIQ/manageiq-appliance_console/commit/862ad568abca05cca814ae3595d624c46e9aae9a
commit 862ad568abca05cca814ae3595d624c46e9aae9a
Author:     d-m-u <duhlmann>
AuthorDate: Sat Dec 28 11:14:41 2019 -0500
Commit:     d-m-u <duhlmann>
CommitDate: Sat Dec 28 11:14:41 2019 -0500

    Use the regex to validate hostnames when we set them

    Highline's third arg for this method is the validation

    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1786282

 bin/appliance_console | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comment 16 CFME Bot 2020-01-16 15:15:48 UTC
New commit detected on ManageIQ/manageiq-appliance/master:

https://github.com/ManageIQ/manageiq-appliance/commit/8c0dcef26d65468bb3ef3730121f1df83a8867ab
commit 8c0dcef26d65468bb3ef3730121f1df83a8867ab
Author:     Nick Carboni <ncarboni>
AuthorDate: Thu Jan 16 10:10:59 2020 -0500
Commit:     Nick Carboni <ncarboni>
CommitDate: Thu Jan 16 10:10:59 2020 -0500

    Update manageiq-appliance_console to version 5.3.1

    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1786282
    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1785257

 manageiq-appliance-dependencies.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)