-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix use #411
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is conflict (with changelog and version number, I guess).
all << devicegraph.partitions.find { |p| device.reuse == p.name } | ||
when Y2Storage::Planned::LvmVg | ||
vg = devicegraph.lvm_vgs.find { |v| File.join("/dev", device.reuse) == v.name } | ||
all.concat(vg.lvm_pvs.map(&:blk_device)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Method LvmPv#blk_device
could return the encryption device instead of the blk device. There is no problem if the device hosting the PV is a partition due to you are searching then by partitions in the ancestors list. But there is a possible corner case: a PV over an encrypted disk. Is it necessary to take into account that scenario? Probably not because you are only working with partitions here, isn't it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the info. Yes, I am working with partitions. If I can reach the partition through the "#ancestors" method, it will be ok. If not, I guess I should handle it.
Y2Storage::Planned::Partition.new("/").tap { |p| p.reuse = "/dev/sda1" } | ||
end | ||
|
||
it "does not removes the partition table" do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: removes --> remove
* master: Bump version Improve Devicegraph#remove_md Fix text and doc Fix doc Update version and changelog Update specs Remove LvmResizeButton Add resize and delete buttons Add DeviceResizeButton Add support to delete button for deleting mds Add Actions::DeleteMd Add Devicegraph#remove_md Move methods to base class Actions::DeleteDevice
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks! |
This fixes an important bug: bsc#1066398.
Basically, AutoinstSpaceMaker kicks in when partitions have been planned and does not remove any partition that could be reused.
The tricky part is mapping the
sid
with thedevice name
in order to reassignreuse
properties after making space (as, for instance, removing a logical partition might cause other partitions to be renamed).