GitHub user PPisz added a comment to the discussion: snapshot physical size for
the primary storage resource
<p>Thanks for the pointer. I've checked and the commit is indeed in
<code>4.22.1.0</code> and <code>4.20.3.0</code>, and we <strong>are</strong> on
<code>4.22.1.0</code> right now (<code>apt-cache policy cloudstack-management →
Installed: 4.22.1.0</code>).</p>
<p>However, PR #12481 (per its title "<em>Update the snapshot physical size for
the <strong>primary storage resource</strong> after snapshot creation and
during <strong>resource count recalculation</strong>"</em>) and its parent
issue #11441 ("<em>Snapshot Size Not Counted in <strong>Primary Storage
Quota</strong></em>") fix a <strong>resource-count / quota</strong> bug — i.e.
how <code>cloud.resource_count</code> tracks snapshot sizes against
primary-storage quota. Files touched are
<code>ResourceLimitManagerImpl.java</code>,
<code>SnapshotDataStoreDao(Impl).java</code>,
<code>SnapshotManagerImpl.java</code>, etc.</p>
<p>The bug we're hitting is in a <strong>different subsystem</strong>: the
Usage Sanity Check (<code>UsageSanityChecker.java</code>). Specifically the
"snapshot after removed" check, whose query is roughly:</p>
<pre><code class="language-sql">SELECT count(*)
FROM cloud_usage.cloud_usage cu
JOIN cloud.snapshots s ON cu.usage_id = s.id
WHERE cu.usage_type = 9
AND cu.start_date > s.removed;
</code></pre>
<p>i.e. <strong>usage records in <code>cloud_usage.cloud_usage</code> with a
<code>start_date</code> AFTER the snapshot was already soft-deleted in
<code>cloud.snapshots</code></strong>. This drives the <code>Usage Sanity Check
failed</code> mailer and feeds our Prometheus exporter.</p>
<p>On the running <code>4.22.1.0</code> (which includes 83ce006) we
<strong>still see</strong>:</p>
check | count
-- | --
snapshot_after_removed | 160
volume_after_removed | 36
template_after_removed | 0
vm_after_destroyed | 0
GitHub link:
https://github.com/apache/cloudstack/discussions/13398#discussioncomment-17321658
----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]