cloudstack-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Indra Pramana <in...@sg.or.id>
Subject Re: Unable to create instance after upgrading to CloudStack 4.2.0
Date Tue, 01 Oct 2013 18:05:59 GMT
Dear all,

Further investigation reveals that there might be some issues with the
schema upgrade. When we check the resource_count table for the account ID:

mysql> select * from resource_count where account_id=2;
+----+------------+-----------+-----------+-------+
| id | account_id | domain_id | type      | count |
+----+------------+-----------+-----------+-------+
| 17 |          2 |      NULL | user_vm   |    30 |
| 18 |          2 |      NULL | public_ip |     4 |
| 19 |          2 |      NULL | volume    |    40 |
| 20 |          2 |      NULL | snapshot  |     1 |
| 21 |          2 |      NULL | template  |    40 |
| 22 |          2 |      NULL | project   |     0 |
| 23 |          2 |      NULL | network   |     2 |
| 24 |          2 |      NULL | vpc       |     0 |
+----+------------+-----------+-----------+-------+

There's no 'primary_storage' type there. In comparison, Abhinav's database
contains the details:

mysql> SELECT * FROM cloud.resource_count where account_id=2;
+----+------------+-----------+-------------------+-------------+
| id | account_id | domain_id | type              | count       |
+----+------------+-----------+-------------------+-------------+
| 17 |          2 |      NULL | user_vm           |           4 |
| 18 |          2 |      NULL | public_ip         |           1 |
| 19 |          2 |      NULL | volume            |           3 |
| 20 |          2 |      NULL | snapshot          |           3 |
| 21 |          2 |      NULL | template          |           1 |
| 22 |          2 |      NULL | project           |           0 |
| 23 |          2 |      NULL | network           |           2 |
| 24 |          2 |      NULL | vpc               |           1 |
| 33 |          2 |      NULL | cpu               |           2 |
| 34 |          2 |      NULL | memory            |        1536 |
| 35 |          2 |      NULL | primary_storage   |  8589934592 |
| 36 |          2 |      NULL | secondary_storage | 27866955776 |
+----+------------+-----------+-------------------+-------------+

These types are missing from my resource_count table for each of the
accounts:

| 33 |          2 |      NULL | cpu               |           2 |
| 34 |          2 |      NULL | memory            |        1536 |
| 35 |          2 |      NULL | primary_storage   |  8589934592 |
| 36 |          2 |      NULL | secondary_storage | 27866955776 |

I tried to re-do the schema upgrade manually pertaining to that particular
table, which is part of this section under:

/usr/share/cloudstack-management/setup/db/schema-410to420.sql

DROP VIEW IF EXISTS `cloud`.`account_view`;
CREATE VIEW `cloud`.`account_view` AS

But I am still not able to get the four types (cpu, memory,
primary_storage, secondary_storage) to appear on my resource_count table.

Anyone can help? This is my third attempt to upgrade to 4.2.0 and I don't
want to revert back again now.

Looking forward to your reply, thank you.

Cheers.



On Wed, Oct 2, 2013 at 12:49 AM, Indra Pramana <indra@sg.or.id> wrote:

> Dear all,
>
> I am having problems of unable to create new instances after upgrading to
> 4.2.0. The error message is:
>
> Failed to increment resource count of type primary_storage for account id=2
>
> Excerpt from management-server.log:
>
> ====
> 2013-10-02 00:40:57,770 DEBUG [cloud.api.ApiServlet]
> (catalina-exec-15:null) ===START===  -- GET
> command=queryAsyncJobResult&jobId=183063da-fb08-425b-8057-157e33320674&response=json&sessionkey=VEyky3f1rsQVfLVs9pGg2sXh60o%3D&_=1380645646739
> 2013-10-02 00:40:57,785 DEBUG [cloud.api.ApiDispatcher]
> (catalina-exec-16:null) InfrastructureEntity name
> is:com.cloud.offering.ServiceOffering
> 2013-10-02 00:40:57,791 DEBUG [cloud.api.ApiDispatcher]
> (catalina-exec-16:null) ControlledEntity name
> is:com.cloud.template.VirtualMachineTemplate
> 2013-10-02 00:40:57,795 DEBUG [cloud.api.ApiDispatcher]
> (catalina-exec-16:null) ControlledEntity name is:com.cloud.network.Network
> 2013-10-02 00:40:57,798 DEBUG [cloud.api.ApiDispatcher]
> (catalina-exec-16:null) InfrastructureEntity name
> is:com.cloud.offering.DiskOffering
> 2013-10-02 00:40:57,813 DEBUG [cloud.network.NetworkModelImpl]
> (catalina-exec-16:null) Service SecurityGroup is not supported in the
> network id=238
> 2013-10-02 00:40:57,828 DEBUG [cloud.api.ApiServlet]
> (catalina-exec-15:null) ===END===  -- GET
> command=queryAsyncJobResult&jobId=183063da-fb08-425b-8057-157e33320674&response=json&sessionkey=VEyky3f1rsQVfLVs9pGg2sXh60o%3D&_=1380645646739
> 2013-10-02 00:40:57,867 DEBUG [cloud.vm.UserVmManagerImpl]
> (catalina-exec-16:null) Allocating in the DB for vm
> 2013-10-02 00:40:57,887 DEBUG [cloud.vm.VirtualMachineManagerImpl]
> (catalina-exec-16:null) Allocating entries for VM: VM[User|Test-Upgrade-420]
> 2013-10-02 00:40:57,888 DEBUG [cloud.vm.VirtualMachineManagerImpl]
> (catalina-exec-16:null) Allocating nics for VM[User|Test-Upgrade-420]
> 2013-10-02 00:40:57,889 DEBUG [cloud.network.NetworkManagerImpl]
> (catalina-exec-16:null) Allocating nic for vm VM[User|Test-Upgrade-420] in
> network Ntwk[238|Guest|7] with requested profile
> NicProfile[0-0-null-null-null
> 2013-10-02 00:40:57,909 DEBUG [cloud.network.NetworkModelImpl]
> (catalina-exec-16:null) Service SecurityGroup is not supported in the
> network id=238
> 2013-10-02 00:40:57,911 DEBUG [cloud.vm.VirtualMachineManagerImpl]
> (catalina-exec-16:null) Allocating disks for VM[User|Test-Upgrade-420]
> 2013-10-02 00:40:57,930 ERROR
> [cloud.resourcelimit.ResourceLimitManagerImpl] (catalina-exec-16:null)
> Failed to update resource count for account id=2
> 2013-10-02 00:40:57,931 DEBUG [db.Transaction.Transaction]
> (catalina-exec-16:null) Rolling back the transaction: Time = 74 Name =
> createVirtualMachine; called by
> -Transaction.rollback:898-Transaction.removeUpTo:841-Transaction.close:665-TransactionContextBuilder.interceptComplete:56-ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept:131-ResourceLimitManagerImpl.incrementResourceCount:238-VolumeManagerImpl.allocateTemplatedVolume:1477-VirtualMachineManagerImpl.allocate:386-ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept:125-CloudOrchestrator.createVirtualMachine:214-UserVmManagerImpl.createVirtualMachine:2867-ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept:125
> 2013-10-02 00:40:57,978 ERROR [cloud.api.ApiServer]
> (catalina-exec-16:null) unhandled exception executing api command:
> deployVirtualMachine
> com.cloud.utils.exception.CloudRuntimeException: Failed to increment
> resource count of type primary_storage for account id=2
> ====
>
> Looking forward to your reply, thank you.
>
> Cheers.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message