8000 Increase memory resource from 9126 to 10752 by praveenkumar · Pull Request #4066 · crc-org/crc · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Increase memory resource from 9126 to 10752 #4066

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

Merged
merged 3 commits into from
Apr 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ all: install

SHELL := /bin/bash

OPENSHIFT_VERSION ?= 4.14.12
OPENSHIFT_VERSION ?= 4.15.3
PODMAN_VERSION ?= 4.4.4
OKD_VERSION ?= 4.14.0-0.okd-scos-2024-01-10-151818
MICROSHIFT_VERSION ?= 4.15.0
MICROSHIFT_VERSION ?= 4.15.3
BUNDLE_EXTENSION = crcbundle
CRC_VERSION = 2.34.0
COMMIT_SHA?=$(shell git rev-parse --short=6 HEAD)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Values for available memory are set in mebibytes (MiB).
One gibibyte (GiB) of memory is equal to 1024 MiB.
====
+
The default value for the `memory` property is `9216`.
The default value for the `memory` property is `10752`.
The amount of memory to assign must be greater than or equal to the default.

* To start the instance with the desired amount of memory:
Expand Down
2 changes: 1 addition & 1 deletion pkg/crc/api/api_client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ func TestConfigGetMultiple(t *testing.T) {
apiClient.GetConfigResult{
Configs: map[string]interface{}{
"cpus": float64(4),
"memory": float64(9216),
"memory": float64(10752),
},
},
configGetMultiplePropertyResult,
Expand Down
12 changes: 6 additions & 6 deletions pkg/crc/config/settings_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@ func TestSetPreset(t *testing.T) {

_, err = cfg.Set(Preset, crcpreset.Podman)
require.NoError(t, err)
_, err = cfg.Set(Memory, 10000)
_, err = cfg.Set(Memory, 10800)
require.NoError(t, err)
assert.Equal(t, SettingValue{
Value: 10000,
Value: 10800,
Invalid: false,
IsDefault: false,
IsSecret: false,
Expand All @@ -99,7 +99,7 @@ func TestSetPreset(t *testing.T) {
_, err = cfg.Set(Preset, crcpreset.OpenShift)
require.NoError(t, err)
assert.Equal(t, SettingValue{
Value: 10000,
Value: 10800,
Invalid: false,
IsDefault: false,
IsSecret: false,
Expand All @@ -120,10 +120,10 @@ func TestUnsetPreset(t *testing.T) {

_, err = cfg.Set(Preset, crcpreset.Podman)
require.NoError(t, err)
_, err = cfg.Set(Memory, 10000)
_, err = cfg.Set(Memory, 10800)
require.NoError(t, err)
assert.Equal(t, SettingValue{
Value: 10000,
Value: 10800,
Invalid: false,
IsDefault: false,
IsSecret: false,
Expand All @@ -147,7 +147,7 @@ func TestUnsetPreset(t *testing.T) {
IsSecret: false,
}, cfg.Get(Preset))
assert.Equal(t, SettingValue{
Value: 10000,
Value: 10800,
Invalid: false,
IsDefault: false,
IsSecret: false,
Expand Down
4 changes: 2 additions & 2 deletions pkg/crc/constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,14 +216,14 @@ func GetDefaultCPUs(preset crcpreset.Preset) int {
func GetDefaultMemory(preset crcpreset.Preset) int {
switch preset {
case crcpreset.OpenShift, crcpreset.OKD:
return 9216
return 10752
case crcpreset.Podman:
return 2048
case crcpreset.Microshift:
return 4096
default:
// should not be reached
return 9216
return 10752
}
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/libmachine/host/migrate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func TestLoadHost(t *testing.T) {
"IPAddress": "192.168.130.11",
"MachineName": "crc",
"BundleName": "crc_libvirt_4.6.6.crcbundle",
"Memory": 9216,
"Memory": 10752,
"CPU": 4
}`

Expand Down
6 changes: 3 additions & 3 deletions test/e2e/features/config.feature
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,23 @@ Feature: Test configuration settings
Examples: Config settings on Mac
| property | value1 | value2 |
| cpus | 5 | 3 |
| memory | 9217 | 4096 |
| memory | 10753 | 4096 |
| nameserver | 120.0.0.1 | 999.999.999.999 |
| pull-secret-file | /etc | /nonexistent-file |

@linux
Examples: Config settings on Linux
| property | value1 | value2 |
| cpus | 5 | 3 |
| memory | 9217 | 4096 |
| memory | 10753 | 4096 |
| nameserver | 120.0.0.1 | 999.999.999.999 |
| pull-secret-file | /etc | /nonexistent-file |

@windows
Examples: Config settings on Windows
| property | value1 | value2 |
| cpus | 5 | 3 |
| memory | 9217 | 4096 |
| memory | 10753 | 4096 |
| nameserver | 120.0.0.1 | 999.999.999.999 |
| pull-secret-file | /Users | /nonexistent-file |

Expand Down
3 changes: 2 additions & 1 deletion test/e2e/features/story_openshift.feature
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
Feature: 4 Openshift stories

Background:
Given ensuring CRC cluster is running
Given setting config property "disk-size" to value "40" succeeds
And ensuring CRC cluster is running
And ensuring oc command is available
And ensuring user is logged in succeeds

Expand Down
2 changes: 1 addition & 1 deletion test/integration/proxy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ var _ = Describe("", Serial, Ordered, Label("openshift-preset", "goproxy"), func
})

It("start CRC", func() {
// default values: "--memory", "9216", "--cpus", "4", "disk-size", "31"
// default values: "--memory", "10752", "--cpus", "4", "disk-size", "31"
if bundlePath == "" {
Expect(RunCRCExpectSuccess("start", "-p", pullSecretPath)).To(ContainSubstring("Started the OpenShift cluster"))
} else {
Expand Down
10 changes: 5 additions & 5 deletions test/integration/resize_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ var _ = Describe("vary VM parameters: memory cpus, disk", Serial, Ordered, Label
})

It("start CRC", func() {
// default values: "--memory", "9216", "--cpus", "4", "disk-size", "31"
// default values: "--memory", "10752", "--cpus", "4", "disk-size", "31"
if bundlePath == "" {
Expect(RunCRCExpectSuccess("start", "--memory", "12000", "--cpus", "5", "--disk-size", "40", "-p", pullSecretPath)).To(ContainSubstring("Started the OpenShift cluster"))
} else {
Expand Down Expand Up @@ -118,8 +118,8 @@ var _ = Describe("vary VM parameters: memory cpus, disk", Serial, Ordered, Label

Describe("use flawed values", Serial, Ordered, func() {

It("start CRC with sub-minimum memory", func() { // less than min = 9216
Expect(RunCRCExpectFail("start", "--memory", "9000")).To(ContainSubstring("requires memory in MiB >= 9216"))
It("start CRC with sub-minimum memory", func() { // less than min = 10752
Expect(RunCRCExpectFail("start", "--memory", "9000")).To(ContainSubstring("requires memory in MiB >= 10752"))
})
It("start CRC with sub-minimum cpus", func() { // fewer than min
Expect(RunCRCExpectFail("start", "--cpus", "3")).To(ContainSubstring("requires CPUs >= 4"))
Expand All @@ -139,13 +139,13 @@ var _ = Describe("vary VM parameters: memory cpus, disk", Serial, Ordered, Label
Describe("use default values again", Serial, Ordered, func() {

It("start CRC", func() {
Expect(RunCRCExpectSuccess("start")).To(ContainSubstring("Started the OpenShift cluster")) // default values: "--memory", "9216", "--cpus", "4", "disk-size", "31"
Expect(RunCRCExpectSuccess("start")).To(ContainSubstring("Started the OpenShift cluster")) // default values: "--memory", "10752", "--cpus", "4", "disk-size", "31"
})

It("check VM's memory size", func() {
out, err := util.SendCommandToVM("cat /proc/meminfo")
Expect(err).NotTo(HaveOccurred())
Expect(out).Should(MatchRegexp(`MemTotal:[\s]*9\d{6}`)) // there should be a check if cluster needs >9216MiB; it isn't there and mem gets scaled down regardless
Expect(out).Should(MatchRegexp(`MemTotal:[\s]*1\d{6}`)) // there should be a check if cluster needs >10752MiB; it isn't there and mem gets scaled down regardless
})

It("check VM's number of cpus", func() {
Expand Down
0