Re: VCL Returns Private IP for Reservations
Hi Clifton, Make sure the /etc/hosts file is correct. In the log output you included, the private IP address is first being retrieved from /etc/hosts. The address the code found is shown in the log file line: PrivateIP address for host1 collected 10.0.4.106 This does not match what's being used on the host (10.0.4.119). This could either be due to incorrect data in /etc/hosts or you have encountered a bug in the code where it doesn't parse the /etc/hosts lines correctly. After vcld retrieves the private IP address from /etc/hosts it checks the ipconfig output. It returns either the first public address it finds. It a public address isn't found, it returns the first private address it finds which doesn't match the private address retrieved from /etc/hosts. Because the /etc/hosts address (10.0.4.106) doesn't match the ipconfig private address (10.0.4.119), the first ipconfig private address was returned. Look at /etc/hosts. Does the line with address 10.0.4.106 contain "host1", or does it contain another host name beginning with "host1", such as "host10"? If it's the latter, then try changing line 1602 in utils.pm from: if ($line =~ /([0-9]*.[0-9]*.[0-9]*.[0-9]*)\s+($node)/) { to: if ($line =~ /([0-9]*.[0-9]*.[0-9]*.[0-9]*)\s+($node)(\s|\.)/) { Restart vcld and try to make another reservation. If you're still encountering the problem, please include the contents of /etc/hosts on the management node. Hope this helps, Andy Ryan Johnson wrote: My understanding is that VCL determines the public and private IP addresses based on the hardware information given in the computer table of the database. You need to match your DHCP configuration (ie which addresses public/private are assigned to which adapter) with the Mac addresses and names of the adapters in the Computer table's eth0 and eth1 columns. I believe eth0 is the private adapter and eth1 is taken to be the public. On Mon, May 17, 2010 at 1:46 PM, Clifton B Wood wrote: Sure thing, this looks like the piece. It's where the IPconfig command is run and the IP determined. For the record, both network interfaces use DHCP -- I think this was how it is supposed to be based on the image installation instructions I could find. Our "public" IPs belong to Local Area Connection 2. I think the thing here is that our network addresses are so similar, VCL needs to know -how- to determine which ones are public. Log entries follow: 2010-05-12 19:59:51|3517|78:81|reload|utils.pm: insertloadlog(4212)|inserted computer=1, dynamicDHCPaddress, collecting dynamic IP address for node 2010-05-12 19:59:51|3517|78:81|reload|esx.pm:load(508)|Attempting to query vmclient for its public IP... 2010-05-12 19:59:51|3517|78:81|reload|utils.pm: getdynamicaddress(1604)|PrivateIP address for host1 collected 10.0.4.106 2010-05-12 19:59:51|3517|78:81|reload|utils.pm:run_ssh_command(5663)|executing SSH command on host1: |3517|78:81|reload| /usr/bin/ssh -l root -p 22 -x host1 'ipconfig' 2>&1 2010-05-12 19:59:55|3517|78:81|reload|utils.pm: run_ssh_command(5747)|run_ssh_command output: |3517|78:81|reload| Windows IP Configuration |3517|78:81|reload| Ethernet adapter Local Area Connection: |3517|78:81|reload| Connection-specific DNS Suffix . : |3517|78:81|reload| IP Address. . . . . . . . . . . . : 10.0.4.119 |3517|78:81|reload| Subnet Mask . . . . . . . . . . . : 255.255.0.0 |3517|78:81|reload| Default Gateway . . . . . . . . . : |3517|78:81|reload| Ethernet adapter Local Area Connection 2: |3517|78:81|reload| Connection-specific DNS Suffix . : soe.morgan.edu |3517|78:81|reload| IP Address. . . . . . . . . . . . : 10.24.60.214 |3517|78:81|reload| Subnet Mask . . . . . . . . . . . : 255.255.255.0 |3517|78:81|reload| Default Gateway . . . . . . . . . : 10.24.60.1 2010-05-12 19:59:55|3517|78:81|reload|utils.pm:run_ssh_command(5761)|SSH command executed on host1, returning (0, "Windows IP Configuration Ether...") 2010-05-12 19:59:55|3517|78:81|reload|utils.pm:getdynamicaddress(1650)|dynamic IP address for host1 collected: 10.0.4.119 2010-05-12 19:59:55|3517|78:81|reload|esx.pm:load(512)|Got dynamic address from vmclient, attempting to update database 2010-05-12 19:59:55|3517|78:81|reload|utils.pm:update_computer_address(6557)|computer 1 IP address 10.0.4.119 updated in database 2010-05-12 19:59:55|3517|78:81|reload|esx.pm:load(513)|succesfully updated IPaddress of node host1 2010-05-12 19:59:55|3517|78:81|reload|esx.pm:load(543)|post_load() has been implemented by the OS module, returning 1 2010-05-12 19:59:55|3517|78:81|reload|new.pm: reload_image(666)|vmwareesxwinxp- base14-v3 was successfully reloaded on host1 Hi Clifton, Can you please include the vcld.log file output from a reservation where the addresses are incorrect. Regards, Andy Clifton B Wood wrote: Hello, everyone. I've recently updated to the latest version of VCL that is in SVN, and now all of my reservations are returning the private IP instead of the public IP. Is there an easy way to
Re: VCL Returns Private IP for Reservations
My understanding is that VCL determines the public and private IP addresses based on the hardware information given in the computer table of the database. You need to match your DHCP configuration (ie which addresses public/private are assigned to which adapter) with the Mac addresses and names of the adapters in the Computer table's eth0 and eth1 columns. I believe eth0 is the private adapter and eth1 is taken to be the public. On Mon, May 17, 2010 at 1:46 PM, Clifton B Wood wrote: > Sure thing, this looks like the piece. It's where the IPconfig command is > run and > the IP determined. For the record, both network interfaces use DHCP -- I > think this > was how it is supposed to be based on the image installation instructions I > could > find. > > Our "public" IPs belong to Local Area Connection 2. > > I think the thing here is that our network addresses are so similar, VCL > needs to > know -how- to determine which ones are public. > > Log entries follow: > > 2010-05-12 19:59:51|3517|78:81|reload|utils.pm: > insertloadlog(4212)|inserted > computer=1, dynamicDHCPaddress, collecting dynamic IP address for node > 2010-05-12 19:59:51|3517|78:81|reload|esx.pm:load(508)|Attempting to query > vmclient > for its public IP... > 2010-05-12 19:59:51|3517|78:81|reload|utils.pm: > getdynamicaddress(1604)|PrivateIP > address for host1 collected 10.0.4.106 > 2010-05-12 19:59:51|3517|78:81|reload|utils.pm:run_ssh_command(5663)|executing > SSH > command on host1: > |3517|78:81|reload| /usr/bin/ssh -l root -p 22 -x host1 'ipconfig' 2>&1 > 2010-05-12 19:59:55|3517|78:81|reload|utils.pm: > run_ssh_command(5747)|run_ssh_command > output: > |3517|78:81|reload| Windows IP Configuration > |3517|78:81|reload| Ethernet adapter Local Area Connection: > |3517|78:81|reload| Connection-specific DNS Suffix . : > |3517|78:81|reload| IP Address. . . . . . . . . . . . : 10.0.4.119 > |3517|78:81|reload| Subnet Mask . . . . . . . . . . . : 255.255.0.0 > |3517|78:81|reload| Default Gateway . . . . . . . . . : > |3517|78:81|reload| Ethernet adapter Local Area Connection 2: > |3517|78:81|reload| Connection-specific DNS Suffix . : soe.morgan.edu > |3517|78:81|reload| IP Address. . . . . . . . . . . . : 10.24.60.214 > |3517|78:81|reload| Subnet Mask . . . . . . . . . . . : 255.255.255.0 > |3517|78:81|reload| Default Gateway . . . . . . . . . : 10.24.60.1 > 2010-05-12 19:59:55|3517|78:81|reload|utils.pm:run_ssh_command(5761)|SSH > command > executed on host1, returning (0, "Windows IP Configuration Ether...") > 2010-05-12 19:59:55|3517|78:81|reload|utils.pm:getdynamicaddress(1650)|dynamic > IP > address for host1 collected: 10.0.4.119 > 2010-05-12 19:59:55|3517|78:81|reload|esx.pm:load(512)|Got dynamic address > from > vmclient, attempting to update database > 2010-05-12 > 19:59:55|3517|78:81|reload|utils.pm:update_computer_address(6557)|computer > 1 IP > address 10.0.4.119 updated in database > 2010-05-12 19:59:55|3517|78:81|reload|esx.pm:load(513)|succesfully updated > IPaddress > of node host1 > 2010-05-12 19:59:55|3517|78:81|reload|esx.pm:load(543)|post_load() has > been > implemented by the OS module, returning 1 > 2010-05-12 19:59:55|3517|78:81|reload|new.pm: > reload_image(666)|vmwareesxwinxp- > base14-v3 was successfully reloaded on host1 > > > Hi Clifton, > Can you please include the vcld.log file output from a reservation where > the addresses are incorrect. > > Regards, > Andy > > Clifton B Wood wrote: > >> Hello, everyone. >> >> I've recently updated to the latest version of VCL that is in SVN, and >> now all of my reservations are returning the private IP instead of the >> public IP. >> Is there an easy way to fix this so that the provisioning engine returns >> the right IP when making reservations or do I have to manually reorder the >> network connections in all of my images? >> Thanks for any assistance you all can give. >> - Cliff Wood Morgan State University >> > >
Re: VCL Returns Private IP for Reservations
Sure thing, this looks like the piece. It's where the IPconfig command is run and the IP determined. For the record, both network interfaces use DHCP -- I think this was how it is supposed to be based on the image installation instructions I could find. Our "public" IPs belong to Local Area Connection 2. I think the thing here is that our network addresses are so similar, VCL needs to know -how- to determine which ones are public. Log entries follow: 2010-05-12 19:59:51|3517|78:81|reload|utils.pm:insertloadlog(4212)|inserted computer=1, dynamicDHCPaddress, collecting dynamic IP address for node 2010-05-12 19:59:51|3517|78:81|reload|esx.pm:load(508)|Attempting to query vmclient for its public IP... 2010-05-12 19:59:51|3517|78:81|reload|utils.pm:getdynamicaddress(1604)|PrivateIP address for host1 collected 10.0.4.106 2010-05-12 19:59:51|3517|78:81|reload|utils.pm:run_ssh_command(5663)|executing SSH command on host1: |3517|78:81|reload| /usr/bin/ssh -l root -p 22 -x host1 'ipconfig' 2>&1 2010-05-12 19:59:55|3517|78:81|reload|utils.pm:run_ssh_command(5747)|run_ssh_command output: |3517|78:81|reload| Windows IP Configuration |3517|78:81|reload| Ethernet adapter Local Area Connection: |3517|78:81|reload| Connection-specific DNS Suffix . : |3517|78:81|reload| IP Address. . . . . . . . . . . . : 10.0.4.119 |3517|78:81|reload| Subnet Mask . . . . . . . . . . . : 255.255.0.0 |3517|78:81|reload| Default Gateway . . . . . . . . . : |3517|78:81|reload| Ethernet adapter Local Area Connection 2: |3517|78:81|reload| Connection-specific DNS Suffix . : soe.morgan.edu |3517|78:81|reload| IP Address. . . . . . . . . . . . : 10.24.60.214 |3517|78:81|reload| Subnet Mask . . . . . . . . . . . : 255.255.255.0 |3517|78:81|reload| Default Gateway . . . . . . . . . : 10.24.60.1 2010-05-12 19:59:55|3517|78:81|reload|utils.pm:run_ssh_command(5761)|SSH command executed on host1, returning (0, "Windows IP Configuration Ether...") 2010-05-12 19:59:55|3517|78:81|reload|utils.pm:getdynamicaddress(1650)|dynamic IP address for host1 collected: 10.0.4.119 2010-05-12 19:59:55|3517|78:81|reload|esx.pm:load(512)|Got dynamic address from vmclient, attempting to update database 2010-05-12 19:59:55|3517|78:81|reload|utils.pm:update_computer_address(6557)|computer 1 IP address 10.0.4.119 updated in database 2010-05-12 19:59:55|3517|78:81|reload|esx.pm:load(513)|succesfully updated IPaddress of node host1 2010-05-12 19:59:55|3517|78:81|reload|esx.pm:load(543)|post_load() has been implemented by the OS module, returning 1 2010-05-12 19:59:55|3517|78:81|reload|new.pm:reload_image(666)|vmwareesxwinxp- base14-v3 was successfully reloaded on host1 --- Begin Message --- Hi Clifton, Can you please include the vcld.log file output from a reservation where the addresses are incorrect. Regards, Andy Clifton B Wood wrote: Hello, everyone. I've recently updated to the latest version of VCL that is in SVN, and now all of my reservations are returning the private IP instead of the public IP. Is there an easy way to fix this so that the provisioning engine returns the right IP when making reservations or do I have to manually reorder the network connections in all of my images? Thanks for any assistance you all can give. - Cliff Wood Morgan State University --- End Message ---
Re: VCL Returns Private IP for Reservations
Hi Clifton, Can you please include the vcld.log file output from a reservation where the addresses are incorrect. Regards, Andy Clifton B Wood wrote: Hello, everyone. I've recently updated to the latest version of VCL that is in SVN, and now all of my reservations are returning the private IP instead of the public IP. Is there an easy way to fix this so that the provisioning engine returns the right IP when making reservations or do I have to manually reorder the network connections in all of my images? Thanks for any assistance you all can give. - Cliff Wood Morgan State University