Closed travula closed 9 years ago
@ksripathi what is the current status on this? You will implement the DHCP-like thing? Maybe we can discuss this before you start implementing?
@ecthiender I have already worked on this issue and came up with implementation also later when Thirumal reviewed the code, he suggested me the best of resoving the issue. So I have to rethink about it.
Yes @ecthiender, I will discuss with you about this issue before I will start implementation.
@travula , @ecthiender
As Anon and I discussed solution for #56 issue we finalized that the following idea will resolve the issue.
Before returning an "ip_address" from "ovpl/src/adapters/BaseAdapter.py" we calculated "vm_id" based on "ip_address" and tested whether 'vm_id' is already exist or not (container status can be stopped or running) if it exists we bypass that ip_address and check for other "ip_address" and so on and finally return the "ip_address". This logic is working fine for "CentOSVZAdapter" adapter and tested well.
As "BaseAdapter.py" is common for all adapters. The same logic is not working for "CentOSBridgeAdapter" adapter and this is because in this adapter while calculating "vm_id" from "ip_address" we incremented it by 100. So I was thinking to write logic based on the adapter using "if" and "else" condition in "ovpl/src/adapter/BaseAdapter.py"
Please share your thoughts....
Done
execute_command() method has to tested.
Currently, an IP is usable if it it not pingable. An ip is not pingable though it is assgined to a stopped container. But, openvz cannot create a container when a IP assigned to a stopped container is used while createing a new container.