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

MGMT-16687: IBI use separate partition for /var/lib/containers #355

Merged

Conversation

javipolo
Copy link
Collaborator

Set as draft until openshift/assisted-service#6005 or openshift/assisted-installer#787 get to an openshift release

@openshift-ci-robot
Copy link

openshift-ci-robot commented Feb 26, 2024

@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:

Set as draft until openshift/assisted-service#6005 or openshift/assisted-installer#787 get to an openshift release

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.

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 26, 2024
Copy link
Contributor

openshift-ci bot commented Feb 26, 2024

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

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
Copy link
Collaborator

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

Copy link
Collaborator Author

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
Copy link
Collaborator

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

Copy link
Collaborator Author

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

Copy link
Collaborator

@eranco74 eranco74 left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Feb 28, 2024
Signed-off-by: Javi Polo <jpolo@redhat.com>
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Feb 28, 2024
@javipolo javipolo marked this pull request as ready for review February 28, 2024 19:29
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 28, 2024
@@ -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}
Copy link
Collaborator

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?

Copy link
Collaborator Author

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 :)

Copy link
Collaborator

@eranco74 eranco74 left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Feb 29, 2024
@eranco74
Copy link
Collaborator

/approve

Copy link
Contributor

openshift-ci bot commented Feb 29, 2024

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 29, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit bc4d71f into openshift-kni:main Feb 29, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants