Issue Details (XML | Word | Printable)

Key: ABICLOUD-349
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Blocker Blocker
Assignee: Jaume Devesa
Reporter: Diego Parrilla
Votes: 0
Watchers: 0
Operations

Email this issue
Send issue summary in email
If you were logged in you would be able to see more operations.
Abiquo

IP selection overwritten if clicked save button

Created: 28/Nov/09 05:02 PM   Updated: 03/Dec/09 07:00 AM   Resolved: 30/Nov/09 11:00 AM
Component/s: None
Affects Version/s: abicloud-1.0.0-RC2
Fix Version/s: abicloud-1.0.0-RC2

Time Tracking:
Not Specified


 Description  « Hide
If you create a virtualapp as follows:

1) create virtualapp
2) add an image and assign ips (whatever...) and save it
3) add another image
4) save it
5) select an IP different from the default provided by abiCloud (this is very normal due to the lexicograph sorting bug...)
6) move the image in the 'Visio' screen or draw a line
7) save it
8) now go to the image and check what IP is provided, the IP shown is the older one, not the one selected by the user manually.

Save process should not overwrite changes in the selected IPs.

Diego Parrilla added a comment - 28/Nov/09 05:04 PM
Upgraded to blocker: ALL the IPs of ALL the virtual machines are affected and the selected IPs are all overwritten.

Xavier Fernandez added a comment - 28/Nov/09 05:32 PM
Reproduced in the last code in SVN.

Seams that each time we save a node, server recalculates de privateIP,


Another easy test to reproduce

1º Create a virtual App
2º Add an image
3º Save --> System assign 10.0.1.10
4º Change the image name
5º Save --> System assign 10.0.1.100
6º Change another time the image name
7º Save --> System returns to the 10.0.1.10 (Because it's another time the first free in the list)

I think that on saveVirtualAppliance method on virtualApplianceCommand, we generate always a new IP for the modified node. Should be only for the new nodes!

Thanks

Xavier Fernandez added a comment - 28/Nov/09 05:42 PM
I KNOW what it's happend :P

The problem is that ALWAYS! When the node is not deployed, abiCloud recalculate the private IP

                if (nodevi.getVirtualMachine().getState().getId() == State.NOT_DEPLOYED)
                {
                    IPAddress ipaddress =
                        netcommand.requestNewIPAddress(virtualappHBPojo.getVirtualDataCenterHB()
                            .getNetworkType());
                    netcommand.assignPrivateMACResource(userSession, virtualappHBPojo,
                        (NodeVirtualImageHB) currentNode.toPojoHB(), ipaddress);
                }


This is on updateNetworkResources method of virtualApplianceCommand.

The solution is that state = NOT_DEPLOYED and node has not previous IP assigned.

Jaume Devesa added a comment - 29/Nov/09 05:05 PM
Many thanks for the solution, Xavi!

Jaume Devesa added a comment - 30/Nov/09 11:00 AM
Now it controlls if IP address is already reserved for the node to assign the default value.