[Planetlab-devel] Re: API - inconsistency issue with expired slices

Thierry Parmentelat thierry.parmentelat at sophia.inria.fr
Fri Aug 31 09:37:08 EDT 2007


Hi Tony
I had found the same bug too quite a while back - it is actually the 
purpose of our db migration numbered 004
I do not think it is related to the issue that I am raising.
-- Thierry

tmack at CS.Princeton.EDU wrote:
> Yes, this was a bug Stephen found a couple weeks ago. I fixed it by 
> modifying the 'site_nodes' view to only return nodes that aren't 
> marked 'deleted'. See below. This version of the schema should be in 
> the planetlab-4_0-branch.
>
>
> -- Nodes at each site
> CREATE VIEW site_nodes AS
> SELECT site_id,
> array_accum(node_id) AS node_ids
> FROM nodes
> WHERE deleted IS false
> GROUP BY site_id;
>
>
> Quoting Thierry Parmentelat <thierry.parmentelat at sophia.inria.fr>:
>
>> Hi Tony
>>
>> I have noticed the following on my version of the API
>> - GetSlices does filter out expired slices
>> - But in the various cross-references, like e.g. a site's slice_ids, 
>> these are not filtered out
>> I am giving an example below
>>
>> I believe this is a bug, but before I fix it I'd like to know your 
>> feelings.
>>
>> ============
>> So for instance I have on a simplistic myplc
>>
>> >>> len(GetSlices())
>> 1
>> >>> GetSlices()[0]['slice_id']
>> 4
>>
>> BUT
>> >>> GetSites(1,['slice_ids'])
>> [{'slice_ids': [4, 6]}]
>>
>> And this extra slice with slice_id=6 shows up in the DB as an expired 
>> slice:
>>
>> planetlab4=> select slice_id,site_id,created,expires from slices 
>> where is_deleted is false;
>> slice_id | site_id |          created           |       expires      
>> ----------+---------+----------------------------+---------------------
>>        4 |       1 | 2007-05-18 09:31:03.11146  | 2038-01-19 03:14:07
>>        6 |       1 | 2007-08-01 17:06:20.311229 | 2007-08-15 17:06:20
>>
>> ============
>>
>
>



More information about the Devel mailing list