Skip to content

Commit 9489d6f

Browse files
author
Kelven Yang
committed
1) Fix a serialization problem in command inherits AsyncCreateCommand.
2) Deal with special IDs (i.e. -1) in UUID translation
1 parent 0b6abd1 commit 9489d6f

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

‎server/src/com/cloud/api/ApiServer.java‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,7 @@ private String queueCommand(BaseCmd cmdObj, Map<String, String> params) {
446446
}
447447

448448
if (objectId != null) {
449+
SerializationContext.current().setUuidTranslation(true);
449450
return ((BaseAsyncCreateCmd) asyncCmd).getResponse(jobId, objectId, objectEntityTable);
450451
}
451452

‎server/src/com/cloud/identity/dao/IdentityDaoImpl.java‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ public Long getIdentityId(String tableName, String identityString) {
7575
if(rs.next()) {
7676
return rs.getLong(1);
7777
} else {
78+
if(id != 0)
79+
return id;
80+
7881
throw new InvalidParameterValueException("Object " + tableName + "(uuid: " + identityString + ") does not exist.");
7982
}
8083
} catch (SQLException e) {

0 commit comments

Comments
 (0)