[omniORB] Dynamic IP Issue

John Kamenik jkamenik at patton.com
Wed May 30 17:39:09 BST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I have notice that IORs do not change after IP configuration  
changes.  This is causing me a problem when externally connecting  
because my device has a DHCP address, which is not being added to the  
IOR.

I find it hard to beleive that OmniORB cannot deal with DHCP  
addresses so I probably just have something mis-configured.  Below is  
my entire OmniORB config (sans comments), the test servant's IOR, the  
test servant's script, and the test output.  You will notice that I  
am not actually calling the ORB's run function.  This is because I do  
not want to deal with threading, but it does not affect the behavior  
(at least on my computer).  You will notice from the output that the  
IORs do not change even though the IP configuration does.

If I add more IP addresses and rerun the test then the new IORs will  
be longer.  Proving to me that IP information is actually stored at  
startup.  Is there a configuration option I missed?  Or something I  
have to do to get a servant update its IOR?  Thanks in advance to  
anyone who can solve this issue for me.

Note: The test script assumes the use of the BusyBox's ip suite and  
that it is run as root.  iproute2 can probably be used in place of  
BusyBox.

My setup:
	Linux 2.6.14
	BusyBox 1.0 (for ip suite)
	omniORB 4.0.7 /w Python Bindings
	Python 2.4.2


===== OmniORB Cfg ======
endPointPublishAllIFs=1
endPoint = giop:unix:
endPoint = giop:tcp::
serverTransportRule = localhost unix
serverTransportRule = *         tcp
clientTransportRule = *         unix,tcp


========= IOR ==========
module PKG {
	interface IorTest {
		/* No purpose except for this function to exist */
		void dummy();
	};
};


===== Test Script ======
#!/usr/bin/env python
import os, sys, signal,syslog
from syslog import syslog as log

# Import the CORBA Stuff
from omniORB import CORBA
import IDL.IorTest_idl
import PKG__POA
import PKG


class Servant( PKG__POA.IorTest ):
	def __init__(self):
		print( "Servant Created" )

	def dummy(self):
		print( "Called Dummy" )


if __name__ == '__main__':
	orb = CORBA.ORB_init(sys.argv)

	server = Servant()._this()

	print( "IOR before POA" )
	print( orb.object_to_string(server) )

	poa = orb.resolve_initial_references("RootPOA")
	poaManager = poa._get_the_POAManager()
	poaManager.activate()

	print( "IOR after POA" )
	print( orb.object_to_string(server) )

	from subprocess import Popen, PIPE
	Popen(['/usr/sbin/ip','link','set','down','eth1'],  
stdout=PIPE).stdout.read()
	Popen(['/usr/sbin/ip','addr','add','1.1.1.1/24','dev','eth1'],  
stdout=PIPE).stdout.read()
	print( "IOR after IP change (downed)" )
	print( orb.object_to_string(server) )

	Popen(['/usr/sbin/ip','link','set','up','eth1'],  
stdout=PIPE).stdout.read()
	print( "IOR after Interface upped" )
	print( orb.object_to_string(server) )

	Popen(['/usr/sbin/ip','addr','add','1.2.3.4/24','dev','eth1'],  
stdout=PIPE).stdout.read()
	print( "IOR after IP change (upped)" )
	print( orb.object_to_string(server) )


===== Test Output ======
Servant Created
IOR before POA
IOR: 
000000001400000049444c3a504b472f496f72546573743a312e30000100000000000000 
e7000000000102000a00000031302e31312e322e390008040e000000fe4415b120000009 
06000000000000000500000000000000080000000000000000545441010000001c000000 
000000000100010001000000010001050901010001000000090101000300000018000000 
000000000d0000003139322e3136382e312e313000000804030000001a00000000000000 
0f0000003139322e3136382e3230302e3130000008040000025454413b00000000000000 
0a00000031302e31312e322e39000000230000002f746d702f6f6d6e692d726f6f742f30 
30303030323331302d35343834373632323800
IOR after POA
IOR: 
000000001400000049444c3a504b472f496f72546573743a312e30000100000000000000 
e7000000000102000a00000031302e31312e322e390008040e000000fe4415b120000009 
06000000000000000500000000000000080000000000000000545441010000001c000000 
000000000100010001000000010001050901010001000000090101000300000018000000 
000000000d0000003139322e3136382e312e313000000804030000001a00000000000000 
0f0000003139322e3136382e3230302e3130000008040000025454413b00000000000000 
0a00000031302e31312e322e39000000230000002f746d702f6f6d6e692d726f6f742f30 
30303030323331302d35343834373632323800
IOR after IP change (downed)
IOR: 
000000001400000049444c3a504b472f496f72546573743a312e30000100000000000000 
e7000000000102000a00000031302e31312e322e390008040e000000fe4415b120000009 
06000000000000000500000000000000080000000000000000545441010000001c000000 
000000000100010001000000010001050901010001000000090101000300000018000000 
000000000d0000003139322e3136382e312e313000000804030000001a00000000000000 
0f0000003139322e3136382e3230302e3130000008040000025454413b00000000000000 
0a00000031302e31312e322e39000000230000002f746d702f6f6d6e692d726f6f742f30 
30303030323331302d35343834373632323800
IOR after Interface upped
IOR: 
000000001400000049444c3a504b472f496f72546573743a312e30000100000000000000 
e7000000000102000a00000031302e31312e322e390008040e000000fe4415b120000009 
06000000000000000500000000000000080000000000000000545441010000001c000000 
000000000100010001000000010001050901010001000000090101000300000018000000 
000000000d0000003139322e3136382e312e313000000804030000001a00000000000000 
0f0000003139322e3136382e3230302e3130000008040000025454413b00000000000000 
0a00000031302e31312e322e39000000230000002f746d702f6f6d6e692d726f6f742f30 
30303030323331302d35343834373632323800
IOR after IP change (upped)
IOR: 
000000001400000049444c3a504b472f496f72546573743a312e30000100000000000000 
e7000000000102000a00000031302e31312e322e390008040e000000fe4415b120000009 
06000000000000000500000000000000080000000000000000545441010000001c000000 
000000000100010001000000010001050901010001000000090101000300000018000000 
000000000d0000003139322e3136382e312e313000000804030000001a00000000000000 
0f0000003139322e3136382e3230302e3130000008040000025454413b00000000000000 
0a00000031302e31312e322e39000000230000002f746d702f6f6d6e692d726f6f742f30 
30303030323331302d35343834373632323800


John T. Kamenik (Software Eng.)
jkamenik at patton.com

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)

iD8DBQFGXeDuGcYBlkXseR8RApUvAJwK3fJ43iYon3Cf3vY6Nz6vmiHx1ACeKV+4
wh76tiwluaPmZd/ZXTJLy00=
=SmVq
-----END PGP SIGNATURE-----



More information about the omniORB-list mailing list