You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by "CJBecker (via GitHub)" <gi...@apache.org> on 2024/09/09 19:41:25 UTC

[I] Snapshot defaulting to Phyical Size 0 [cloudstack]

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

   <!--
   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.
   -->
   ~~~
   Snapshot to secondary storage
   ~~~
   
   ##### CLOUDSTACK VERSION
   <!--
   New line separated list of affected versions, commit ID for issues on main branch.
   -->
   4.19.1
   ~~~
   
   ~~~
   
   ##### CONFIGURATION
   <!--
   Information about the configuration if relevant, e.g. basic network, advanced networking, etc.  N/A otherwise
   -->
   
   
   ##### OS / ENVIRONMENT
   <!--
   Information about the environment if relevant, N/A otherwise
   -->
   KVM, NFS secondary storage
   
   ##### SUMMARY
   <!-- Explain the problem/feature briefly -->
   Upgrading from Cloudstack 4.18 to 4.19.1, I see reports in the UI that all snapshots have a 0 Physical Size even when there is a physical size in the database. 
   select * from snapshot_store_ref where snapshot_id=91517\g
   +--------+----------+-------------+---------------------+--------------+--------+------------+-------------+---------------+--------------------+--------------------------------------------------------------------------------------+-------+--------------+---------+---------------------+-----------+----------------+--------------+-----------+---------+------------+
   | id     | store_id | snapshot_id | created             | last_updated | job_id | store_role | size        | physical_size | parent_snapshot_id | install_path                                                                         | state | update_count | ref_cnt | updated             | volume_id | download_state | download_pct | error_str | display | local_path |
   +--------+----------+-------------+---------------------+--------------+--------+------------+-------------+---------------+--------------------+--------------------------------------------------------------------------------------+-------+--------------+---------+---------------------+-----------+----------------+--------------+-----------+---------+------------+
   | 129502 |       69 |       91517 | 2024-09-09 09:00:09 | NULL         | NULL   | Primary    | 85899345920 |   85899345920 |                  0 | cloudstack/1721884e-c618-413b-9f31-4eba9a4acc50/582372a9-a122-4121-b25b-f6ea2d875e38 | Ready |            2 |       0 | 2024-09-09 09:00:10 |     25832 | NULL           |            0 | NULL      |       1 | NULL       |
   | 129505 |        1 |       91517 | 2024-09-09 09:00:10 | NULL         | NULL   | Image      | 85899345920 |   56633131008 |                  0 | snapshots/13511/25832/582372a9-a122-4121-b25b-f6ea2d875e38                           | Ready |            2 |       0 | 2024-09-09 09:04:45 |     25832 | NULL           |            0 | NULL      |       1 | NULL       |
   +--------+----------+-------------+---------------------+--------------+--------+------------+-------------+---------------+--------------------+--------------------------------------------------------------------------------------+-------+--------------+---------+---------------------+-----------+----------------+--------------+-----------+---------+------------+
   2 rows in set (0.000 sec)
   
   I am using local storage with snapshot.backup.to.secondary enabled. I can give more information if needed. 
   
   
   ##### 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 -->
   ~~~
   Snapshot using local storage with snapshot.backup.to.secondary enabled
   ~~~
   
   <!-- You can also paste gist.github.com links for larger files -->
   
   ##### EXPECTED RESULTS
   <!-- What did you expect to happen when running the steps above? -->
   
   ~~~
   Seeing the physical size in the UI as reflected in the database
   ~~~
   
   ##### ACTUAL RESULTS
   <!-- What actually happened? -->
   
   <!-- Paste verbatim command output between quotes below -->
   ~~~
   "physicalsize": 0,
   ~~~
   


-- 
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 defaulting to Physical Size 0 [cloudstack]

Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland closed issue #9660: Snapshot defaulting to Physical Size 0 
URL: https://github.com/apache/cloudstack/issues/9660


-- 
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 defaulting to Physical Size 0 [cloudstack]

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

   fixed in #10216 


-- 
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 defaulting to Phyical Size 0 [cloudstack]

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

   Thanks for opening your first issue here! Be sure to follow the issue template!
   


-- 
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 defaulting to Physical Size 0 [cloudstack]

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

   Same here.. strangely a few volume snapshots show the correct size, most don't.


-- 
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 defaulting to Physical Size 0 [cloudstack]

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

   Same for me, but the other way around, I used secondary storage up until yesterday when I switched that option to primary (ceph pool). All the snapshots are 0 in physical size but they seem to be fine when reverting to them. Confusing.


-- 
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 defaulting to Physical Size 0 [cloudstack]

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

   Also for a test: 
   ```
   UPDATE snapshot_store_ref SET display = 0 WHERE id = 129917;
   Query OK, 1 row affected (0.004 sec)
   Rows matched: 1  Changed: 1  Warnings: 0
   ```
   I can see the correct information via API: 
   ```
   cmk list snapshots id=068b140e-186f-4436-93ec-ba56ebcc1ee7 listall=true filter=physicalsize,virtualsize,state
   {
     "count": 1,
     "snapshot": [
       {
         "physicalsize": 65756332032,
         "state": "BackedUp",
         "virtualsize": 171798691840
       }
     ]
   }
   ```
   I believe that the default behavior in the past with my configuration was to retain the reference information, as in the original post, while displaying the physical size. Unless there's something specific to my setup, but I haven't noticed any errors or messages in the logs.


-- 
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 defaulting to Physical Size 0 [cloudstack]

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

   Hi, The snap posted above has been rotated so I have found a replacement that I was looking at: 
   ```
   select * from snapshot_store_ref where snapshot_id=91820\g
   +--------+----------+-------------+---------------------+--------------+--------+------------+-------------+---------------+--------------------+--------------------------------------------------------------------------------------+-------+--------------+---------+---------------------+-----------+----------------+--------------+-----------+---------+------------+
   | id     | store_id | snapshot_id | created             | last_updated | job_id | store_role | size        | physical_size | parent_snapshot_id | install_path                                                                         | state | update_count | ref_cnt | updated             | volume_id | download_state | download_pct | error_str | display | local_path |
   +--------+----------+-------------+---------------------+--------------+--------+------------+-------------+---------------+--------------------+--------------------------------------------------------------------------------------+-------+--------------+---------+---------------------+-----------+----------------+--------------+-----------+---------+------------+
   | 129928 |       69 |       91820 | 2024-09-10 09:00:09 | NULL         | NULL   | Primary    | 85899345920 |   85899345920 |                  0 | cloudstack/1721884e-c618-413b-9f31-4eba9a4acc50/7dbbbaa9-3671-41fb-9bc1-2430e88c564c | Ready |            2 |       0 | 2024-09-10 09:00:09 |     25832 | NULL          
    |            0 | NULL      |       1 | NULL       |
   | 129931 |        1 |       91820 | 2024-09-10 09:00:09 | NULL         | NULL   | Image      | 85899345920 |   56636145664 |                  0 | snapshots/13511/25832/7dbbbaa9-3671-41fb-9bc1-2430e88c564c                           | Ready |            2 |       0 | 2024-09-10 09:03:52 |     25832 | NULL          
    |            0 | NULL      |       1 | NULL       |
   +--------+----------+-------------+---------------------+--------------+--------+------------+-------------+---------------+--------------------+--------------------------------------------------------------------------------------+-------+--------------+---------+---------------------+-----------+----------------+--------------+-----------+---------+------------+
   2 rows in set (0.000 sec)
   ```
   When I check the UUID via cmk I get: 
   ```
   cmk list snapshots id=3cf61abd-211e-4ddf-bd7c-cabdee7b9634 listall=true filter=physicalsize,virtualsize,state
   {
     "count": 1,
     "snapshot": [
       {
         "physicalsize": 0,
         "state": "BackedUp",
         "virtualsize": 85899345920
       }
     ]
   }
   ```
   It appears to not be just a UI issue. 
   
   Also, when the original post was made I provided a Ceph store, but I see the same with local storage aswell. 
   ```
    select * from snapshot_store_ref where snapshot_id=91808\g
   +--------+----------+-------------+---------------------+--------------+--------+------------+--------------+---------------+--------------------+------------------------------------------------------------------------+-------+--------------+---------+---------------------+-----------+----------------+--------------+-----------+---------+------------+
   | id     | store_id | snapshot_id | created             | last_updated | job_id | store_role | size         | physical_size | parent_snapshot_id | install_path                                                           | state | update_count | ref_cnt | updated             | volume_id | download_state | download_pct | error_str | display | local_path |
   +--------+----------+-------------+---------------------+--------------+--------+------------+--------------+---------------+--------------------+------------------------------------------------------------------------+-------+--------------+---------+---------------------+-----------+----------------+--------------+-----------+---------+------------+
   | 129917 |       52 |       91808 | 2024-09-10 09:00:08 | NULL         | NULL   | Primary    | 171798691840 |  171798691840 |                  0 | /var/lib/libvirt/images/snapshots/75066687-bd71-4785-8981-a5ccdb0533fd | Ready |            2 |       0 | 2024-09-10 09:03:44 |     17717 | NULL           |           
    0 | NULL      |       1 | NULL       |
   | 129932 |        1 |       91808 | 2024-09-10 09:03:44 | NULL         | NULL   | Image      | 171798691840 |   65756332032 |                  0 | snapshots/872/17717/183ebc06-613f-4c58-bce1-c0c51498a654               | Ready |            2 |       0 | 2024-09-10 09:05:55 |     17717 | NULL           |           
    0 | NULL      |       1 | NULL       |
   +--------+----------+-------------+---------------------+--------------+--------+------------+--------------+---------------+--------------------+------------------------------------------------------------------------+-------+--------------+---------+---------------------+-----------+----------------+--------------+-----------+---------+------------+
   2 rows in set (0.000 sec)
   
   cmk list snapshots id=068b140e-186f-4436-93ec-ba56ebcc1ee7 listall=true filter=physicalsize,virtualsize,state
   {
     "count": 1,
     "snapshot": [
       {
         "physicalsize": 0,
         "state": "BackedUp",
         "virtualsize": 171798691840
       }
     ]
   }
   ```


-- 
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 defaulting to Physical Size 0 [cloudstack]

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

   @CJBecker , have you tried if the API does give the expected size? (i.e. is it a UI only problem)


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