Skip to content. | Skip to navigation

Personal tools

Navigation

You are here: Home / Wiki / Kb183

Kb183

Emulab FAQ: Testbed Operations: How do I handle changes to the tmcd protocol and code?

Emulab FAQ: Testbed Operations: How do I handle changes to the tmcd protocol and code?

When the tmcc-to-tmcd protocol has been changed incompatibly, bump the CURRENT_VERSION number in tmcd/decls.h . Otherwise leave it alone in your new version.

Just adding commands to the command_array in tmcd.c is not an incompatibility, because old versions of tmcc would not have code to invoke the new commands.

Versioning enables you to add code to handle both the old and new versions of the protocol in tmcd.c, depending on the version number of the tmcc client connecting. The version number is the vers argument in the expansion of the COMMAND_PROTOTYPE() macro.

tmcc defaults to communicating with tmcd on boss at port 7777. You can test your new version of tmcd on a different port with a port number option, -p 7778 for example.

Furthermore, the tmcd -d -v options turn on debugging mode and select verbose output. Conveniently when debugging, rather than spawning a tmcd daemon into the background, tmcd stays in the foreground printing messages and exits after a single tmcc connection has finished.

Give the same -p argument to tmcc on your client node to connect to your test tmcd daemon on boss.

When you're done testing, please commit your changes to the code, make, and install before you restart the production tmcd.

Here's the command for restarting the tmcd daemon on boss:

	sudo /usr/testbed/sbin/tmcd.restart