You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by Hugo Trippaers <HT...@schubergphilis.com> on 2012/07/09 10:00:03 UTC
unique key and removed field
Hey guys,
While running some test scripts I noticed that the table 'physical_network_service_providers' has a unique key on the combination of physical_network_id and provider_name, this is potentially a problem when we also use the removed field to indicate a device is removed.
In my case I added a new device, deleted it and immediately added a new device using the same provider. This resulted in a database exception because of a unique key violation. I think this is a bug, we should either immediately remove the device or remove the unique constraint and take care of this in the code using the removed field.
Any opinions on this?
Cheers,
Hugo
RE: unique key and removed field
Posted by Abhinandan Prateek <Ab...@citrix.com>.
Here is the Jira ticket:
http://bugs.cloudstack.org/browse/CS-15495
-abhi
>-----Original Message-----
>From: Hugo Trippaers [mailto:HTrippaers@schubergphilis.com]
>Sent: Tuesday, July 10, 2012 12:16 AM
>To: cloudstack-dev@incubator.apache.org
>Subject: RE: unique key and removed field
>
>Thanks Alex,
>
>This bug fix is here: https://reviews.apache.org/r/5839/
>
>Cheers,
>
>Hugo
>
>-----Original Message-----
>From: Alex Huang [mailto:Alex.Huang@citrix.com]
>Sent: Monday, July 09, 2012 6:09 PM
>To: cloudstack-dev@incubator.apache.org
>Subject: RE: unique key and removed field
>
>It's a bug. Please file it.
>
>--Alex
>
>> -----Original Message-----
>> From: Hugo Trippaers [mailto:HTrippaers@schubergphilis.com]
>> Sent: Monday, July 09, 2012 1:00 AM
>> To: cloudstack-dev@incubator.apache.org
>> Subject: unique key and removed field
>>
>> Hey guys,
>>
>> While running some test scripts I noticed that the table
>> 'physical_network_service_providers' has a unique key on the
>> combination of physical_network_id and provider_name, this is
>> potentially a problem when we also use the removed field to indicate a
>device is removed.
>>
>> In my case I added a new device, deleted it and immediately added a
>> new device using the same provider. This resulted in a database
>> exception because of a unique key violation. I think this is a bug, we
>> should either immediately remove the device or remove the unique
>> constraint and take care of this in the code using the removed field.
>>
>> Any opinions on this?
>>
>> Cheers,
>>
>> Hugo
RE: unique key and removed field
Posted by Hugo Trippaers <HT...@schubergphilis.com>.
Thanks Alex,
This bug fix is here: https://reviews.apache.org/r/5839/
Cheers,
Hugo
-----Original Message-----
From: Alex Huang [mailto:Alex.Huang@citrix.com]
Sent: Monday, July 09, 2012 6:09 PM
To: cloudstack-dev@incubator.apache.org
Subject: RE: unique key and removed field
It's a bug. Please file it.
--Alex
> -----Original Message-----
> From: Hugo Trippaers [mailto:HTrippaers@schubergphilis.com]
> Sent: Monday, July 09, 2012 1:00 AM
> To: cloudstack-dev@incubator.apache.org
> Subject: unique key and removed field
>
> Hey guys,
>
> While running some test scripts I noticed that the table
> 'physical_network_service_providers' has a unique key on the
> combination of physical_network_id and provider_name, this is
> potentially a problem when we also use the removed field to indicate a device is removed.
>
> In my case I added a new device, deleted it and immediately added a
> new device using the same provider. This resulted in a database
> exception because of a unique key violation. I think this is a bug, we
> should either immediately remove the device or remove the unique
> constraint and take care of this in the code using the removed field.
>
> Any opinions on this?
>
> Cheers,
>
> Hugo
RE: unique key and removed field
Posted by Alex Huang <Al...@citrix.com>.
It's a bug. Please file it.
--Alex
> -----Original Message-----
> From: Hugo Trippaers [mailto:HTrippaers@schubergphilis.com]
> Sent: Monday, July 09, 2012 1:00 AM
> To: cloudstack-dev@incubator.apache.org
> Subject: unique key and removed field
>
> Hey guys,
>
> While running some test scripts I noticed that the table
> 'physical_network_service_providers' has a unique key on the combination
> of physical_network_id and provider_name, this is potentially a problem
> when we also use the removed field to indicate a device is removed.
>
> In my case I added a new device, deleted it and immediately added a new
> device using the same provider. This resulted in a database exception
> because of a unique key violation. I think this is a bug, we should either
> immediately remove the device or remove the unique constraint and take
> care of this in the code using the removed field.
>
> Any opinions on this?
>
> Cheers,
>
> Hugo