cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Darren Shepherd <>
Subject issues with storage capacity on mgmt restart
Date Tue, 22 Oct 2013 07:47:38 GMT
I've noticed that when I bring up my mgmt server theres a period of
time in which the storage capacity numbers are wrong.  When the mgmt
server starts I deploy a VM and it fails because the below message
indicates storage is at 124% used

Checking pool 2 for storage, totalSize: 33808039936, usedBytes:
41965518848, usedPct: 1.24128813523181, disable threshold: 0.85

After waiting a minute or so and deploying a VM it will work and print
the following.

Checking pool 2 for storage, totalSize: 33808039936, usedBytes:
4969705472, usedPct: 0.14699774022415543, disable threshold: 0.85

Notice the used bytes drastically decreased.  So I debugged this and
got to this strange code in
StorageManagerImpl.checkUsageSpace(StoragePool pool)

            StorageStats stats = sc.getStoragePoolStats(pool.getId());
            if (stats == null) {
                stats = sc.getStorageStats(pool.getId());

So it looks for stats for the storage pool, and if it doesn't find it
it calls getStorageStats().  But I believe getStorageStats() is for
secondary.  So what is happening is that my primary and secondary
storage happen to have the same IDs.  So when the primary storage
stats haven't been cached its getting the secondary storage stats
which are wrong.  So something needs to change here.


View raw message