You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by "nxsbi (via GitHub)" <gi...@apache.org> on 2024/07/19 02:49:35 UTC
[I] Snapshot usage reported incorrectly when number of Daily Snapshot less than the snapshot.delta.max [cloudstack]
nxsbi opened a new issue, #9416:
URL: https://github.com/apache/cloudstack/issues/9416
<!--
Verify first that your issue/request is not already reported on GitHub.
Also test if the latest release and main branch are affected too.
Always add information AFTER of these HTML comments, but no need to delete the comments.
-->
##### ISSUE TYPE
<!-- Pick one below and delete the rest -->
* Bug Report
##### COMPONENT NAME
<!--
Categorize the issue, e.g. API, VR, VPN, UI, etc.
-->
~~~
UI
~~~
##### CLOUDSTACK VERSION
<!--
New line separated list of affected versions, commit ID for issues on main branch.
-->
~~~
4.19
~~~
##### CONFIGURATION
<!--
Information about the configuration if relevant, e.g. basic network, advanced networking, etc. N/A otherwise
-->
XCP_NG 8, Cloudstack 4.19
##### OS / ENVIRONMENT
<!--
Information about the environment if relevant, N/A otherwise
-->
NA
##### SUMMARY
<!-- Explain the problem/feature briefly -->
When a user sets up recurring volume snapshot, if the number of snapshots to keep (example 3) is less than the snapshot.delta.max (example 7), it creates a chain of 7, but the cloud_usage table shows as if the first 4 snapshots were destroyed, while the physically continue to exist and take up secondary storage space. This is creating artifically low secondary storage usage and creates billing challenges as well as shows incorrect information to users.
NOTE - this used to work correctly in 4.17 (I upgraded from 4.17 to 4.19 recently - I skipped 4.18).
##### STEPS TO REPRODUCE
<!--
For bugs, show exactly how to reproduce the problem, using a minimal test-case. Use Screenshots if accurate.
For new features, show how the feature would be used.
-->
<!-- Paste example playbooks or commands between quotes below -->
~~~
Set up global config snapshot.delta.max = 7.
Setup a Volume recurring snapshot with Keep = 3 (I only used the Daily option).
Observe the cloud_usage table. On Fourth day, you will notice that there are 4 physical snapshots present in secondary storage due to chaining, but the usage for 4th day only shows as if 3 were in use.
~~~
<!-- You can also paste gist.github.com links for larger files -->
##### EXPECTED RESULTS
<!-- What did you expect to happen when running the steps above? -->
~~~
The entire snapshot chain should be shown in the cloud_usage for each date regardless of the number of snapshots to keep.
~~~
##### ACTUAL RESULTS
<!-- What actually happened? -->
<!-- Paste verbatim command output between quotes below -->
~~~
Only the last 3 snapshots are shown as existing ones.
~~~
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Snapshot usage reported incorrectly when number of Daily Snapshot less than the snapshot.delta.max [cloudstack]
Posted by "nxsbi (via GitHub)" <gi...@apache.org>.
nxsbi commented on issue #9416:
URL: https://github.com/apache/cloudstack/issues/9416#issuecomment-2245853426
Hello, Yes the storage.cleanup.enabled = True
You are correct in that the snapshot is marked as Destroyed, but snapshot_store_ref still shows it as Ready. But keep in mind that this is part of a chain, so it cannot be deleted until it reaches the snapshot.delta.max = 7 + Keep 3
The "Destroyed" is set based on "Keep X snapshots" that is set by users. In the usage side of it, it does not list the Destroyed snapshot.
What I am saying is that logical "Destroyed" makes sense from user perspective, but not from usage perspective. In Usage perspective, it should show all the chain vhd files as USAGE.
Example below - Whats happening is that (in example below) on Jul 25, usage would only show 500 + 8 + 11 = 519 GB, where as in reality it is using (1096 GB ===500+25+33+10+9+11+8+500. What I am asking is that it should show the 1096 GB as used.
It may be helpful to show on UI to the users that the snapshot is base or incremental.

--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Snapshot usage reported incorrectly when number of Daily Snapshot less than the snapshot.delta.max [cloudstack]
Posted by "nxsbi (via GitHub)" <gi...@apache.org>.
nxsbi commented on issue #9416:
URL: https://github.com/apache/cloudstack/issues/9416#issuecomment-2251794037
I see your point @DaanHoogland
2 things come to mind
1. Yes, one column that is aligned to physical data store - does the file exist - Yes or No - this needs to be added. Second column that shows client recorvery available Yes/No (this is exactly what the current "status" column shows).
2. I would suggest that instead of showing the size of the physical size of the last chain vhd file, we shold show the total chain size. This way the client can see that on Day 1 its the physical size used, which grows until day 7, and when a full snapshot takes palce, it resets to new disk size. Reasoning = many of these snapshots can be of a few MB in size on daily basis while base disk is 500 GB. So if the 3 sizes are only 100 MB for last 3 snapshots, but as a provider we have to provide free 500GB storage for base snapshot, its not right for provider - and in reality is the total that is stored, So showing the total chain size is closest thing to reality for client as well.
Note - I have had question from client as why sometimes the snapshot size on the UI shows as 0.1 GB when the disk is 500GB.
I will be happy to do testing of any development that is done for this (althrough someone will need to provide me the install files of the release candidate)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Snapshot usage reported incorrectly when number of Daily Snapshot less than the snapshot.delta.max [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on issue #9416:
URL: https://github.com/apache/cloudstack/issues/9416#issuecomment-2249766653
@nxsbi , are you proposing an extra status to signify usage-unusable vs usable?
I am asking because at first sight a user would find it unfair they get charged for a snapshot they can not use. They might even argue that it is not their responcibility it is being kept around
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Snapshot usage reported incorrectly when number of Daily Snapshot less than the snapshot.delta.max [cloudstack]
Posted by "sureshanaparti (via GitHub)" <gi...@apache.org>.
sureshanaparti commented on issue #9416:
URL: https://github.com/apache/cloudstack/issues/9416#issuecomment-2244450538
It seems the snapshots in the chain are marked as destroyed, but not removed. These will be removed by the storage garbage collector. So, maybe these are not counted in usage. Some related some ref below.
https://github.com/apache/cloudstack/blob/54c8b71fb5452f25b2d9b1d4007ebe5b6a3fc085/engine/storage/snapshot/src/main/java/org/apache/cloudstack/storage/snapshot/DefaultSnapshotStrategy.java#L364-L369
https://github.com/apache/cloudstack/blob/54c8b71fb5452f25b2d9b1d4007ebe5b6a3fc085/engine/storage/snapshot/src/main/java/org/apache/cloudstack/storage/snapshot/DefaultSnapshotStrategy.java#L204-L210
@nxsbi Have you noticed any log like "_we will mark the snapshot as destroyed for future garbage collecting_"? Is the storage garbage cleanup enabled (setting: _storage.cleanup.enabled_)?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Snapshot usage reported incorrectly when number of Daily Snapshot less than the snapshot.delta.max [cloudstack]
Posted by "abh1sar (via GitHub)" <gi...@apache.org>.
abh1sar commented on issue #9416:
URL: https://github.com/apache/cloudstack/issues/9416#issuecomment-3130409515
@nxsbi After talking to a few folks, approach 2 suggested by you is making a lot of sense.
We should be showing chain size along with physical size for incremental snapshots.
So if we have an incremental snapshot size 100MB and the full parent snapshot of size 1GB, and the parent snapshot is deleted, the users should see the physical size of the incremental snapshot as 100MB and the chain size as 1.1GB.
This way the user is aware that the snapshot is actually not taking only 100MB of disk space.
I have raised a PR https://github.com/apache/cloudstack/pull/11313 for this.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Snapshot usage reported incorrectly when number of Daily Snapshot less than the snapshot.delta.max [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland closed issue #9416: Snapshot usage reported incorrectly when number of Daily Snapshot less than the snapshot.delta.max
URL: https://github.com/apache/cloudstack/issues/9416
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org