Bug 1038847

Summary: SizeNotPositiveError: spec= param must be >=0 - "1" as size of encrypted partition
Product: [Fedora] Fedora Reporter: Alexey Torkhov <atorkhov>
Component: anacondaAssignee: Vratislav Podzimek <vpodzime>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: awilliam, bugzilla, g.kaviyarasu, jonathan, jsedlak, kparal, lnie, mruckman, robatino, vanmeeuwen+fedora, vpodzime
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:fb855b364004d7af1cb7b6bcbc3285427e4c1e1632a22727969f5dca8001d282 AcceptedBlocker
Fixed In Version: anaconda-20.25.15-1.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-12-13 05:33:41 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:
Bug Depends On:    
Bug Blocks: 980656    
Attachments:
Description Flags
File: anaconda-tb
none
File: anaconda.log
none
File: environ
none
File: journalctl
none
File: lsblk_output
none
File: nmcli_dev_list
none
File: os_info
none
File: program.log
none
File: storage.log
none
File: ifcfg.log none

Description Alexey Torkhov 2013-12-05 23:38:29 UTC
Description of problem:
created /var partition with size "1"

Version-Release number of selected component:
anaconda-20.25.14-1.fc20.x86_64

The following was filed automatically by anaconda:
anaconda 20.25.14-1 exception report
Traceback (most recent call first):
  File "/usr/lib/python2.7/site-packages/blivet/size.py", line 96, in _parseSpec
    raise SizeNotPositiveError("spec= param must be >=0")
  File "/usr/lib/python2.7/site-packages/blivet/size.py", line 164, in __new__
    self = Decimal.__new__(cls, value=_parseSpec(en_spec, False))
  File "/usr/lib64/python2.7/site-packages/pyanaconda/ui/gui/spokes/lib/accordion.py", line 61, in selectorFromDevice
    size = Size(en_spec="%f MB" % device.size)
  File "/usr/lib64/python2.7/site-packages/pyanaconda/ui/gui/spokes/lib/accordion.py", line 176, in addSelector
    selector = selectorFromDevice(device, mountpoint=mountpoint)
  File "/usr/lib64/python2.7/site-packages/pyanaconda/ui/gui/spokes/custom.py", line 997, in _do_refresh
    mountpoint=mountpoint)
  File "/usr/lib64/python2.7/site-packages/pyanaconda/ui/gui/spokes/custom.py", line 2096, in on_add_clicked
    self._do_refresh(mountpointToShow=mountpoint or fstype)
SizeNotPositiveError: spec= param must be >=0

Additional info:
cmdline:        /usr/bin/python  /sbin/anaconda --liveinst --method=livecd:///dev/mapper/live-base
cmdline_file:   initrd=initrd0.img root=live:CDLABEL=Fedora-Live-KDE-x86_64-20-TC5 rootfstype=auto ro rd.live.image quiet  rhgb rd.luks=0 rd.md=0 rd.dm=0  BOOT_IMAGE=vmlinuz0 
executable:     /sbin/anaconda
hashmarkername: anaconda
kernel:         3.11.10-300.fc20.x86_64
other involved packages: python-blivet-0.23.8-1.fc20.noarch
product:        Fedora
release:        Fedora release 20 (Heisenbug)
type:           anaconda
version:        20

Comment 1 Alexey Torkhov 2013-12-05 23:38:36 UTC
Created attachment 833371 [details]
File: anaconda-tb

Comment 2 Alexey Torkhov 2013-12-05 23:38:40 UTC
Created attachment 833372 [details]
File: anaconda.log

Comment 3 Alexey Torkhov 2013-12-05 23:38:44 UTC
Created attachment 833373 [details]
File: environ

Comment 4 Alexey Torkhov 2013-12-05 23:38:48 UTC
Created attachment 833374 [details]
File: journalctl

Comment 5 Alexey Torkhov 2013-12-05 23:38:52 UTC
Created attachment 833375 [details]
File: lsblk_output

Comment 6 Alexey Torkhov 2013-12-05 23:38:56 UTC
Created attachment 833376 [details]
File: nmcli_dev_list

Comment 7 Alexey Torkhov 2013-12-05 23:38:59 UTC
Created attachment 833377 [details]
File: os_info

Comment 8 Alexey Torkhov 2013-12-05 23:39:03 UTC
Created attachment 833378 [details]
File: program.log

Comment 9 Alexey Torkhov 2013-12-05 23:39:08 UTC
Created attachment 833379 [details]
File: storage.log

Comment 10 Alexey Torkhov 2013-12-05 23:39:11 UTC
Created attachment 833380 [details]
File: ifcfg.log

Comment 11 Alexey Torkhov 2013-12-08 12:31:43 UTC
To reproduce:

1. Start installer, go to installation destination, select disks
2. Use LVM, enable encryption, select custom paritioning
3. Add new mount point, use / or /var or /home, enter 1 as capacity.
It crashes after thinking...

Adding as blocker, as per:

 Reject or disallow invalid disk and volume configurations without crashing.

Comment 12 Chris Murphy 2013-12-09 06:37:44 UTC
This could be a dup of bug 1013586. Regression from 20.25.12-1?

Comment 13 Kamil Páral 2013-12-09 13:57:46 UTC
Reproducing bug 1038847 according to comment 11.

cmdline:        /usr/bin/python  /sbin/anaconda
cmdline_file:   initrd=initrd.img inst.stage2=hd:LABEL=Fedora\x2020-TC5\x20x86_64 quiet BOOT_IMAGE=vmlinuz 
hashmarkername: anaconda
kernel:         3.11.10-300.fc20.x86_64
package:        anaconda-20.25.14-1
product:        Fedora
reason:         SizeNotPositiveError: spec= param must be >=0
release:        Cannot get release name.
version:        20-TC5

Comment 14 Mike Ruckman 2013-12-09 17:29:49 UTC
Discussed in 2013-12-09 Blocker Review meeting [1]. Voted as an AcceptedBlocker for violating the beta criteria "When using the custom partitioning flow, the installer must be able to: ... Reject or disallow invalid disk and volume configurations without crashing." [2]

[1] http://meetbot.fedoraproject.org/fedora-blocker-review/2013-12-09/
[2] https://fedoraproject.org/wiki/Fedora_20_Beta_Release_Criteria#Custom_partitioning

Comment 16 Chris Murphy 2013-12-10 19:37:55 UTC
In what way are the partition sizes "weird"?

Comment 17 Adam Williamson 2013-12-11 03:57:00 UTC
https://www.happyassassin.net/extras/updates-1038847.img should be the updates.img to test this, if I did things right.

Comment 18 Adam Williamson 2013-12-11 04:17:51 UTC
Well, the update seems to fix the bug, but I hit a crash soon after.

Follow Alexey's reproducer from c#11, note it doesn't crash, then:

4. Change the size of the / partition you created to something reasonable (I did 10GB, anaconda rounded to 9.99)
5. Add a partition named 'swap', don't enter a size

Crashed. Filing the crash.

Comment 19 Adam Williamson 2013-12-11 04:19:56 UTC
Crash filed as #1040263.

Comment 20 Adam Williamson 2013-12-11 04:28:22 UTC
The crash can be reproduced much more simply with the updates.img applied - just enable encryption, go into custom partitioning, and try creating a partition without explicitly specifying a size. Looks like the patch didn't consider that case.

Comment 21 Adam Williamson 2013-12-11 04:57:25 UTC
I also tried dlehman's alternative patch - https://lists.fedorahosted.org/pipermail/anaconda-patches/2013-December/007755.html - but it doesn't seem to work, unless I screwed something up. I built the updates.img as https://www.happyassassin.net/extras/dlehman-1038847.img . I can't immediately see *why* the patch doesn't work, but it doesn't seem to.

Comment 22 Alexey Torkhov 2013-12-11 07:33:47 UTC
In bug 1038969 comment 12 there is updates.img that is supposed to fix this bug too.

Comment 23 Adam Williamson 2013-12-11 07:38:11 UTC
if i'm reading things right that likely has the same change as I tested in c#18, so I'd expect the same behaviour; but do go ahead and try it and see if you reproduce my results.

Comment 24 Vratislav Podzimek 2013-12-11 11:05:47 UTC
Please try this updates.img:
http://vpodzime.fedorapeople.org/f20_blockers_updates.img

Comment 25 Jan Sedlák 2013-12-11 11:43:35 UTC
I tested it with updates image from comment 24 and it works. And problem from comment 18 was also OK.

Comment 26 Fedora Update System 2013-12-11 22:54:20 UTC
anaconda-20.25.15-1.fc20, python-blivet-0.23.9-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/python-blivet-0.23.9-1.fc20,anaconda-20.25.15-1.fc20

Comment 27 lnie 2013-12-12 08:26:23 UTC
20.25.15-1.fc20 works fine

Comment 28 Fedora Update System 2013-12-13 05:33:41 UTC
anaconda-20.25.15-1.fc20, python-blivet-0.23.9-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.