Friday, December 11, 2009

to kill ...license

Here is a simple trick that will come in handy for testing purposes.  It starts with the question :  will I be able to mimic a running Topspin host's configuration on a testbed machine so that I can install and run Topspin on this testbed without the need for a seperate license file i.e. by spoofing the testbed to be the original host in question.  The answer is yes and there are three important points to take care of :
  • You must copy over the license.dat of the TS host into the testbed to the relevant location. 
  • You must have a valid 'hostname' in the license.dat.  Since it is legal to chage this entry, you can set this to the testbed's hostname, specifically, to the name that is returned by `hostname` on the shell.
  • You change the MAC id of the NIC, usually eth0 to that of the TS host, like so: 
    • ifdown eth0
    • ifconfig hw ether AA:BB:CC:DD:EE:FF  (where the MAC Id typed is the same as that of TS host).
    • ifup eth0
  You might get an error message about the fact that the true MAC id and the spoofed one are different and the NIC may not come up at all.   Also, the MAC id spoofing is temporary and if you restart the network daemon, it reverts to the original.   For these two reasons at least,  this shortcut to inheriting an existing TS license is only a temporary indulgence.  But, this will come in quite handy to test run Topspin on the testbed, without imposing any down time on a running spectrometer.

Ok, let us wrap up the protocol fully :
  • /etc/init.d/bruker_lmgr stop
  • /etc/init.d/brker_lmgr start
  • Now you can check under /usr/local/flexlm/Bruker/licenses, that the flexlm.log does show the daemon starting without any errors. 
  • If you start topspin now, you should be able to get to the interface without any errors. 
As a closing thought, I will say this. In principle  you can exploit /etc/rc.local  to switch the MAC id after boot up and then restart lmgr to mimic the whole thing said above, in an automated fashion. But, since the NIC functionality is not expected to be smooth (as per my understanding thus far), this may not be a solution you look for on a permanent basis, anyway.

1 comment:

  1. If you use 'ifup eth0' script to restart the NIC, you are bound to get the error message that the physical MAC id is different from what you have configured in the last step. The card won't come up at all, as you had warned in the post. The workaround that works for me after I change the MAC id is :

    ifconfig eth0 up

    If you avoid the 'ifup' script things are fine.

    ReplyDelete