+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 10 of 11

Thread: genconfig hosts produces wrong /etc/hosts

  1. #1
    newton is offline Junior Member
    Join Date
    November 12th, 2008
    Posts
    12
    Downloads
    0
    Uploads
    0

    Default genconfig hosts produces wrong /etc/hosts

    Hi,

    to me it seems that "genconfig hosts" produces a wrong /etc/hosts:
    Code:
    [root@kusu1 ~]# genconfig hosts
    # 
    # Dynamically generated by: genconfig  (Do not edit!)
    #
    127.0.0.1       localhost.localdomain   localhost
    10.0.0.1        kusu1.kusu      kusu1-eth0.kusu kusu1-eth0
    10.0.0.2        compute-00-00.kusu      compute-00-00-eth0.kusu compute-00-00-eth0      compute-00-00
    10.0.0.3        compute-00-01.kusu      compute-00-01-eth0.kusu compute-00-01-eth0      compute-00-01
    10.0.0.4        compute-00-02.kusu      compute-00-02-eth0.kusu compute-00-02-eth0      compute-00-02
    10.0.0.5        compute-00-03.kusu      compute-00-03-eth0.kusu compute-00-03-eth0      compute-00-03
    192.168.0.100   kusu1.mydomain.de       kusu1-eth1.kusu kusu1-eth1      kusu1
    
    whereas ifconfig tells me, that the ip of kusu1 is 192.168.0.166:
    Code:
    [root@kusu1 ~]# ifconfig
    eth0      Link encap:Ethernet  HWaddr 00:1A:92:54:44:67  
              inet addr:10.0.0.1  Bcast:10.0.0.255  Mask:255.255.255.0
              inet6 addr: fe80::21a:92ff:fe54:4467/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:10337 errors:0 dropped:0 overruns:0 frame:0
              TX packets:12193 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:2030259 (1.9 MiB)  TX bytes:6685259 (6.3 MiB)
              Memory:c8200000-c8220000 
    
    eth1      Link encap:Ethernet  HWaddr 00:1A:92:54:44:66  
              inet addr:192.168.0.166  Bcast:192.168.0.255  Mask:255.255.255.0
              inet6 addr: fe80::21a:92ff:fe54:4466/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:1776 errors:0 dropped:0 overruns:0 frame:0
              TX packets:1241 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:191558 (187.0 KiB)  TX bytes:175424 (171.3 KiB)
              Memory:c8220000-c8240000
    
    I came across that, because I run some test, and the very first one tests ssh connectivity.
    And ssh kusu1 only works if I manually edit /etc/hosts (allthough it tells me I shouldn't )
    Maybe I miss something?
    I run kusu 1.0 on centos 5.2.

    regards

  2. #2
    ltsai is offline Project Moderator
    Join Date
    March 4th, 2008
    Posts
    61
    Blog Entries
    3
    Downloads
    3
    Uploads
    0

    Default

    Thanks for trying out Project Kusu.

    For eth1(public network), was it set to dhcp during installation?

  3. #3
    newton is offline Junior Member
    Join Date
    November 12th, 2008
    Posts
    12
    Downloads
    0
    Uploads
    0

    Default

    Yes, eth1 uses dhcp.

  4. #4
    ltsai is offline Project Moderator
    Join Date
    March 4th, 2008
    Posts
    61
    Blog Entries
    3
    Downloads
    3
    Uploads
    0

    Default

    Can you provide the output of netedit -l?

  5. #5
    newton is offline Junior Member
    Join Date
    November 12th, 2008
    Posts
    12
    Downloads
    0
    Uploads
    0

    Default

    Code:
    [root@kusu1 ~]# netedit -l
    
    Network ID Device       Network       Subnet          Network Description                      Interface Type
    ========== ======       =======       ======          ===================                      ==============
    1          eth1         192.168.0.0   255.255.255.0   public                                   public
    2          eth0         10.0.0.0      255.255.0.0     cluster                                  provision
    

  6. #6
    ltsai is offline Project Moderator
    Join Date
    March 4th, 2008
    Posts
    61
    Blog Entries
    3
    Downloads
    3
    Uploads
    0

    Default

    Was eth1 changed to dhcp after installation? From netedit -l, it looks like it was set to static ip during installation?

  7. #7
    newton is offline Junior Member
    Join Date
    November 12th, 2008
    Posts
    12
    Downloads
    0
    Uploads
    0

    Default

    I am not shure any more.
    I had a problem with eth0, which was not active. At install I set it to static (eth0), but then for some reason it did not get activated and was set to dhcp. I set it again to static and activated it. It survived a couple of reboots, but not all. So I had to do the process again.
    Anyway, maybe in the process of changing things for eth0, I changed also things for eth1.

  8. #8
    ltsai is offline Project Moderator
    Join Date
    March 4th, 2008
    Posts
    61
    Blog Entries
    3
    Downloads
    3
    Uploads
    0

    Default

    Can you post the following files:

    /etc/sysconfig/network-scripts/ifcfg-eth0 and
    /etc/sysconfig/network-scripts/ifcfg-eth1

  9. #9
    newton is offline Junior Member
    Join Date
    November 12th, 2008
    Posts
    12
    Downloads
    0
    Uploads
    0

    Default

    eth0:
    Code:
    # Intel Corporation 80003ES2LAN Gigabit Ethernet Controller (Copper)
    DEVICE=eth0
    ONBOOT=yes
    BOOTPROTO=none
    HWADDR=00:1a:92:54:44:67
    NETMASK=255.255.255.0
    IPADDR=10.0.0.1
    GATEWAY=192.168.0.1
    TYPE=Ethernet
    USERCTL=no
    IPV6INIT=no
    PEERDNS=yes
    
    eth1:
    Code:
    # Intel Corporation 80003ES2LAN Gigabit Ethernet Controller (Copper)
    DEVICE=eth1
    ONBOOT=yes
    BOOTPROTO=dhcp
    HWADDR=00:1a:92:54:44:66
    TYPE=Ethernet
    
    Was eth1 changed to dhcp after installation?
    Rereading my personal installation log this weekend, I found that after installation, eth1 was not activated.
    So yes, I changed eth1 to dhcp after installation.
    And now I think I also remember that I assigned a static adress during installation. But because the card did not get activated, I changed it.

    I should probably reformulate my question: How do I make genconfig aware of my change of the network settings?

    Sorry for beeing sloppy in previous posts ...

  10. #10
    ltsai is offline Project Moderator
    Join Date
    March 4th, 2008
    Posts
    61
    Blog Entries
    3
    Downloads
    3
    Uploads
    0

    Default

    You can change the database entries to ensure that eth1 is on dhcp.

    # mysql -u root kusudb
    # UPDATE networks set network='', subnet='', gateway='', startip='', usingdhcp=True where netid=1;

    This should fix the tables and allow genconfig hosts to create the correct /etc/hosts.

+ Reply to Thread
Page 1 of 2
1 2 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts