Description:
Fixing two other scenarios apart from the reported one
where we were not passing in database IDs for translation
into uuids, in the exception.
Bug CS-14448: Wrong error message on using the createVlanIpRange cmd
Cherry-picking from master for bug 14448 into 3.0.x. Resolved
conflicts encountered during cherry-picking.
Description:
Adding overloaded addProxyObject() function to CloudException
and RuntimeCloudException classes and using this function
to stuff exceptions with IDs, to reduce code footprint.
Conflicts:
server/src/com/cloud/network/NetworkManagerImpl.java
server/src/com/cloud/resource/ResourceManagerImpl.java
Bug CS-14448: Wrong error message on using the createVlanIpRange cmd
Cherry-picking from master for bug 14448 into 3.0.x. Resolving
conflicts arising from the pick.
Description:
Modifying the API functions' exception handling to call
addProxyObject() wherever applicable, and removing some
wrong calls to addProxyObject() that were put in in an
earlier commit for this bug.
With this commit, we cover many API functions to use the
new exception handling code, but some pieces may still be
left out. These will be covered as work in progress, when
making changes to the CS API code.
Conflicts:
server/src/com/cloud/network/NetworkManagerImpl.java
server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java
server/src/com/cloud/resource/ResourceManagerImpl.java
Bug CS-14448: Wrong error message on using the createVlanIpRange cmd
Cherry-picking from master for bug 14448 into 3.0.x. Modified the
pick to resolve some conflicts.
Description:
Removed some wrong invocations to addProxyObject() when
throwing exceptions in NetworkManagerImpl.java.
Replaced db ids with uuids in various points in the code
of NetworkManagerImpl.java, where exceptions are thrown.
Conflicts:
server/src/com/cloud/network/NetworkManagerImpl.java
Bug CS-14448: Wrong error message on using the createVlanIpRange cmd
Cherry-picking from master for bug 14448 into 3.0.x.
Description:
Replacing placement of db ids in exception messages to uuids
in the file ManagementServerImpl.java.
Since there are a large number of files that throw exceptions
with db ids in them and they need to be changed, we will make
the changes in multiple commits.
Bug CS-14448: Wrong error message on using the createVlanIpRange cmd
Cherry-picking from master for bug 14448 into 3.0.x.
Description:
Adding a new class AnnotationHelper, that provides routines
to read annotations from a VO class.
Cloudstack does the mapping between cloudstack java VO objects
and the database tables using cglib. cglib creates proxy objects
as the maps between VO objects and the database. A VO (value
object) class is populated after querying from the MYSQL database.
Ideally, a getAnnotation() issued on a cglib proxy object should
get a list of all the annotations in all classes in the inheritence
chain. However, this functionality seems to be currently broken
in cglib. Hence, when querying for annotations given the object
of a VO class, we need to get to the corresponding VO class of that
cglib proxy class and issue a getAnnotation() on that class. To get
the VO class, we simply need to get the super class of the proxy
object. Also, we need to recurse to the root VO class in case the
VO class extends another VO class.
Note that the cache used by CS is ehcache.
Conflicts:
server/src/com/cloud/server/ManagementServerImpl.java
2) Added new parameter to listNetworks command - canUseForDeploy(boolean). When true, list only networks that can be used for vm deployment (networks have enough ip addresses to allocate from for the vm)
Conflicts:
api/src/com/cloud/api/ApiConstants.java
api/src/com/cloud/api/commands/ListNetworksCmd.java
api/src/com/cloud/api/response/NetworkResponse.java
api/src/com/cloud/network/NetworkService.java
server/src/com/cloud/api/ApiDBUtils.java
server/src/com/cloud/api/ApiResponseHelper.java
server/src/com/cloud/network/NetworkManagerImpl.java
server/src/com/cloud/network/dao/IPAddressDao.java
server/src/com/cloud/network/dao/IPAddressDaoImpl.java
Multinode Management server - Not able to put the host in maintanace mode when the request is issed from the management server that is not the owner of the host
resolved fixed
reviewed-by: edison
Because there are more commands after GetDomRVersion command. Though
GetDomRVersion command itself is not that critical, the commands after it may
including DHCP and firewall related commands. The failure of GetDomRVersion
command would result in the following commands fail to be executed. So it should
fail, and fail loudly.
2) Don't allow to add new networks/implement existing ones for VPC in Disabled state. Disabled state indicates that there was unsuccessful attempt to remove the VPC, and the further cleanup will be taken care of by cleanup thread.