Add support for ExtraPartitionSize to address issue #676 #677
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Background / Context
This PR addresses the inability to reserve some space on the install device for other partitions. By allowing for additional partitions on the install disk we can create partitions for use by other processes, such as the LVM Operator.
Issue / Requirement / Reason for change
This PR addresses issue #676
Solution / Feature Overview
I have added one extra configuration option "ExtraPartitionSize" which allows you to define the size of the varlibcontainers partition that is created. It is a optional configuration. If you do not define this option, the lca-cli works exactly the same as it did prior to this code change. This means that all existing configuration files will work with no changes.
Implementation Details
This change takes advantage of the existing "sgdisk" code and appends the required additional value of ExtraPartitionSize to the "new" command, allowing us to specify a total size. By defaulting "ExtraPartitionSize" to "0" the any previous config files that did not specify this value will work without any modification.
Other Information
Given that MCO can not be used to configure additional partitions the lca-cli utility should be updated to support the creation of additional partitions as part of the image application process. In theory this can be handled by adding a "post.sh" with the additional commands, but it would be easier if it was built into the utility itself.