Bug 1033301

Summary: [abrt] system-storage-manager-0.2-2.fc19: btrfs.py:36:get_real_number:ValueError: invalid literal for float(): 55.67G
Product: [Fedora] Fedora Reporter: Fabio Ranalli <fabioranalli79>
Component: system-storage-managerAssignee: Lukáš Czerner <lczerner>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: bugzilla, gczarcinski, kentobias, lczerner, me
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
URL: https://retrace.fedoraproject.org/faf/reports/bthash/6522528b3e8bbaae028ddd03af4534cbf39d5dc8
Whiteboard: abrt_hash:1ad9cfea13939ab30a693c91b8ced0f581a91388
Fixed In Version: system-storage-manager-0.4-4.fc19 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-02-06 03:51:14 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
File: backtrace
none
File: environ
none
strace ssm list none

Description Fabio Ranalli 2013-11-21 20:25:22 UTC
Version-Release number of selected component:
system-storage-manager-0.2-2.fc19

Additional info:
reporter:       libreport-2.1.9
cmdline:        /usr/bin/python /bin/ssm list
executable:     /bin/ssm
kernel:         3.11.8-200.fc19.x86_64
runlevel:       N 5
type:           Python
uid:            0

Truncated backtrace:
btrfs.py:36:get_real_number:ValueError: invalid literal for float(): 55.67G

Traceback (most recent call last):
  File "/bin/ssm", line 33, in <module>
    sys.exit(main.main())
  File "/usr/lib/python2.7/site-packages/ssmlib/main.py", line 1485, in main
    args.func(args)
  File "/usr/lib/python2.7/site-packages/ssmlib/main.py", line 966, in list
    self.dev.ptable()
  File "/usr/lib/python2.7/site-packages/ssmlib/main.py", line 700, in dev
    self._dev = Devices(options=self.options)
  File "/usr/lib/python2.7/site-packages/ssmlib/main.py", line 590, in __init__
    my_btrfs = btrfs.BtrfsDev(options=self.options)
  File "/usr/lib/python2.7/site-packages/ssmlib/backends/btrfs.py", line 281, in __init__
    super(BtrfsDev, self).__init__(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/ssmlib/backends/btrfs.py", line 102, in __init__
    fs_used = get_real_number(array[6])
  File "/usr/lib/python2.7/site-packages/ssmlib/backends/btrfs.py", line 36, in get_real_number
    number = float(string[0:-2])
ValueError: invalid literal for float(): 55.67G

Local variables in innermost frame:
string: '55.67GiB'

Comment 1 Fabio Ranalli 2013-11-21 20:25:29 UTC
Created attachment 827426 [details]
File: backtrace

Comment 2 Fabio Ranalli 2013-11-21 20:25:33 UTC
Created attachment 827427 [details]
File: environ

Comment 3 Gene Czarcinski 2013-11-21 21:38:06 UTC
Yup, ssm needs to be updated for the latest btrfs-progs

see https://bugzilla.redhat.com/show_bug.cgi?id=1025585

Comment 4 Chris Murphy 2014-01-22 08:03:59 UTC
*** Bug 1056404 has been marked as a duplicate of this bug. ***

Comment 5 Lukáš Czerner 2014-01-22 11:57:48 UTC
Building in system-storage-manager-0.4-4

Comment 6 Fedora Update System 2014-01-22 12:06:50 UTC
system-storage-manager-0.4-4.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/system-storage-manager-0.4-4.fc19

Comment 7 Chris Murphy 2014-01-23 03:29:20 UTC
I'm not sure if this is a new bug but I still get a traceback.

# ssm list
--------------------------------------------------------------------
Device          Free       Used      Total  Pool         Mount point
--------------------------------------------------------------------
/dev/sda                         465.76 GB               PARTITIONED
/dev/sda1                        200.00 MB                          
/dev/sda2                         27.46 GB                          
/dev/sda3                        619.89 MB                          
/dev/sda4  239.93 GB  189.07 GB  429.00 GB  fedora_f20s             
/dev/sda5                        250.00 MB               /boot/efi  
/dev/sda6                        250.00 MB                          
/dev/sda7                          8.01 GB               SWAP       
/dev/sdb   100.05 GB  198.04 GB  298.09 GB  320stuff                
--------------------------------------------------------------------
------------------------------------------------------------
Pool         Type   Devices       Free       Used      Total  
------------------------------------------------------------
320stuff     btrfs  1        117.13 GB  298.09 GB  298.09 GB  
fedora_f20s  btrfs  1        406.83 GB  429.00 GB  429.00 GB  
------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/bin/ssm", line 48, in <module>
    sys.exit(main.main())
  File "/usr/lib/python2.7/site-packages/ssmlib/main.py", line 1851, in main
    args.func(args)
  File "/usr/lib/python2.7/site-packages/ssmlib/main.py", line 1211, in list
    self.vol.ptable(more_data=self.dev.filesystems())
  File "/usr/lib/python2.7/site-packages/ssmlib/main.py", line 836, in vol
    self._volumes = Volumes(options=self.options)
  File "/usr/lib/python2.7/site-packages/ssmlib/main.py", line 737, in __init__
    self._data['btrfs'] = btrfs.BtrfsVolume(options=self.options)
  File "/usr/lib/python2.7/site-packages/ssmlib/backends/btrfs.py", line 321, in __init__
    self._fill_subvolumes()
  File "/usr/lib/python2.7/site-packages/ssmlib/backends/btrfs.py", line 244, in _fill_subvolumes
    if self._subvolumes[prev_sv]['mount'] == '':
KeyError: 'mount'

Comment 8 Chris Murphy 2014-01-23 03:36:09 UTC
Created attachment 854172 [details]
strace ssm list

python-2.7.5-9.fc20.x86_64
system-storage-manager-0.4-4.fc20.noarch
btrfs-progs-3.12-1.fc20.x86_64
kernel-3.13.0-1.fc21.x86_64.fc21

Comment 9 Lukáš Czerner 2014-01-23 11:01:42 UTC
Chris,

thanks for the report and I'll try to reproduce this, however this is entirely different problem than was originally reported in this BZ. Can you create new BZ for this one please ?

Thanks!
-Lukas

Comment 10 Fedora Update System 2014-01-23 11:15:05 UTC
Package system-storage-manager-0.4-4.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing system-storage-manager-0.4-4.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-1394/system-storage-manager-0.4-4.fc19
then log in and leave karma (feedback).

Comment 11 Fabio Ranalli 2014-01-23 20:17:37 UTC
Installed
system-storage-manager-0.4-4.fc20.noarch from
updates-testing/20/x86_64
and the output of ssm list is now fine as expected

Comment 12 Pete Travis 2014-02-04 06:10:09 UTC
`ssm list` on BTRFS works now, karma given. Thanks Lukáš!

Comment 13 Fedora Update System 2014-02-06 03:51:14 UTC
system-storage-manager-0.4-4.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.