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

Add installation configure of LH GuaranteedInstanceManagerCPU #706

Merged
merged 1 commit into from
Apr 18, 2024

Conversation

w13915984028
Copy link
Member

@w13915984028 w13915984028 commented Apr 16, 2024

Problem:

Per harvester/harvester#5568

Solution:

Update source code and document

Related Issue:
harvester/harvester#5568

Test plan:

Create new cluster, use a harvester-configuration file (step 13 of https://docs.harvesterhci.io/v1.2/install/index) with below items, after installation, check the embedded LH, the related setting is as expected.

https://longhorn.io/docs/1.5.3/references/settings/#guaranteed-instance-manager-cpu

install:
  harvester:
    longhorn:
      default_settings:
        guaranteedInstanceManagerCPU: 6

(valid values are in range [0..12], all other values are converted to 12)

LH chart:

chart/templates/default-setting.yaml:    {{- if not (kindIs "invalid" .Values.defaultSettings.guaranteedInstanceManagerCPU) }}
chart/templates/default-setting.yaml:    guaranteed-instance-manager-cpu: {{ .Values.defaultSettings.guaranteedInstanceManagerCPU }}
chart/README.md:| defaultSettings.guaranteedInstanceManagerCPU | Percentage of the total allocatable CPU resources on each node to be reserved for each instance manager pod when the V1 Data Engine is enabled. The default value is "12". |

** local test **

An expected value 3 of guaranteed-instance-manager-cpu is correctly set to LH via installation configure file.

config file

$ cat harvester-cfg-3.yaml 
scheme_version: 1
install:
  mode: create
  harvester:
    storageClass:
      replicaCount: 1
    longhorn:
      defaultSettings:
        guaranteedReplicaManagerCPU: 4
        guaranteedInstanceManagerCPU: 3

harvester saved config:

$ cat /oem/harvester.config 
schemeversion: 1
serverurl: ""
token: rancher
os:
...
    device: /dev/sda
    configurl: http://192.168.122.159:8000/harvester-cfg-3.yaml
...
    webhooks: []
    addons: {}
    harvester:
        storageclass:
            replicacount: 1
        longhorn:
            defaultsettings:
                guaranteedenginemanagercpu: null
                guaranteedreplicamanagercpu: 4
                guaranteedinstancemanagercpu: 3
        enablegocoverdir: false
    rawdiskimagepath: ""
    persistentpartitionsize: 150Gi

LH settings:

$ kubectl get settings.longhorn.io -A | grep gua

longhorn-system   guaranteed-instance-manager-cpu                                   3                                             35s  // target value

@w13915984028
Copy link
Member Author

w13915984028 commented Apr 16, 2024

@bk201 Kiefer suspect the CI failure may be related to harvester/harvester#5459, will double check with @FrankYang0529

Same failure is found in https://github.com/harvester/harvester-installer/actions/runs/8715101652/job/23906463527

@w13915984028
Copy link
Member Author

@Mergifyio backport v1.2 v1.3

Copy link

mergify bot commented Apr 16, 2024

backport v1.2 v1.3

✅ Backports have been created

pkg/config/cos.go Outdated Show resolved Hide resolved
Copy link
Contributor

@Vicente-Cheng Vicente-Cheng left a comment

Choose a reason for hiding this comment

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

lgtm, thanks!

Signed-off-by: Jian Wang <w13915984028@gmail.com>
@w13915984028
Copy link
Member Author

@bk201 The CI passed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants