GINI micro Internet distributor/undistributor Given a set of remote machine IP addresses, this program will take a given GINI network and spawn each component on a remote machine. All network communication between the components should still hold. command : gdist [options] Written in Python by Reehan Shaikh reehan.shaikh@cs.mcgill.ca Work/change log January: - Proposal approved - Started reading all the code of how GINI works in Python, especially since I am familiar with GINI when it was written in C. - Mostly reading up on gbuilder, gloader and the classes it depends on. - Built a class diagram for the class structure and a very simple sequence diagram to see how messages are passed between the objects. February: - Started working on the actual gdist implementation. - Tweaked the options parser so that it reads in an IPFile as well. - First step is to be able to use Python to execute shell commands to SSH and SCP into remote machines and execute commands on the remote machine. - Am not able to get the proper return value of executing a command on a remote machine via SSH. Searched the Internet for a solution. Fixed this with a Python system call WEXITSTATUS. - Extensive reading of how SSH and SCP work, authorized key setup, etc... - Continued with gdist implementation. - Verification of remote IPs given done. - Verification of remote directories done. - Proper mapping of components to remote machines done. I had a problem with properly calculating this mapping if there were switches present in the topology, so I introduced the constraint that for gdist, no switches are allowed in the user's topology. March: - Continuing with gdist implementation. A little behind schedule. - Spawning of switches on remote machine so that components can communicate with the outside world done. These switches are not topology-specified, they are automatically added so that each component can have a socket ready to communicate to the outside world. - Auto-configuring switches done. - Starting router and UML components on remote machines done. - Auto-configuring these components with shell scripts and batch configuration files done. Problem with running a command to execute a shell script on a remote machine via SSH. SSH hangs until shell script is complete. Not good as these shell scripts start the components, so the script won't finish until the GINI instance is terminated. Very simple solution, execute command on remote machine with "&". - BIG PROBLEM: components can't talk to each other. "ping" and "ssh" don't work. - Professor Maheswaran and I are too busy at the moment to talk about it. - Started implementing gdist undistribute option. April: - Went to see Professor Maheswaran with bug. He found a solution. Bug was in auto-configuring switches. Switches are configured with a port p and a remote IP r. Port p is the port that the switch's socket is listening to on the host machine. Remote IP r is the IP of the remote machine this switch communicates with. But if two switches want to communicate, the switch on the remote IP r must listen on the same port number p. My initial auto-configuration of switches assigned a different port number to every switch, not taking into account this constraint. - Everything is working fine now. Components can communicate. Tested "ping" and "ssh". - Tweaked the undistribute option so that user can opt to keep GINI generated files. - Started gdist man page. Done. - Made last minute minor changes to implementation. This is better understood if you read the code. It is well-commented. - Working on HTML page for gdist.