12 Star 0 Fork 15

src-openEuler/KubeOS

 / 详情

【24.03-lts-sp1】下发sysctl参数时,配置格式中存在引号,会配置失败

已验收
缺陷
创建于  
2024-12-03 21:07

【环境信息】
KubeOS-scripts-1.0.7-1.oe2403sp1

**【问题复现步骤】:
1、部署集群进行升级,配置文件如下:
'''

  • cat upgrade_v1alpha1_os.yaml
    apiVersion: upgrade.openeuler.org/v1alpha1
    kind: OS
    metadata:
    name: os-sample
    spec:
    imagetype: containerd
    opstype: upgrade
    osversion: KubeOS openEuler-24.03-LTS-SP1-2024-11-28-17-26-22
    maxunavailable: 3
    containerimage: $path
    evictpodforce: true
    imageurl: ""
    checksum: a86ceafcdff76e4dd93c08b7edad5624c705c94476968ebd1d14940b8dac1612
    flagSafe: true
    mtls: false
    upgradeconfigs:
    version: upg_1
    configs:
    - model: kernel.sysctl
    contents:
    - key: fs.mount-max
    value: '1000'
    - model: kernel.sysctl.persist
    contents:
    - key: key_upg
    value: '1'
    - model: grub.cmdline.current
    contents:
    - key: upg_cur
    value: '1'
    - model: grub.cmdline.next
    contents:
    - key: upg_next
    value: '1'
    sysconfigs:
    version: sys_1
    configs:
    - model: kernel.sysctl
    contents:
    - key: fs.mount-max
    value: '2000'
    - model: kernel.sysctl.persist
    contents:
    - key: key_sys
    value: '1'
    - model: grub.cmdline.current
    contents:
    - key: sys_cur
    value: '1'
    - model: grub.cmdline.next
    contents:
    - key: sys_next
    value: '1'
    '''
    【实际结果】
    镜像制作失败,但是返回值依旧为0
    '''
    ● os-agent.service - Agent For KubeOS^M
    Loaded: loaded (/usr/lib/systemd/system/os-agent.service; enabled; preset: disabled)^M
    Active: active (running) since Tue 2024-12-03 20:29:32 CST; 19min ago^M
    Main PID: 615 (os-agent)^M
    Tasks: 2 (limit: 23175)^M
    Memory: 5.5M ()^M
    CGroup: /system.slice/os-agent.service^M
    └─615 /usr/bin/os-agent^M
    ^M
    Dec 03 20:49:10 node1 os-agent[615]: [2024-12-03T12:49:10Z ERROR os_agent::function] Failed to write kernel.sysctl with key: "fs.mount-max": Invalid argument (os error 22)^M
    Dec 03 20:49:11 node1 os-agent[615]: [2024-12-03T12:49:11Z INFO os_agent::rpc::agent_impl] Start to configure^M
    Dec 03 20:49:11 node1 os-agent[615]: [2024-12-03T12:49:11Z INFO manager::sys_mgmt::config] Start setting kernel.sysctl^M
    Dec 03 20:49:11 node1 os-agent[615]: [2024-12-03T12:49:11Z ERROR os_agent::function] Failed to write kernel.sysctl with key: "fs.mount-max": Invalid argument (os error 22)^M
    Dec 03 20:49:12 node1 os-agent[615]: [2024-12-03T12:49:12Z INFO os_agent::rpc::agent_impl] Start to configure^M
    Dec 03 20:49:12 node1 os-agent[615]: [2024-12-03T12:49:12Z INFO manager::sys_mgmt::config] Start setting kernel.sysctl^M
    Dec 03 20:49:12 node1 os-agent[615]: [2024-12-03T12:49:12Z ERROR os_agent::function] Failed to write kernel.sysctl with key: "fs.mount-max": Invalid argument (os error 22)^M
    Dec 03 20:49:13 node1 os-agent[615]: [2024-12-03T12:49:13Z INFO os_agent::rpc::agent_impl] Start to configure^M
    Dec 03 20:49:13 node1 os-agent[615]: [2024-12-03T12:49:13Z INFO manager::sys_mgmt::config] Start setting kernel.sysctl^M
    Dec 03 20:49:13 node1 os-agent[615]: [2024-12-03T12:49:13Z ERROR os_agent::function] Failed to write kernel.sysctl with key: "fs.mount-max": Invalid argument (os error 22)^M
    '''
    【期望结果】
    下发后可以正常修改配置

【其他相关附件信息】
如上

评论 (1)

zzzzzzhao 创建了缺陷 3个月前
openeuler-ci-bot 添加了
 
sig/sig-CloudNative
标签
3个月前
zzzzzzhao 里程碑设置为openEuler-24.03-LTS-SP1-round3 3个月前
zzzzzzhao 计划开始日期设置为2024-11-29 3个月前
zzzzzzhao 计划截止日期设置为2024-12-05 3个月前
weiyuhang 通过合并 Pull Request !83: KubeOS: sync from upstream任务状态待办的 修改为已完成 3个月前
zzzzzzhao 任务状态已完成 修改为已验收 3个月前

登录 后才可以发表评论

状态
负责人
项目
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
预计工期 (小时)
参与者(2)
5329419 openeuler ci bot 1632792936 zzzzzzhao-zzzzzzhao
1
https://gitee.com/src-openeuler/KubeOS.git
git@gitee.com:src-openeuler/KubeOS.git
src-openeuler
KubeOS
KubeOS

搜索帮助