Skip to content
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

support full disk devices as lvm pv in autoyast profile (bsc#1107298) #739

Closed
wants to merge 2 commits into from

Conversation

wfeldt
Copy link
Member

@wfeldt wfeldt commented Sep 13, 2018

  • unit tests missing

@coveralls
Copy link

coveralls commented Sep 13, 2018

Coverage Status

Coverage increased (+0.02%) to 97.088% when pulling 0889e66 on sw_01 into 63bb64a on master.

@@ -45,6 +45,7 @@ def self.attributes
{ name: :keep_unknown_lv },
{ name: :lvm2 },
{ name: :is_lvm_vg },
{ name: :lvm_group },
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to AutoYaST documentation, there is no lvm_group attribute in a <drive> section. Only <partition> sections have that.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know. But keeping that partition 0 hack is not really a good idea either; so I added the element also here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW, pesize is in drive and not in partition where it would logically belong to.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The autoyast profile looks not very consistent here and we should try to make it more logical going forward.

Copy link
Contributor

@ancorgs ancorgs Sep 17, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it would be only lvm_group and pesize... There are quite some attributes in the current specification that are UTTERLY misplaced.

But in my opinion if we want to introduce another way of specifying the usage of full disks, we must first:

  • decide/design how it's going to look like
  • implement it
  • then, document it

And that includes thinking about import, export, etc. and thinking about full disks as PV, full formatted disks, etc.

Just adding another attribute to the <drive> section "since we are here" sounds like the recipe to repeat the problem in the future (discovering via bug report than the code supported yet another way of doing things because it sounded like a good idea to whoever was touching the code). 😉


# if there are no partitions use the entire device
if drive.partitions.empty?
result = planned_for_full_disk(drive)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does the same in the case in which we have just one partition with partition_nr=0, create=false (which was the scope of the PBI) and if we have an empty list of partitions (which is a different scenario that is reflected in the current AutoYaST documentation).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The created layout is the same as before in this case.

@ancorgs
Copy link
Contributor

ancorgs commented Sep 17, 2018

IMO, this PR in its current shape goes a little bit too much beyond duty. I would focus on supporting the current format (just one partition with partition_nr=0 and create=false) instead of expanding that format with new additional ways (that we should then export, support in the future and so on).

Now that we are adding support to the partitioner to create more flexible layouts, we will need to find a way to specify all that in AutoYaST. But that's out of the scope of this PR/PBI and it's not something to be done just by thinking locally.

This allows partition 0 to stand as an alias for the full disk.
@joseivanlopez
Copy link
Contributor

@wfeldt, @ancorgs this PR should go to GA (now it is done to master).

@wfeldt
Copy link
Member Author

wfeldt commented Sep 18, 2018

replaced by #740

@wfeldt wfeldt closed this Sep 18, 2018
@shundhammer shundhammer deleted the sw_01 branch February 19, 2019 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants