Code review comment for lp:~tr3buchet/nova/multi_nic

Revision history for this message
Trey Morris (tr3buchet) wrote :

> > Now I see only 2 exceptions, one in the release_fixed_ip method and another
> in
> > the lease_fixed_ip method. In both the cases the virtual interface is
> referred
> > which is already deleted in the deallocated_for_instance method.
>
> You have completely eliminated checking of mac address from both these methods
> so now there is no question of getting these exceptions. But IMO, mac address
> checking is very important without which it is possible to release fixed ip
> which is associated with another instance.
> But having said that, I don't see there is any problem here because until this
> fixed ip address is not disassociated it cannot be assigned to another
> instance.

The IP can't be released if it is allocated. I don't see how this is a problem. Are you suggesting I move up in the function where it checks for the ip being allocated?

> To keep mac address checking intact, you can have to set delete status to True
> in the virtual_interfaces db table instead of deleting the virtual interfaces
> records of that instance.

The problem with this is that we'd have unused mac addresses in the table and the column is unique'd for creating new mac_addresses. I delete them so they can be reused without issue.

> Apart from that, during testing rev 854 I am getting following errors:-
>
> 1) While upgrading database using nova-manage db sync command , I get
> following error:-
>
> OperationalError: (OperationalError) (1005, "Can't create table 'nova.#sql-
> 51a_f3a' (errno: 121)") 'ALTER TABLE fixed_ips ADD CONSTRAINT
> fixed_ips_virtual_interfaces_fkey FOREIGN KEY(virtual_interface_id) REFERENCES
> virtual_interfaces (id)' ()
>
> I am using Mysql 5.1.49.
>
> You can check for the error messages here at
> http://paste.openstack.org/show/1763/

I can't replicate or find anyone else able to replicate this error. Looking into this I did fix a syntax error, but I don't think it was related to your issue.

> 2) If I ignore error #1 above, then at the time of spinning a new VM instance
> I see another error in the nova-compute.log
>
> ProgrammingError: (ProgrammingError) (1146, "Table 'nova.provider_fw_rules'
> doesn't exist") 'SELECT provider_fw_rules.created_at AS
> provider_fw_rules_created_at, provider_fw_rules.updated_at AS
> provider_fw_rules_updated_at, provider_fw_rules.deleted_at AS
> provider_fw_rules_deleted_at, provider_fw_rules.deleted AS
> provider_fw_rules_deleted, provider_fw_rules.id AS provider_fw_rules_id,
> provider_fw_rules.protocol AS provider_fw_rules_protocol,
> provider_fw_rules.from_port AS provider_fw_rules_from_port,
> provider_fw_rules.to_port AS provider_fw_rules_to_port, provider_fw_rules.cidr
> AS provider_fw_rules_cidr \nFROM provider_fw_rules \nWHERE
> provider_fw_rules.deleted = %s' (False,)
>
> You can check for the detailed error messages here at
> http://paste.openstack.org/show/1762/
>
> I think this problem is not relevant to you since "provider_fw_rules" db table
> is not added in the trunk.

I think you're right unless it was a migration numbering issue but I don't think it is right at the moment.

« Back to merge proposal