-
Notifications
You must be signed in to change notification settings - Fork 232
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
Install LVMCluster
resource during crc start
#4114
base: main
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
pkg/crc/config/settings.go
Outdated
@@ -37,6 +37,7 @@ const ( | |||
EmergencyLogin = "enable-emergency-login" | |||
PersistentVolumeSize = "persistent-volume-size" | |||
EnableBundleQuayFallback = "enable-bundle-quay-fallback" | |||
SecondaryDiskSize = "secondary-disk-size" |
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.
Isn't this similar to PersistentVolumeSize
?
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.
yes practically they are the same, one difference is that secondary-disk-size
is at the VM level similar to cpus
,memory
and persistent-volume-size
is at the openshift cluster level
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.
Do we need to expose this difference to the user?
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.
nope, going to use the same config key persistent-volume-size
and remove the newly added one
pkg/drivers/vfkit/driver_darwin.go
Outdated
if crcos.FileExists(d.getSecondaryDiskPath()) { | ||
return nil | ||
} | ||
_, err := diskfs.Create(d.getSecondaryDiskPath(), int64(d.SecondaryDiskSize), diskfs.Raw, diskfs.SectorSizeDefault) |
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.
Is diskfs
required? Could this use os.Truncate
directly to create an empty disk image?
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.
yes, this works, tried using os.Truncate
, we have to first create an empty file and then change the size using os.Truncate
cmd/crc/cmd/start.go
Outdated
@@ -79,6 +79,7 @@ func runStart(ctx context.Context) (*types.StartResult, error) { | |||
IngressHTTPPort: config.Get(crcConfig.IngressHTTPPort).AsUInt(), | |||
IngressHTTPSPort: config.Get(crcConfig.IngressHTTPSPort).AsUInt(), | |||
EnableSharedDirs: config.Get(crcConfig.EnableSharedDirs).AsBool(), | |||
SecondaryDiskSize: config.Get(crcConfig.SecondaryDiskSize).AsInt(), |
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.
Here we assume only a second disk could exist. But what about Disks
?
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.
to make it work with more disks, we'd have to create a separate DiskConfig
type maybe.. containing the path and the size then add that to the drivers, i went with this simpler approach to first take care of the requirements for installing topolvm
this PR is not needed anymore, the snc PRs:
|
after using topolvm as storage provisioner there's two partitions of type xfs and its ambiguos which is the root partition but the root partition also has a label 'root' in case of the ocp bundle
/wip |
/hold |
this allows users to also configure the persistent volume's partition size for the ocp preset, in case of ocp preset the default size of the persistent volume partition (topolvm partition) is 3G
this adds code to move topolvm partition and restart the VM which is needed to re-read the changed partition table, after moving the topolvm partition the root partition can be grown since the pv storage is on a separate parition users can also configure its size using the 'persistent-volume-size' config
this makes it a bit easier to navigate the start.go file by moving some of the disk size and partition modification functions into a separate disks.go file in the same machine package
@anjannath: The following tests failed, say
Full PR test history. Your PR dashboard. 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 kubernetes-sigs/prow repository. I understand the commands that are listed here. |
fixes #4097
needs crc-org/machine-driver-libvirt#115