Monitoring Console: Reference to LM in other NS breaks MC

未关闭
#1,886 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
55/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
go, kubernetes
领域
backend

调研方向

Start by tracing how MonitoringConsole handles licenseManagerRef and adds the LicenseManager as a monitored resource, then inspect the cross-namespace reference validation and credential setup. Reproduce with the two instances in separate namespaces and different passwords; done means the MonitoringConsole starts successfully or the reference is rejected with a clear validation error.

由索引模型根据 Issue 内容生成。

描述

monitoring console
Please select the type of request

Bug

Tell us more

Describe the request
Although documentation and CRDs differ in specification, apparently the monitoringConsoleRef is not supposed to link resources from other namespaces.
However, when a MonitoringConsole receives a licenseManagerRef, it adds the LicenseManager as monitored resource. When both instances are deployed within different namespaces and do not share a password, the MonitoringConsole will no longer be able to start, as it tries to authenticate to the LicenseManager with it's local, non-matching password.

FAILED - RETRYING: [localhost]: Set search peers (44 retries left).Result was: {                                                                                                                                                                                                                  
    "attempts": 17,                                                                                                                                                                                                                                                                               
    "changed": false,                                                                                                                                                                                                                                                                             
    "cmd": [                                                                                                                                                                                                                                                                                      
        "/opt/splunk/bin/splunk",                                                                                                                                                                                                                                                                 
        "add",                                                                                                                                                                                                                                                                                    
        "search-server",                                                                                                                                                                                                                                                                          
        "https://splunk-shared-license-manager-service.splunk-shared.svc.cluster.local:8089",                                                                                                                                                                                                     
        "-auth",                                                                                                                                                                                                                                                                                  
        "admin:<MC Password>",                                                                                                                                                                                                                                                         
        "-remoteUsername",                                                                                                                                                                                                                                                                        
        "admin",                                                                                                                                                                                                                                                                                  
        "-remotePassword",                                                                                                                                                                                                                                                                        
        "<MC Password>"                                                                                                                                                                                                                                                                
    [],                                                                                                                                                                                                                                                                                           
    "delta": "0:00:01.093771",                                                                                                                                                                                                                                                                    
    "end": "2026-10-27 22:37:22.047758",                                                                                                                                                                                                                                                          
    "failed_when_result": true,                                                                                                                                                                                                                                                                   
    "invocation": {                                                                                                                                                                                                                                                                               
        "module_args": {                                                                                                                                                                                                                                                                          
            "_raw_params": "/opt/splunk/bin/splunk add search-server https://splunk-shared-license-manager-service.splunk-shared.svc.cluster.local:8089 -auth admin:<MC Password> -remoteUsername admin -remotePassword <MC Password>",                                     
            "_uses_shell": false,                                                                                                                                                                                                                                                                 
            "argv": null,                                                                                                                                                                                                                                                                         
            "chdir": null,                                                                                                                                                                                                                                                                        
            "creates": null,                                                                                                                                                                                                                                                                      
            "executable": null,                                                                                                                                                                                                                                                                   
            "expand_argument_vars": true,                                                                                                                                                                                                                                                         
            "removes": null,                                                                                                                                                                                                                                                                      
            "stdin": null,                                                                                                                                                                                                                                                                        
            "stdin_add_newline": true,                                                                                                                                                                                                                                                            
            "strip_empty_ends": true                                                                                                                                                                                                                                                              
        }                                                                                                                                                                                                                                                                                         
    },                                                                                                                                                                                                                                                                                            
    "rc": 24,                                                                                                                                                                                                                                                                                     
    "retries": 61,                                                                                                                                                                                                                                                                                
    "start": "2026-10-27 22:37:20.953987"                                                                                                                                                                                                                                                         
}                                                              

STDERR:                                                                                                                                                                                                                                                                                           
                                                                                                                                                                                                                                                                                                  
WARNING: Server Certificate Hostname Validation is disabled. Please see server.conf/[sslConfig]/cliVerifyServerName for details.                                                                                                                                                                  
                                                                                                                                                                                                                                                                                                  
An error occurred:                                                                                                                                                                                                                                                                                
Status 401 while sending public key to search peer https://splunk-shared-license-manager-service.splunk-shared.svc.cluster.local:8089: Unauthorized                                                                                                                                               
                                                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                                                  
MSG:                                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                                  
non-zero return code                        

Expected behavior
The value for remotePassword should be the password of the namespace that holds the LicenseManager, not the local password of the namespace with the MonitoringConsole.

Splunk setup on K8S
See reproduction steps.

Reproduction/Testing steps

  • Create two namespaces and setup a shared pass4SymmKey (to enable licenseManagerRef to other namespace)
  • Namespace secrets must not specify a shared password
  • Deploy LicenseManager in one namespace, no monitoringConsoleRef required
  • Deploy MonitoringConsole in other namespace with licenseManagerRef to LicenseManager in first namespace

K8s environment
SOK 3.2.0
k8s v1.36.5

Proposed changes(optional)
Either use the correct password or don't automatically setup monitoring of the referenced LM.

主要语言
Go
星标
260
派生
134
PR 合并指标
30 天内没有已合并 PR

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

splunk/splunk-operator 的其他 Issue

查看 splunk/splunk-operator 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。