Skip to content
This repository has been archived by the owner on Apr 30, 2021. It is now read-only.

useless error message #15

Closed
l8gravely opened this issue Feb 16, 2017 · 3 comments
Closed

useless error message #15

l8gravely opened this issue Feb 16, 2017 · 3 comments

Comments

@l8gravely
Copy link

When I run: lvcache status data
I get the fairly useless error message of:

need more than 1 value to unpack

So when I do run it with the actual VG/LV I get:

sudo lvcache status data/home
<Command '/sbin/lvs --noheadin...(57 more)' call_args {'bg': False, 'timeo...(476 more)>: starting process
<Command '/sbin/lvs --noheadin...(57 more)' call_args {'bg': False, 'timeo...(476 more)>: starting process
<Command '/sbin/lvs --noheadin...(57 more)' call_args {'bg': False, 'timeo...(476 more)>: starting process
<Command '/sbin/lvs --noheadin...(57 more)' call_args {'bg': False, 'timeo...(476 more)>: starting process
<Command '/sbin/lvs --noheadin...(64 more)' call_args {'bg': False, 'timeo...(476 more)>: starting process
<Command '/sbin/lvs --noheadin...(68 more)' call_args {'bg': False, 'timeo...(476 more)>: starting process
<Command '/sbin/lvs --noheadin...(70 more)' call_args {'bg': False, 'timeo...(476 more)>: starting process
<Command '/sbin/lvs --noheadin...(57 more)' call_args {'bg': False, 'timeo...(476 more)>: starting process
<Command '/sbin/lvs --noheadin...(54 more)' call_args {'bg': False, 'timeo...(476 more)>: starting process
<Command '/sbin/dmsetup status...(22 more)' call_args {'bg': False, 'timeo...(476 more)>: starting process
+-----------------------+-------------------+
| Field | Value |
+-----------------------+-------------------+
| cached | True |
| size | 590558003200 |
| cache_lv | homecacheLV |
| cache_lv_size | 53687091200 |
| metadata_lv | homecacheLV_cmeta |
| metadata_lv_size | 134217728 |
| cache_block_size | 128 |
| cache_utilization | 819200/819200 |
| cache_utilization_pct | 100.0 |
| demotions | 4024 |
| dirty | 0 |
| end | 1153433600 |
| features | 1 |
| md_block_size | 8 |
| md_utilization | 2443/32768 |
| md_utilization_pct | 7.45544433594 |
| promotions | 4024 |
| read_hits | 6214751 |
| read_misses | 2514189 |
| segment_type | cache |
| start | 0 |
| write_hits | 22841584 |
| write_misses | 3841539 |
+-----------------------+-------------------+

Which is fine, but the extra output is annoying when I haven't asked for verbose. I'd also like it to just find ALL LVs in my VG and display them, if it can.

@romanrm
Copy link

romanrm commented Mar 10, 2017

I get the same issues, except I don't even get the actual output table. The last lines of output are:

<Command '/sbin/dmsetup status /dev/mapper/test-nbd7'>: starting process
<Command '/sbin/dmsetup status /dev/mapper/test-nbd7', pid 21925>: process started
<Command '/sbin/dmsetup status /dev/mapper/test-nbd7', pid 21925>: process completed
<Command '/sbin/dmsetup status /dev/mapper/test-nbd7', pid 21925>: process completed
<Command '/sbin/dmsetup status /dev/mapper/test-nbd7', pid 21925>: process completed
dictionary changed size during iteration

@ss23
Copy link

ss23 commented May 17, 2018

@romanrm Fixed with PR #14

@l8gravely
Copy link
Author

Well, I had some time and I chased down this issue a little bit. First off the 'sh' module in python is what generates the '<Command ....' lines, and it defaults to clamping the output to 20 characters for the command. Which is useless for debugging purposes. I manually hacked the version I have to up the limit, but that's just a hack.

Second, the code assumes you give it / for alot of the commands, but doesn't really tell you that nicely. It just needs to be updated to have better error messages.

@larsks larsks closed this as completed Apr 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants