Bug 613734 - o-c-hostname fails to set hostname
Summary: o-c-hostname fails to set hostname
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: ovirt-node   
(Show other bugs)
Version: 6.0
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Joey Boggs
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-07-12 17:56 UTC by Mike Burns
Modified: 2010-11-11 14:53 UTC (History)
5 users (show)

Fixed In Version: ovirt-node-1.9.3-4.gitf53c39c.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-11-11 14:53:25 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
patch (743 bytes, patch)
2010-07-12 19:50 UTC, Joey Boggs
no flags Details | Diff

Description Mike Burns 2010-07-12 17:56:35 UTC
Description of problem:
Running Configure Hostname from the firstboot menu results in a message of "Invalid Hostname" if anything other than an empty string is entered of entry.

Tried:

 host1.example.com
 host1
 host
 1.1.1.1


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

How reproducible:
Always

Steps to Reproduce:
1.Choose configure hostname from firstboot menu
2.enter anything other than empty string
3.
  
Actual results:
Invalid Hostname

Expected results:
Sets hostname if valid

Additional info:

Looking at o-c-hostname, it seems that the condition doesn't work anymore:

    if [[ $host =~ "^([a-zA-Z0-9._-]+)$" ]]; then
        result=$?
    fi

Comment 3 Joey Boggs 2010-07-12 19:50:02 UTC
Created attachment 431252 [details]
patch

Comment 5 XinSun 2010-08-24 09:22:39 UTC
Check this bug on rhevh6.0-2.3 snapshot12, do follow test steps:

1. In firstboot menu, choose option 3 to set hostname
2. Input:
        host1.example.com
        host1
        host
        1.1.1.1
then all hostname are set successfully.

Please see details:

Choose an option: 
1) Configure storage partitions	   8) Register Host to RHN
2) Configure authentication	   9) Enable SNMP Agent
3) Set the hostname		  10) Configure the host for RHEV
4) iSCSI Initiator setup	  11) View logs
5) Networking setup		  12) Install locally and reboot
6) Logging setup		  13) Support Menu
7) Kdump Configuration
Choose an option:3

Hostname Configuration

What is the hostname for this node? host1.example.com

Hostname has been set

Red Hat Enterprise Virtualization Hypervisor release 6.0 (12.el6)


 Hypervisor Configuration Menu

1) Configure storage partitions	   8) Register Host to RHN
2) Configure authentication	   9) Enable SNMP Agent
3) Set the hostname		  10) Configure the host for RHEV
4) iSCSI Initiator setup	  11) View logs
5) Networking setup		  12) Install locally and reboot
6) Logging setup		  13) Support Menu
7) Kdump Configuration
Choose an option: 13
This menu is for troubleshooting with support representatives. Do not use these options without guidance from support. Enter the support menu ([Y]es or [N]o)? y
Support Menu

1) Shell			     3) Uninstall an existing Hypervisor
2) Continue boot		     4) Exit support menu
Choose an option: 1

[root@host1 /]# hostname
host1.example.com

So change this bug's status to verified.

Comment 6 releng-rhel@redhat.com 2010-11-11 14:53:25 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.


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