Bug 1785257 - Unable to test network configuration for hostname if hostname starting with integer
Summary: Unable to test network configuration for hostname if hostname starting with i...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Appliance
Version: 5.10.13
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: GA
: 5.12.0
Assignee: drew uhlmann
QA Contact: Devidas Gaikwad
Red Hat CloudForms Documentation
URL:
Whiteboard:
Depends On:
Blocks: 1805801
TreeView+ depends on / blocked
 
Reported: 2019-12-19 14:04 UTC by Devidas Gaikwad
Modified: 2020-10-26 16:13 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1805801 (view as bug list)
Environment:
Last Closed: 2020-10-26 16:13:40 UTC
Category: ---
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Found error on this page (16.39 KB, image/png)
2019-12-19 14:04 UTC, Devidas Gaikwad
no flags Details
set hostname with underscore character (71.75 KB, image/png)
2019-12-23 10:08 UTC, Devidas Gaikwad
no flags Details
Error for hostname if hostname contains "_" (13.29 KB, image/png)
2019-12-23 10:09 UTC, Devidas Gaikwad
no flags Details

Description Devidas Gaikwad 2019-12-19 14:04:37 UTC
Created attachment 1646531 [details]
Found error on this page

Description of problem:
when we test network configuration for hostname it does not work only if hostname starting with a digit.


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

How reproducible: 100%


Steps to Reproduce:
1. Set hostname starting with the digit.
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 "success" message while entering the correct hostname. 




Additional info:
Also facing this issue on 5.10.13.1 version

Comment 3 drew uhlmann 2019-12-19 15:12:05 UTC
https://tools.ietf.org/html/rfc1123 

 2.1  Host Names and Numbers

      The syntax of a legal Internet host name was specified in RFC-952
      [DNS:4].  One aspect of host name syntax is hereby changed: the
      restriction on the first character is relaxed to allow either a
      letter or a digit.  Host software MUST support this more liberal
      syntax.

Comment 5 CFME Bot 2019-12-19 19:21:43 UTC
New commit detected on ManageIQ/manageiq-appliance_console/master:

https://github.com/ManageIQ/manageiq-appliance_console/commit/095fd2e510263a88e94492a3bbd8755fb618cd12
commit 095fd2e510263a88e94492a3bbd8755fb618cd12
Author:     d-m-u <duhlmann>
AuthorDate: Thu Dec 19 10:39:22 2019 -0500
Commit:     d-m-u <duhlmann>
CommitDate: Thu Dec 19 10:39:22 2019 -0500

    hostnames can start with a digit per https://tools.ietf.org/html/rfc1123

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

 lib/manageiq/appliance_console/prompts.rb | 2 +-
 spec/prompts_spec.rb | 32 +-
 2 files changed, 29 insertions(+), 5 deletions(-)

Comment 6 Devidas Gaikwad 2019-12-23 10:06:20 UTC
Tried hostname with another combination and I am getting the issue if hostname contains "_"(underscore) then it is not able to test hostname. Gives the same error. For "_" position does not matter.
Attaching screenshot for the same.

Please let me know if we are fixing this in this BZ or should I open new BZ for this issue.

Comment 7 Devidas Gaikwad 2019-12-23 10:06:56 UTC
Tried hostname with another combination and I am getting the issue if hostname contains "_"(underscore) then it is not able to test hostname. Gives the same error. For "_" position does not matter.
Attaching screenshot for the same.

Please let me know if we are fixing this in this BZ or should I open new BZ for this issue.

Comment 8 Devidas Gaikwad 2019-12-23 10:08:27 UTC
Created attachment 1647304 [details]
set hostname with underscore character

Comment 9 Devidas Gaikwad 2019-12-23 10:09:28 UTC
Created attachment 1647305 [details]
Error for hostname if hostname contains "_"

Comment 10 Yuri Rudman 2019-12-23 14:12:14 UTC
as described in https://tools.ietf.org/html/rfc952: underscore ("_") is not permitted character for host name

Comment 11 drew uhlmann 2019-12-23 21:57:18 UTC
Hey dgaikwad,

Per comment 10 (thanks Yuri!) we are _not_ fixing the underscore issue in this BZ or should you open new BZ for it since it is not really an issue. 

Please retest with a hostname that begins with a digit and doesn't have underscores. 

Thanks!

Comment 12 Devidas Gaikwad 2019-12-24 08:25:27 UTC
Hi drew,
The new issue opened based on your above comment, Issue ID: https://bugzilla.redhat.com/show_bug.cgi?id=1786282



Thanks,
Devidas

Comment 13 drew uhlmann 2019-12-24 14:23:25 UTC
Sorry, that should've said "nor should you open new BZ for it". Since it's not an issue, I'm closing it. 

Underscores aren't valid in hostnames and I think we're handling them fine. It isn't a bug.

Comment 14 Devidas Gaikwad 2019-12-24 14:33:16 UTC
Hi drew,
As you are saying underscore is not valid in the hostname then we should disallow underscore while setting hostname but we are allowing it while setting the hostname. It means there is an issue while handling the underscore. 
Please have a look in attachment



Thanks,
Devidas Gaikwad

Comment 15 drew uhlmann 2019-12-24 14:35:29 UTC
Can you please test what this was opened for? A hostname without underscores that starts with a digit, per the title and description?

Comment 16 Devidas Gaikwad 2019-12-24 14:40:04 UTC
sure drew, I will test this issue, please let me know which build I can use for the same?

Comment 17 drew uhlmann 2019-12-26 01:51:44 UTC
I don't know. Had you provided an appliance for me when I asked for one I would've been more than happy to change the line in question so you could've tested it there. Since you didn't, please take a look at the PR in question and apply the changes to, as you said, any appliance, rather than waiting for a build.

Comment 18 Devidas Gaikwad 2020-01-13 12:33:25 UTC
is this fix is only available for v5.10 and v5.11 or only for CFME master?

Comment 19 drew uhlmann 2020-01-16 13:05:33 UTC
At the moment only master, I did ask about backporting so we'll see about 5.10/5.11

Comment 20 CFME Bot 2020-01-16 15:15:50 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(-)


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