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
MGMT-16687: IBI use separate partition for /var/lib/containers #355
MGMT-16687: IBI use separate partition for /var/lib/containers #355
Conversation
@javipolo: This pull request references MGMT-16687 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.16.0" version, but no target version was set. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
Skipping CI for Draft Pull Request. |
ib-cli/README.md
Outdated
@@ -82,9 +82,14 @@ export AUTH_FILE=/path/to/seed-image-pull-secret.json | |||
export PS_FILE=/path/to/release-pull-secret.json | |||
export SSH_PUBLIC_KEY=~/.ssh/id_rsa.pub | |||
export IBI_INSTALLATION_DISK=/dev/sda | |||
# Start point of the /var/lib/containers partition. Free space before it will be allocated to system partition | |||
# It can be specified in a positive manner: 120G , meaning that new partition will start at 120Gb of disk, and extend to the end of the disk |
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.
While it's nice do users care whether the extra partition is at the end or at the start of the disk?
If not perhaps asking for the partition size is more simple
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.
I like the "give me the size" approach, but it differs from the way you define it for the seed
While creating the seed cluster, you specify the start of the partition. and AFAIK you cannot say "I want a partition of 5Gb at the end of the disk"
In IBI case, since we use sgdisk, we can just provide a negative number as the start of the partition, and it counts backwards since the end of the disk, so effectively is the size of the partition
My prefered approach is to just specify the desired size of the partition, and prepend it by - , but I thought better to give context to the user, since partitioning in the end "is not part" of LCA and lands more on user side ...
# We need to grow the partition. Coreos-installer leaves a small partition | ||
growpart ${installation_disk} 4 | ||
mount ${installation_disk}4 /mnt | ||
mount ${installation_disk}3 /mnt/boot | ||
mount /dev/disk/by-partlabel/root /mnt |
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.
Perhaps we should validate that there enough space left for the os
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.
This kind of check is not done anywhere while creating the seed
I thought we agreed that user was responsible of partitioning decisions
In any case, what would be a value for "enough space left for the os"
If we know this already, maybe we can just use that number and calculate a default value that gives all the extra space for the new partition, allowing for no user interaction at all in that regards
145c573
to
b8f31cf
Compare
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
Signed-off-by: Javi Polo <jpolo@redhat.com>
b8f31cf
to
4560b8b
Compare
@@ -6,27 +6,42 @@ seed_image=${1:-$SEED_IMAGE} | |||
seed_version=${2:-$SEED_VERSION} | |||
installation_disk=${3:-$INSTALLATION_DISK} | |||
lca_image=${4:-$LCA_IMAGE} | |||
extra_partition_start=${5:-$EXTRA_PARTITION_START} |
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.
Why there's a 5 here? Should be "use directory" no?
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.
It's the 5th argument from the command line in case you call the install-rhcos-and-restore-seed.sh script 😅
In the systemd unit we feed the data through env variables, but for testing it is useful :)
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
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: eranco74 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Set as draft until openshift/assisted-service#6005 or openshift/assisted-installer#787 get to an openshift release