CLOUDSTACK-3774: NPE while creating template from snapshot on a upgraded setup. After upgrade the SSVM was staying in connecting/alert state. This was because while handling the processConnect command for ssvm the management server was trying to template sync. For resource limit calculation it was trying to get the remote size of the template. If the template was no longer available a number format exception was thrown. The process connect wasn't getting completed and the ssvm used to stay in connecting/alert state. While creating template from snapshot cloudstack looks for up and enabled ssvms and because there wasn't any available (as the ssvm was in coonecting/alert state) it used to pick the wrong resource (LocalNfs*Resource) instead of the NfsSecondaryStorageResource.
CLOUDSTACK-3774: NPE while creating template from snapshot on a upgraded setup.
After upgrade the SSVM was staying in connecting/alert state. This was because
while handling the processConnect command for ssvm the management server was
trying to template sync. For resource limit calculation it was trying to get the
remote size of the template. If the template was no longer available a number
format exception was thrown. The process connect wasn't getting completed and
the ssvm used to stay in connecting/alert state. While creating template from
snapshot cloudstack looks for up and enabled ssvms and because there wasn't
any available (as the ssvm was in coonecting/alert state) it used to pick the
wrong resource (LocalNfs*Resource) instead of the NfsSecondaryStorageResource.

Fixed the issue by making sure number format exceptions are avoided so that
SSVM moves to the right state.

mufaddalq/cloudstack-datera-driver,mufaddalq/cloudstack-datera-driver,mufaddalq/cloudstack-datera-driver,mufaddalq/cloudstack-datera-driver,mufaddalq/cloudstack-datera-driver,mufaddalq/cloudstack-datera-driver