Bug 869841 - anaconda sees unknown partition types as resizeable, crashes if told to resize one it actually cannot resize
Summary: anaconda sees unknown partition types as resizeable, crashes if told to resiz...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: anaconda
Version: 18
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: David Lehman
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:c33405d447f18f5adac211d423f...
Depends On:
Blocks: F18-accepted, F18FinalFreezeExcept
TreeView+ depends on / blocked
 
Reported: 2012-10-24 23:15 UTC by Reartes Guillermo
Modified: 2012-12-21 05:14 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-12-21 05:14:42 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: anaconda-tb (269.08 KB, text/plain)
2012-10-24 23:16 UTC, Reartes Guillermo
no flags Details
File: product (6 bytes, text/plain)
2012-10-24 23:16 UTC, Reartes Guillermo
no flags Details
File: type (9 bytes, text/plain)
2012-10-24 23:16 UTC, Reartes Guillermo
no flags Details
File: ifcfg.log (641 bytes, text/plain)
2012-10-24 23:16 UTC, Reartes Guillermo
no flags Details
File: storage.log (126.86 KB, text/plain)
2012-10-24 23:16 UTC, Reartes Guillermo
no flags Details
File: version (11 bytes, text/plain)
2012-10-24 23:16 UTC, Reartes Guillermo
no flags Details
File: environ (780 bytes, text/plain)
2012-10-24 23:16 UTC, Reartes Guillermo
no flags Details
File: anaconda.log (4.91 KB, text/plain)
2012-10-24 23:16 UTC, Reartes Guillermo
no flags Details
File: syslog (61.48 KB, text/plain)
2012-10-24 23:16 UTC, Reartes Guillermo
no flags Details
File: hashmarkername (8 bytes, text/plain)
2012-10-24 23:16 UTC, Reartes Guillermo
no flags Details
File: packaging.log (3.05 KB, text/plain)
2012-10-24 23:16 UTC, Reartes Guillermo
no flags Details
File: cmdline_file (96 bytes, text/plain)
2012-10-24 23:16 UTC, Reartes Guillermo
no flags Details
File: release (24 bytes, text/plain)
2012-10-24 23:16 UTC, Reartes Guillermo
no flags Details
File: program.log (34.00 KB, text/plain)
2012-10-24 23:16 UTC, Reartes Guillermo
no flags Details

Description Reartes Guillermo 2012-10-24 23:15:44 UTC
Description of problem:
openbsd was installed in disk1
selected both disk1 and disk2
choose shrink for bsd (only preserve / delete should be avaiable for this partition type)
choose delete for /boot, swap and / on the other disk (previous f18)
started installing


Version-Release number of selected component:
anaconda-18.19

Additional info:
libreport version: 2.0.14
cmdline:        /usr/bin/python  /sbin/anaconda
kernel:         3.6.1-1.fc18.x86_64

description:
:The following was filed automatically by anaconda:
:anaconda 18.19 exception report
:Traceback (most recent call first):
:  File "/usr/lib64/python2.7/site-packages/parted/geometry.py", line 55, in __init__
:    self.__geometry = _ped.Geometry(self.device.getPedDevice(), start, length)
:  File "/usr/lib64/python2.7/site-packages/parted/decorators.py", line 32, in new
:    ret = fn(*args, **kwds)
:  File "/usr/lib64/python2.7/site-packages/pyanaconda/storage/devices.py", line 1485, in _computeResize
:    length=newLen)
:  File "/usr/lib64/python2.7/site-packages/pyanaconda/storage/devices.py", line 1506, in resize
:    (constraint, geometry) = self._computeResize(partition)
:  File "/usr/lib64/python2.7/site-packages/pyanaconda/storage/deviceaction.py", line 370, in execute
:    self.device.resize()
:  File "/usr/lib64/python2.7/site-packages/pyanaconda/storage/devicetree.py", line 323, in processActions
:    action.execute()
:  File "/usr/lib64/python2.7/site-packages/pyanaconda/storage/__init__.py", line 357, in doIt
:    self.devicetree.processActions()
:  File "/usr/lib64/python2.7/site-packages/pyanaconda/storage/__init__.py", line 195, in turnOnFilesystems
:    storage.doIt()
:  File "/usr/lib64/python2.7/site-packages/pyanaconda/install.py", line 107, in doInstall
:    turnOnFilesystems(storage)
:  File "/usr/lib64/python2.7/threading.py", line 504, in run
:    self.__target(*self.__args, **self.__kwargs)
:  File "/usr/lib64/python2.7/site-packages/pyanaconda/threads.py", line 91, in run
:    threading.Thread.run(self, *args, **kwargs)
:CreateException: Can't have the end before the start! (start sector=64 length=0)

Comment 1 Reartes Guillermo 2012-10-24 23:16:01 UTC
Created attachment 633106 [details]
File: anaconda-tb

Comment 2 Reartes Guillermo 2012-10-24 23:16:04 UTC
Created attachment 633107 [details]
File: product

Comment 3 Reartes Guillermo 2012-10-24 23:16:06 UTC
Created attachment 633108 [details]
File: type

Comment 4 Reartes Guillermo 2012-10-24 23:16:08 UTC
Created attachment 633109 [details]
File: ifcfg.log

Comment 5 Reartes Guillermo 2012-10-24 23:16:13 UTC
Created attachment 633110 [details]
File: storage.log

Comment 6 Reartes Guillermo 2012-10-24 23:16:16 UTC
Created attachment 633111 [details]
File: version

Comment 7 Reartes Guillermo 2012-10-24 23:16:18 UTC
Created attachment 633112 [details]
File: environ

Comment 8 Reartes Guillermo 2012-10-24 23:16:20 UTC
Created attachment 633113 [details]
File: anaconda.log

Comment 9 Reartes Guillermo 2012-10-24 23:16:24 UTC
Created attachment 633114 [details]
File: syslog

Comment 10 Reartes Guillermo 2012-10-24 23:16:26 UTC
Created attachment 633115 [details]
File: hashmarkername

Comment 11 Reartes Guillermo 2012-10-24 23:16:28 UTC
Created attachment 633116 [details]
File: packaging.log

Comment 12 Reartes Guillermo 2012-10-24 23:16:31 UTC
Created attachment 633117 [details]
File: cmdline_file

Comment 13 Reartes Guillermo 2012-10-24 23:16:33 UTC
Created attachment 633118 [details]
File: release

Comment 14 Reartes Guillermo 2012-10-24 23:16:36 UTC
Created attachment 633119 [details]
File: program.log

Comment 15 Reartes Guillermo 2012-11-03 15:29:57 UTC
i tried automatic partitioning, type BTRFS on a guest with a previous instance. 
a biosboot (delete) lvm(delete) and another (shrink). and ext4 (shrink)


Package: anaconda-18.24
OS Release: Fedora release 18-Beta-TC7

Comment 16 Chris Lumens 2012-11-27 22:19:46 UTC
Can you please try this again with a tree containing anaconda-18.31 or later?  Note that this would have to be later than the beta, unfortunately.  With the reworked resize dialog in there, I have the shrink button shaded out for devices we don't know how to shrink, and I am hoping that will take care of this problem.  We shouldn't be scheduling a resize action for this type of device.

Comment 17 Reartes Guillermo 2012-11-27 22:43:05 UTC
sure, i am leaving it with the needinfo flag not cleared.

Comment 18 Reartes Guillermo 2012-12-10 15:27:46 UTC
I tested it again with smoke5

Package: anaconda-18.37
OS Release: Fedora release 18

Comment 19 Reartes Guillermo 2012-12-10 15:30:17 UTC
It is still possible to start installing by selecting 'shrink' for ufs (openbsd) partition/filesystem and 'delete' for the rest.

Comment 20 David Lehman 2012-12-11 20:33:33 UTC
It looks like StorageDevice.resizable makes the mistake of assuming that a DeviceFormat means unformatted when it can also indicate unrecognized formatting, which should not be treated as resizable.

Comment 21 Tim Flink 2012-12-17 09:46:50 UTC
It sounds like uncrecognized formats are detected as resizable when they shouldn't be so that if anaconda attempts to resize them, it crashes. Am I understanding correctly?

If so, it would be a violation of the following F18 beta release criterion [1]:

The installer's custom partitioning mode must be capable of the following ...  Rejecting obviously invalid operations without crashing .

[1] http://fedoraproject.org/wiki/Fedora_18_Beta_Release_Criteria

Comment 22 Adam Williamson 2012-12-17 17:32:47 UTC
Discussed at 2012-12-17 blocker review meeting: http://meetbot.fedoraproject.org/fedora-bugzappers/2012-12-17/f18final-blocker-review-5.2012-12-17-16.40.log.txt . We agreed this isn't really serious enough to be a blocker, as it's likely to be comparatively rarely encountered ('typical' scenarios will only have known partition types) and doesn't cause any terrible consequences (you can really just reboot and try again). But it's accepted as NTH as it's a crasher that should be fixed.

Comment 23 David Lehman 2012-12-17 18:09:00 UTC
The worst-case scenario is that we actually succeed in resizing the device and cause data loss by not managing the formatting accordingly. I'm not sure if this is possible or not.

Comment 24 Adam Williamson 2012-12-17 22:43:34 UTC
dlehman: well we were working on the assumption that all actually *resizing* requires calling a hardcoded command name related to the format - there isn't a single generic 'resize' command. So we assumed this will always fail for an unknown filesystem type. If we're wrong about that, please let us know, as that could certainly change the equation.

Comment 25 David Lehman 2012-12-17 22:56:50 UTC
It will always crash like this from the reclaim dialog because the new target size will always be zero, which is the immediate cause of the traceback from this bug. If the device is resized from the custom spoke, I'm fairly certain you could end up shrinking the device without touching the formatting, which is really bad.

Comment 26 Adam Williamson 2012-12-17 23:18:26 UTC
ah, we shrink the device and then the filesystem? seems ass-backwards. But yeah, that would be awful.

Comment 27 David Lehman 2012-12-17 23:26:33 UTC
(In reply to comment #26)
> ah, we shrink the device and then the filesystem? seems ass-backwards. But
> yeah, that would be awful.

It depends on whether you are growing or shrinking the device which you do first.

It is possible to schedule a device resize without scheduling an accompanying format resize (think actually unformatted device, although in retrospect I don't really care about that case) -- that's what would happen in this case if the new target size was non-zero.

Comment 28 Fedora Update System 2012-12-19 01:34:08 UTC
anaconda-18.37.4-1.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/anaconda-18.37.4-1.fc18

Comment 29 Fedora Update System 2012-12-19 22:40:47 UTC
Package anaconda-18.37.4-1.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing anaconda-18.37.4-1.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-20677/anaconda-18.37.4-1.fc18
then log in and leave karma (feedback).

Comment 30 Fedora Update System 2012-12-20 05:35:03 UTC
anaconda-18.37.4-1.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 31 Kamil Páral 2012-12-20 12:37:34 UTC
Reartes, can you please confirm this is fixed in smoke9?
http://dl.fedoraproject.org/pub/alt/qa/20121219_f18-smoke9/

Comment 32 Reartes Guillermo 2012-12-21 03:42:19 UTC
i was not able to select 'shrink' for type ufs (openbsd), so i was unable to reproduce the issue in the 'description'. So it seems fixed.

Please note that this does not cover comment #15 yet, since i did not re-test it.

Comment 33 Adam Williamson 2012-12-21 05:14:42 UTC
Thanks.


Note You need to log in before you can comment on or make changes to this bug.