Bug 1165714

Summary: ValueError: new size will not yield an aligned partition
Product: [Fedora] Fedora Reporter: Kamil Páral <kparal>
Component: python-blivetAssignee: David Lehman <dlehman>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 21CC: amulhern, anaconda-maint-list, awilliam, bcl, dlehman, g.kaviyarasu, jonathan, kparal, mruckman, robatino, vanmeeuwen+fedora, vpodzime
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:8bf9d4092d0ed6d77f4e667abad18016585e811374c4818aef15c6dd216b4b92 AcceptedBlocker
Fixed In Version: anaconda-21.48.21-1.fc21 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-12-05 03:26:30 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: 1043129    
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: storage.log
none
File: ifcfg.log
none
File: program.log none

Description Kamil Páral 2014-11-19 14:26:09 UTC
Description of problem:
I was randomly clicking through the guided partitioning, because I was trying to reproduce a completely different bug. And voila, I managed to reproduce bug 1163694. So, it's not fixed after all. This time it happened I reclaimed some space in the guided dialog, went to the main hub, then back to guided partitioning, and unselected the previously selected disk.

Version-Release number of selected component:
anaconda-core-21.48.15-1.fc21.x86_64

The following was filed automatically by anaconda:
anaconda 21.48.15-1 exception report
Traceback (most recent call first):
  File "/usr/lib/python2.7/site-packages/blivet/devices.py", line 1550, in _setTargetSize
    raise ValueError("new size will not yield an aligned partition")
  File "/usr/lib/python2.7/site-packages/blivet/devices.py", line 752, in <lambda>
    lambda s, v: s._setTargetSize(v),
  File "/usr/lib/python2.7/site-packages/blivet/deviceaction.py", line 454, in cancel
    self.device.targetSize = self.origsize
  File "/usr/lib/python2.7/site-packages/blivet/devicetree.py", line 515, in cancelAction
    action.cancel()
  File "/usr/lib/python2.7/site-packages/blivet/devicetree.py", line 1964, in hide
    self.cancelAction(action)
  File "/usr/lib64/python2.7/site-packages/pyanaconda/ui/gui/spokes/storage.py", line 721, in on_back_clicked
    self.storage.devicetree.hide(disk)
ValueError: new size will not yield an aligned partition

Additional info:
cmdline:        /usr/bin/python  /sbin/anaconda --liveinst --method=livecd:///dev/mapper/live-base
cmdline_file:   BOOT_IMAGE=vmlinuz0 initrd=initrd0.img root=live:CDLABEL=Fedora-Live-Workstation-x86_64-2 rootfstype=auto ro rd.live.image quiet  rhgb rd.luks=0 rd.md=0 rd.dm=0 
executable:     /sbin/anaconda
hashmarkername: anaconda
kernel:         3.17.2-300.fc21.x86_64
other involved packages: python-blivet-0.61.10-1.fc21.noarch, anaconda-gui-21.48.15-1.fc21.x86_64
product:        Fedora"
release:        Fedora release 21 (Twenty One)
type:           anaconda
version:        Fedora

Comment 1 Kamil Páral 2014-11-19 14:26:12 UTC
Created attachment 958972 [details]
File: anaconda-tb

Comment 2 Kamil Páral 2014-11-19 14:26:13 UTC
Created attachment 958973 [details]
File: anaconda.log

Comment 3 Kamil Páral 2014-11-19 14:26:15 UTC
Created attachment 958974 [details]
File: environ

Comment 4 Kamil Páral 2014-11-19 14:26:17 UTC
Created attachment 958975 [details]
File: journalctl

Comment 5 Kamil Páral 2014-11-19 14:26:18 UTC
Created attachment 958976 [details]
File: lsblk_output

Comment 6 Kamil Páral 2014-11-19 14:26:19 UTC
Created attachment 958977 [details]
File: nmcli_dev_list

Comment 7 Kamil Páral 2014-11-19 14:26:21 UTC
Created attachment 958978 [details]
File: os_info

Comment 8 Kamil Páral 2014-11-19 14:26:23 UTC
Created attachment 958979 [details]
File: storage.log

Comment 9 Kamil Páral 2014-11-19 14:26:24 UTC
Created attachment 958980 [details]
File: ifcfg.log

Comment 10 Kamil Páral 2014-11-19 14:26:26 UTC
Created attachment 958981 [details]
File: program.log

Comment 11 Kamil Páral 2014-11-19 14:28:16 UTC
This can probably be marked as a duplicate of bug 1163694, I guess.

Comment 12 David Lehman 2014-11-19 15:40:40 UTC
Let's keep this one open and close 1163694.

The issue is that we are requiring new target size be aligned even when that target size is the partition's current/actual size. IOW we are canceling a resize action. In this case we should be bypassing the alignment check.

Comment 13 Kamil Páral 2014-11-19 17:15:17 UTC
*** Bug 1163694 has been marked as a duplicate of this bug. ***

Comment 14 Kamil Páral 2014-11-19 17:15:59 UTC
Transferring blocker nomination from bug 1163694.

Comment 15 Mike Ruckman 2014-11-19 17:17:23 UTC
Discussed in 2014-11-19 blocker review meeting. This violates the final criterion: Any installer mechanism for resizing storage volumes must correctly attempt the requested operation.

Comment 16 Vratislav Podzimek 2014-11-26 14:14:17 UTC
Can you please try the following updates.img containing a naïve patch?
http://vpodzime.fedorapeople.org/1165714_updates.img

Comment 17 Kamil Páral 2014-11-26 17:19:37 UTC
(In reply to Vratislav Podzimek from comment #16)
> Can you please try the following updates.img containing a naïve patch?
> http://vpodzime.fedorapeople.org/1165714_updates.img

I have trouble using this, it seems to not apply at all. Wrongly created?

[liveuser@localhost ~]$ liveinst --updates=http://vpodzime.fedorapeople.org/1165714_updates.img
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   319  100   319    0     0    871      0 --:--:-- --:--:-- --:--:--   871
mount: /tmp/updates.img is not a block device (maybe try `-o loop'?)
cp: cannot stat ‘/tmp/updates.disk/*’: No such file or directory
umount: /tmp/updates.disk: not mounted
Starting installer, one moment...


For the record, here's the reproducer of this bug:
1. Create a VM with two blank disks
2. Put a msdos disklabel on them
3. Create a single unaligned partition on the first disk
   mkpart p ext4 1M 2000000000B
4. Select both disks in guided part, check "I want to make more space available", and shrink down the existing partition a bit
5. Confirm, arrive to the main hub
6. Go back to storage screen
7. Deselect the second disk
8. hit Done
9. anaconda crashes

Comment 18 Vratislav Podzimek 2014-11-27 08:03:48 UTC
(In reply to Kamil Páral from comment #17)
> (In reply to Vratislav Podzimek from comment #16)
> > Can you please try the following updates.img containing a naïve patch?
> > http://vpodzime.fedorapeople.org/1165714_updates.img
> 
> I have trouble using this, it seems to not apply at all. Wrongly created?
Interesting, it works for me just fine (not live installation). However, I've just uploaded a re-packed version of the file so please give it a try.

Comment 19 Kamil Páral 2014-11-27 08:53:35 UTC
(In reply to Vratislav Podzimek from comment #18)
> Interesting, it works for me just fine (not live installation). However,
> I've just uploaded a re-packed version of the file so please give it a try.

Two problems:
1. It still does not work on Live (TC4, anaconda 21.48.16-1), same problem. Can you please investigate a bit? I'll try as well. Anaconda's capacity to apply updates.img is a blocking feature.
2. It applies correctly to a Server DVD (TC4, anaconda 21.48.16-1). However, if I do steps from comment 17, anaconda freezes after step 8. It is stuck in a loop, consumes 100% CPU forever. gstack is not available on DVD, so I can't provide you with a trace.

Comment 20 Kamil Páral 2014-11-27 09:27:52 UTC
(In reply to Kamil Páral from comment #19)
> 1. It still does not work on Live (TC4, anaconda 21.48.16-1), same problem.
> Can you please investigate a bit? I'll try as well. Anaconda's capacity to
> apply updates.img is a blocking feature.

Mystery solved, fedorapeople automatically redirects everything to https, but liveinst does not follow http redirects by default. dracut does, that's why it works on DVD.

> 2. It applies correctly to a Server DVD (TC4, anaconda 21.48.16-1). However,
> if I do steps from comment 17, anaconda freezes after step 8. It is stuck in
> a loop, consumes 100% CPU forever. gstack is not available on DVD, so I
> can't provide you with a trace.

Vratislav fixed the updates.img (same url), and it works great now.

Comment 21 Kamil Páral 2014-11-27 10:24:11 UTC
I also tested with

https://vpodzime.fedorapeople.org/ultimate_f21_updates.img

and it works as well.

Comment 22 Fedora Update System 2014-11-27 17:22:23 UTC
anaconda-21.48.18-1.fc21,python-blivet-0.61.12-1.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/anaconda-21.48.18-1.fc21,python-blivet-0.61.12-1.fc21

Comment 23 Fedora Update System 2014-11-27 23:59:21 UTC
pyparted-3.10.2-1.fc21, python-blivet-0.61.12-1.fc21, anaconda-21.48.18-1.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/FEDORA-2014-15910/pyparted-3.10.2-1.fc21,python-blivet-0.61.12-1.fc21,anaconda-21.48.18-1.fc21

Comment 24 Fedora Update System 2014-11-29 20:59:13 UTC
Package pyparted-3.10.2-1.fc21, python-blivet-0.61.12-1.fc21, anaconda-21.48.18-1.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing pyparted-3.10.2-1.fc21 python-blivet-0.61.12-1.fc21 anaconda-21.48.18-1.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-15910/pyparted-3.10.2-1.fc21,python-blivet-0.61.12-1.fc21,anaconda-21.48.18-1.fc21
then log in and leave karma (feedback).

Comment 25 Kamil Páral 2014-12-01 12:06:56 UTC
This works well in RC1.

Comment 26 Adam Williamson 2014-12-03 19:56:03 UTC
For safety we need to re-VERIFY this with RC5, though #anaconda expects it to still be fixed.

Comment 27 Kamil Páral 2014-12-04 12:36:46 UTC
This seems to work in RC5.

Comment 28 Fedora Update System 2014-12-05 03:26:30 UTC
anaconda-21.48.21-1.fc21, python-blivet-0.61.13-1.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.