You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2022/10/14 03:23:26 UTC

[GitHub] [cloudstack] nxsbi opened a new issue, #6827: Zero size recurring snapshots piling up after server is shutdown

nxsbi opened a new issue, #6827:
URL: https://github.com/apache/cloudstack/issues/6827

   <!--
   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, Snapshot
   -->
   ~~~
   
   ~~~
   
   ##### CLOUDSTACK VERSION
   <!--
   New line separated list of affected versions, commit ID for issues on main branch.
   -->
   
   ~~~
   4.17
   ~~~
   
   ##### CONFIGURATION
   <!--
   Information about the configuration if relevant, e.g. basic network, advanced networking, etc.  N/A otherwise
   -->
   N/A
   
   ##### OS / ENVIRONMENT
   <!--
   Information about the environment if relevant, N/A otherwise
   -->
   N/A
   
   ##### SUMMARY
   <!-- Explain the problem/feature briefly -->
   
   
   User has recurring snapshots on a Volume with KEEP 5 setting. 
   There are snapshots present already and 5 are seen in UI. 
   User shuts down the VM and leaves it off for several days. 
   Each day, there is a ZERO size snapshot entry made, but in backend it points to the same last snapshot (checked via SQL).
   But on Display there are tens of snapshots present and this counts against the MAX 100 snapshots per account (I know I can increase this to higher number). 
   Users are confused why so many snapshots. 
   
   NOTE  - as a technical person, I understand why having the Zero size snapshot entry makes sense - essentially shows that the process ran as expected. However from user perspective, it is confusing especially when the server is down for weeks, and they come back to Max snapshots exceeded errors. 
   
   ##### 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 -->
   ~~~
   User has recurring snapshots on a Volume with KEEP 5 setting. 
   There are snapshots present already and 5 are seen in UI. 
   User shuts down the VM and leaves it off for several days. 
   Each day, there is a ZERO size snapshot entry made, but in backend it points to the same last snapshot (checked via SQL).
   But on Display there are tens of snapshots present and this counts against the MAX 100 snapshots per account (I know I can increase this to higher number). 
   Users are confused why so many snapshots. 
   ~~~
   
   <!-- You can also paste gist.github.com links for larger files -->
   
   ##### EXPECTED RESULTS
   <!-- What did you expect to happen when running the steps above? -->
   
   ~~~
   
   1. Zero size snapshots should not show up in the UI, and should not form a dependency in the cloud database's snapshot table. 
   OR Perhaps indicate zero size snapshot in the UI so users know without contacting Admins.
   
   2. The zero size snapshots should not count against the Max 100 limit. 
   ~~~
   
   ##### ACTUAL RESULTS
   <!-- What actually happened? -->
   
   <!-- Paste verbatim command output between quotes below -->
   ~~~
   zero size snapshots count against max snapshots.
   large number of snapshots in UI confuses the users
   ~~~
   


-- 
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


[GitHub] [cloudstack] nxsbi commented on issue #6827: Zero size recurring snapshots piling up after server is shutdown

Posted by GitBox <gi...@apache.org>.
nxsbi commented on issue #6827:
URL: https://github.com/apache/cloudstack/issues/6827#issuecomment-1279764045

   @DaanHoogland  - By Server/VM I mean the Instance. 
   
   Your question about what if the volume is detached - there is now way to know when it was detached or if vm was running -- I think in that case, there should be snapshot taken as per schedule. In this case since it cannot be guaranteed whether there was a change or not, then take snapshot - this could result in zero snapshot size. I don't know if there is a better way? May be the could be post processing? I mean, after the snapshot is taken, check if the snapshot size is zero - if it is zero then call delete snapshot? 


-- 
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


[GitHub] [cloudstack] DaanHoogland commented on issue #6827: Zero size recurring snapshots piling up after server is shutdown

Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on issue #6827:
URL: https://github.com/apache/cloudstack/issues/6827#issuecomment-1280744316

   > @DaanHoogland - By Server/VM I mean the Instance.
   > 
   > Your question about what if the volume is detached - there is now way to know when it was detached or if vm was running -- I think in that case, there should be snapshot taken as per schedule. In this case since it cannot be guaranteed whether there was a change or not, then take snapshot - this could result in zero snapshot size. I don't know if there is a better way? May be the could be post processing? I mean, after the snapshot is taken, check if the snapshot size is zero - if it is zero then call delete snapshot?
   
   @nxsbi please edit the description as required.


-- 
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


[GitHub] [cloudstack] DaanHoogland commented on issue #6827: Zero size recurring snapshots piling up after server is shutdown

Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on issue #6827:
URL: https://github.com/apache/cloudstack/issues/6827#issuecomment-1278770596

   @nxsbi , this sounds like a valid enhancement request. as I understand it you want:
   a snapshot schedule to start by checking if the volume is attached to a vm that runs. If not abandon.


-- 
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


[GitHub] [cloudstack] DaanHoogland commented on issue #6827: Zero size recurring snapshots piling up after server is shutdown

Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on issue #6827:
URL: https://github.com/apache/cloudstack/issues/6827#issuecomment-1279762589

   @nxsbi you must mean the VM by server, right? I think it is to much administration to record which host and when the VM was running on.
   Your request seems mostly solid otherwise. I'll redact the `server` to `VM` and add it to the description above.
   There is one case missing though: what if there is a volume with snapshots that is not attached to a VM? One can not determine in this case to which VM it was attached at what time and whether (any of) the VM(s) was running. 
   
   


-- 
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] Zero size recurring snapshots piling up after server is shutdown [cloudstack]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #6827:
URL: https://github.com/apache/cloudstack/issues/6827#issuecomment-5336586798

   This issue is stale because it has been open for 120 days with no activity. It may be removed by administrators of this project at any time. Remove the stale label or comment to request for removal of it to prevent 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


[GitHub] [cloudstack] nxsbi commented on issue #6827: Zero size recurring snapshots piling up after server is shutdown

Posted by GitBox <gi...@apache.org>.
nxsbi commented on issue #6827:
URL: https://github.com/apache/cloudstack/issues/6827#issuecomment-1279388966

   @DaanHoogland  - Thanks for the quick reply -- In general, yes, but adding detail to how I see it should work:
   
   Snapshot taking process should follow the following logic: 
   
   1. If there are zero snapshots but there is a recurring schedule set, then it should still take the first snapshot for completion sake (regardless if server is up or down or the Volume is detached). 
   2. If there are existing snapshots, and the server was up after the last snapshot, then take a snapshot (regardless of whether the server is currently up or down or volume is detached since then)
   3. If there are existing snapshots, but the server is currently down, AND the last snapshot was after the server was shutdown, Skip the snapshot and then ADD EVENT - SKIPPING Snapshot for Volume ROOT-X/DATA-X indicating that it is skipped because server is not running - this Event will help reduce future confusion when someone starts the server and thinks that bunch of days of snapshots are missing
    


-- 
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


[GitHub] [cloudstack] weizhouapache commented on issue #6827: Zero size recurring snapshots piling up after server is shutdown

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on issue #6827:
URL: https://github.com/apache/cloudstack/issues/6827#issuecomment-1429413712

   what I understand, if the volume is not changed after last snapshot, then do not create snapshot.
   
   For example, in a period,
   - disk is not attached
   - disk is attached but vm is stopped
    
   Each volume has the following info in database
   ```
                     attached: NULL
                      updated: 2023-02-13 09:03:59
                      removed: NULL
                        state: Ready
   ```
   
   Each vm instance has the info
   ```
                update_time: 2023-02-08 13:49:22
                    created: 2023-01-21 15:42:52
                    removed: NULL
   ...
                power_state: PowerOn
    power_state_update_time: 2023-02-13 17:06:59
   power_state_update_count: 3
                 power_host: 1
   ```
   
   for snapshots
   ```
               uuid: ad841072-70f0-4761-90af-6a718a06872a
      snapshot_type: 4
   type_description: DAILY
               size: 8589934592
            created: 2023-01-05 00:13:21
            removed: NULL
     backup_snap_id: NULL
           swift_id: NULL
         sechost_id: NULL
       prev_snap_id: NULL
   ```
   
   I think it is feasible based on the information above.


-- 
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