cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Min Chen <>
Subject Re: Problem with createNetworkOffering API call
Date Wed, 23 Jan 2013 18:13:14 GMT
Hi Rohit/Hugo,

	If I am not mistaken the issue, an easy fix for this is to change the
following parameter annotation

type=CommandType.UUID, entityType=DiskOfferingResponse.class,
            description="the service offering ID used by virtual router
    private Long serviceOfferingId;


type=CommandType.UUID, entityType=ServiceOfferingResponse.class,
description="the service offering ID used by virtual router provider")
private Long serviceOfferingId;

Since this parameter is actually referring to service offerings, not disk


On 1/23/13 9:17 AM, "Rohit Yadav" <> wrote:

>Hi Hugo,
>I'll see this today. I'm not sure about the impact of fixing it in
>disk offering dao impl as well.
>Both disk and service offering dao and tables are tightly coupled.
>Must be something I missed.
>Will keep you posted.
>On Wed, Jan 23, 2013 at 6:28 AM, Hugo Trippaers
><> wrote:
>> Hey guys,
>> I was working on some stuff when I needed to create a new network
>>service offering using the lastest build from master (and a clean
>>database). The call failed with the following message "Unable to execute
>>API command createnetworkoffering due to invalid value. Invalid
>>parameter value=29bf1bb4-9e0a-4908-9de9-0065ca6cc20c due to incorrect
>>long value, entity not found, or an annotation bug." I needed a systemvm
>>offering in the network offering from the list, the uuid mentioned in
>>the error is the uuid of the system offering. However the system
>>offering is in the database, it is one of the default system offerings.
>> mysql> select id, unique_name,name from disk_offering where uuid =
>> +----+--------------------------+-------------------------------------+
>> | id | unique_name              | name                                |
>> +----+--------------------------+-------------------------------------+
>> |  9 | Cloud.Com-SoftwareRouter | System Offering For Software Router |
>> +----+--------------------------+-------------------------------------+
>> It took some digging, but I found the problem. The api framework issues
>>a findByUuid for any uuid's received with the command. So in this case
>>the api dispatcher issued the findByUuid call on the DiskOfferingDao.
>>This call is part of the GenericDaoBase (line 918) and eventually
>>becomes a call to searchIncludingRemoved with a single clause stating
>>the uuid must match. However this call is overridden in
>>DiskOfferingDaoImpl (line 85) and the new function adds a clause stating
>>that the type must be 'Disk'. The service offering we are looking for
>>has type 'Service' so the query yields no results and the call fails.
>> The easy way out would be to remove the check for type equals Disk,
>>which fixes the obvious problem, but I have no idea what else this might
>>cause. Could someone with more clue than me have a look at this?
>> Below the lines from the log for those interested.
>> Cheers,
>> Hugo
>> 2013-01-23 14:52:16,367 DEBUG [cloud.api.ApiServlet]
>>(649447027@qtp-2088502955-10:null) ===START=== -- GET
>> 2013-01-23 14:56:45,974 DEBUG [cloud.api.ApiDispatcher]
>>(649447027@qtp-2088502955-10:null) Object entity with
>>uuid=29bf1bb4-9e0a-4908-9de9-0065ca6cc20c does not exist in the database.
>> 2013-01-23 14:56:45,975 INFO  [cloud.api.ApiServer]
>>(649447027@qtp-2088502955-10:null) Unable to execute API command
>>createnetworkoffering due to invalid value. Invalid parameter
>>value=29bf1bb4-9e0a-4908-9de9-0065ca6cc20c due to incorrect long value,
>>entity not found, or an annotation bug.

View raw message