I have looked into mysql log:
mysql> SELECT template_host_ref.id, template_host_ref.host_id,
template_host_ref.template_id, template_host_ref.created,
template_host_ref.last_updated, template_host_ref.download_pct,
template_host_ref.size, template_host_ref.physical_size,
template_host_ref.download_state, template_host_ref.local_path,
template_host_ref.error_str, template_host_ref.job_id,
template_host_ref.install_path, template_host_ref.url,
template_host_ref.is_copy, template_host_ref.destroyed FROM
template_host_ref WHERE template_host_ref.host_id = 39 AND
template_host_ref.template_id = 3 AND template_host_ref.destroyed = 0
ORDER BY RAND() LIMIT 1 \G
*************************** 1. row ***************************
id: 81
host_id: 39
template_id: 3
created: 2013-05-14 15:07:20
last_updated: 2013-06-04 09:08:55
download_pct: 100
size: 2097152000
physical_size: 725811200
download_state: DOWNLOADED
local_path:
/mnt/SecStorage/e0224990-efe1-3639-b003-9606b3c1503c/template/tmpl/1/3/dnld1781418341561836563tmp_
error_str: Install completed successfully at 5/14/13 3:17 PM
job_id: 721cb827-0fdd-48da-ad02-be2a833962eb
install_path: template/tmpl/1/3/75b07fdd-f23f-4481-aebb-ecbade8fd1dc.qcow2
url:
http://download.cloud.com/templates/acton/acton-systemvm-02062012.qcow2.bz2
is_copy: 0
destroyed: 0
1 row in set (0.00 sec)
file template/tmpl/1/3/75b07fdd-f23f-4481-aebb-ecbade8fd1dc.qcow2 is
present on secondary storage 39:
-rw-r--r-- 1 root root 725811200 Jun 6 09:50
template/tmpl/1/3/75b07fdd-f23f-4481-aebb-ecbade8fd1dc.qcow2
However I still get "Can't find a template to start" messages in management
server log.
I suppose, this error is been generated at
server/src/com/cloud/storage/secondary/SecondaryStorageManagerImpl.java:
HypervisorType hypeType =
_resourceMgr.getAvailableHypervisor(dataCenterId);
VMTemplateVO template =
_templateDao.findSystemVMTemplate(dataCenterId, hypeType);
if (template == null) {
s_logger.debug("Can't find a template to start");
throw new CloudRuntimeException("Insufficient capacity
exception");
}
and server/src/com/cloud/storage/dao/VMTemplateDaoImpl.java
public VMTemplateVO findSystemVMTemplate(long zoneId,
HypervisorType hType) {
SearchCriteria<VMTemplateVO> sc = tmpltTypeHyperSearch.create();
sc.setParameters("templateType", Storage.TemplateType.SYSTEM);
sc.setJoinParameters("tmplHyper", "type", Host.Type.Routing);
sc.setJoinParameters("tmplHyper", "zoneId", zoneId);
//order by descending order of id
List<VMTemplateVO> tmplts = listBy(sc, new
Filter(VMTemplateVO.class, "id", false, null, null));
for (VMTemplateVO tmplt: tmplts) {
if (tmplt.getHypervisorType() == hType) {
return tmplt;
}
}
if (tmplts.size() > 0 && hType == HypervisorType.Any) {
return tmplts.get(0);
}
return null;
}
On Thu, Jun 6, 2013 at 10:08 PM, Valery Ciareszka <[email protected]
> wrote:
> Hello,
>
> After upgrading from 4.0.2 to 4.1.0 (centos 6.4, kvm), console proxy
> stopped working.
>
> I destroyed ssvm and cpvm, and now ssvm could not be created:
>
> 2013-06-05 11:35:28,940 DEBUG
> [storage.secondary.SecondaryStorageManagerImpl] (secstorage-1:null) Zone 1
> is ready to launch secondary storage VM
> 2013-06-05 11:35:28,965 INFO
> [cloud.secstorage.PremiumSecondaryStorageManagerImpl] (secstorage-1:null)
> No running secondary storage vms found in datacenter id=1, starting one
> 2013-06-05 11:35:28,990 INFO
> [storage.secondary.SecondaryStorageManagerImpl] (secstorage-1:null) No
> stopped secondary storage vm is available, need to allocate a new secondary
> storage vm
> 2013-06-05 11:35:28,993 DEBUG
> [storage.secondary.SecondaryStorageManagerImpl] (secstorage-1:null) Assign
> secondary storage vm from a newly started instance for request from data
> center : 1
> 2013-06-05 11:35:29,155 DEBUG [cloud.network.NetworkManagerImpl]
> (secstorage-1:null) Found existing network configuration for offering
> [Network Offering [1-Public-System-Public-Network]: Ntwk[200|Public|1]
> 2013-06-05 11:35:29,156 DEBUG [cloud.network.NetworkManagerImpl]
> (secstorage-1:null) Releasing lock for Acct[1-system]
> 2013-06-05 11:35:29,162 DEBUG [cloud.network.NetworkManagerImpl]
> (secstorage-1:null) Found existing network configuration for offering
> [Network Offering [3-Control-System-Control-Network]: Ntwk[202|Control|3]
> 2013-06-05 11:35:29,162 DEBUG [cloud.network.NetworkManagerImpl]
> (secstorage-1:null) Releasing lock for Acct[1-system]
> 2013-06-05 11:35:29,167 DEBUG [cloud.network.NetworkManagerImpl]
> (secstorage-1:null) Found existing network configuration for offering
> [Network Offering [2-Management-System-Management-Network]:
> Ntwk[201|Management|2]
> 2013-06-05 11:35:29,167 DEBUG [cloud.network.NetworkManagerImpl]
> (secstorage-1:null) Releasing lock for Acct[1-system]
> 2013-06-05 11:35:29,173 DEBUG [cloud.network.NetworkManagerImpl]
> (secstorage-1:null) Found existing network configuration for offering
> [Network Offering [4-Storage-System-Storage-Network]: Ntwk[203|Storage|4]
> 2013-06-05 11:35:29,173 DEBUG [cloud.network.NetworkManagerImpl]
> (secstorage-1:null) Releasing lock for Acct[1-system]
> 2013-06-05 11:35:29,190 DEBUG
> [storage.secondary.SecondaryStorageManagerImpl] (secstorage-1:null) Can't
> find a template to start
> 2013-06-05 11:35:29,191 WARN [cloud.vm.SystemVmLoadScanner]
> (secstorage-1:null) Unexpected exception Insufficient capacity exception
> com.cloud.utils.exception.CloudRuntimeException: Insufficient capacity
> exception
> at
> com.cloud.storage.secondary.SecondaryStorageManagerImpl.createSecStorageVmInstance(SecondaryStorageManagerImpl.java:577)
>
> I downgraded CS to 4.0.2 and restored mysql backup to 4.0.2 (just before
> to upgrade), but still have the same error messages.
>
> How do I fix this issue ?
>
> --
> Regards,
> Valery
>
> http://protocol.by/slayer
>
--
Regards,
Valery
http://protocol.by/slayer