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

Bug: Cert version info lost after config auto upgraded #4253

Open
dlarson04 opened this issue Feb 13, 2025 · 1 comment
Open

Bug: Cert version info lost after config auto upgraded #4253

dlarson04 opened this issue Feb 13, 2025 · 1 comment
Labels

Comments

@dlarson04
Copy link
Contributor

Describe the bug.

Had an environment where agent was installed using a local agent-install.cfg file so it doesn't have the config version... The cert and s/w version it downloads from MMS so it gets those.. I see this in the logs

I0213 16:27:42.790326      14 node.go:170] Exchange RPC retrieved device ISV_larson/edge-nodes-rtp3-20 from exchange Name: edge-nodes-rtp3-20, Owner: ISV_larson/ohuser, NodeType: cluster, ClusterNamespace: edge-nodes-rtp3-20, HAGroup: , Pattern , LastHeartbeat: 2025-02-13T16:26:31.734754389Z[UTC], MsgEndPoint: , Arch: amd64, HeartbeatIntv: {0 0 0}
I0213 16:27:42.790415      14 node.go:172] Exchange RPC device details for ISV_larson/edge-nodes-rtp3-20: Name: edge-nodes-rtp3-20, Owner: ISV_larson/ohuser, NodeType: cluster, ClusterNamespace: edge-nodes-rtp3-20, IsNamespaceScoped: true, HAGroup: , Pattern: , SoftwareVersions: map[certificate:1.0.0 config: horizon:2.31.0-1591], LastHeartbeat: 2025-02-13T16:26:31.734754389Z[UTC], RegisteredServices: [], MsgEndPoint: , Arch: amd64, UserInput: [], HeartbeatIntv: {0 0 0}
I0213 16:27:42.790440      14 cache.go:224] Update exchange cache NODE_DEF_CACHE/ISV_larson/edge-nodes-rtp3-20 with Name: edge-nodes-rtp3-20, Owner: ISV_larson/ohuser, NodeType: cluster, ClusterNamespace: edge-nodes-rtp3-20, IsNamespaceScoped: true, HAGroup: , Pattern: , SoftwareVersions: map[certificate:1.0.0 config: horizon:2.31.0-1591], LastHeartbeat: 2025-02-13T16:26:31.734754389Z[UTC], RegisteredServices: [], MsgEndPoint: , Arch: amd64, UserInput: [], HeartbeatIntv: {0 0 0}

There is an NMP that has points to a manifest that sets everything to latest

{
  "softwareUpgrade": {
    "version": "latest",
    "files": [
      "*"
    ]
  },
  "certificateUpgrade": {
    "version": "latest",
    "files": [
      "agent-install.crt"
    ]
  },
  "configurationUpgrade": {
    "version": "latest",
    "files": [
      "agent-install.cfg"
    ]
  }
}

When the agent registered and processed the NMP, it updated the cert level from "" to "1.0.0" but it lost the certificate level... I see this in the logs

I0213 16:32:44.209674      14 download_worker.go:332] Download worker: Current node version 2.31.0-1591 is the same as version 2.31.0-1591 from nmp ISV_larson/com-ibm-oh-agent. No need to download packages.
I0213 16:32:44.210184      14 download_worker.go:381] Download worker: Current cert version 1.0.0 is the same as version 1.0.0 from nmp ISV_larson/com-ibm-oh-agent. No need to download packages.
I0213 16:32:44.210224      14 download_worker.go:220] Download worker: Upgrade versions: swType: , configType: agent_config_files-1.0.0, certType:
I0213 16:32:44.210267      14 download_worker.go:121] Download worker: Attempting to download css file IBM/agent_config_files-1.0.0/agent-install.cfg to file /var/horizon/nmp
I0213 16:32:45.094664      14 node_management_status.go:15] Saving nmp status AgentUpgrade: ScheduledTime: 2025-02-13T16:31:55Z, ActualStartTime: , CompletionTime: , UpgradedVersions: SoftwareVersion: 2.31.0-1591, CertVersion: , ConfigVersion: 1.0.0, Status: downloaded, K8S: <nil>, ErrorMessage: , BaseWorkingDirectory: /var/horizon/nmp, AgentUpgradeInternal: AllowDowngrade: false, Manifest: latest, ScheduledUnixTime: 2025-02-13 16:31:55 +0000 UTC, LatestMap: SoftwareLatest: true, ConfigLatest: true, CertLatest: true
I0213 16:32:45.097564      14 node_management_status.go:40] Putting node management policy status for node ISV_larson/edge-nodes-rtp3-20 and policy ISV_larson/com-ibm-oh-agent. Status is: AgentUpgrade: ScheduledTime: 2025-02-13T16:31:55Z, ActualStartTime: , CompletionTime: , UpgradedVersions: SoftwareVersion: 2.31.0-1591, CertVersion: , ConfigVersion: 1.0.0, Status: downloaded, K8S: <nil>, ErrorMessage: , BaseWorkingDirectory: /var/horizon/nmp, AgentUpgradeInternal: <nil>.
I0213 16:32:45.097734      14 rpc.go:94] Exchange RPC Invoking exchange PUT at https://ibm-edge-exchange-qat2.multicloud-mesh.test.cloud.ibm.com/v1/orgs/ISV_larson/nodes/edge-nodes-rtp3-20/managementStatus/com-ibm-oh-agent with AgentUpgrade: ScheduledTime: 2025-02-13T16:31:55Z, ActualStartTime: , CompletionTime: , UpgradedVersions: SoftwareVersion: 2.31.0-1591, CertVersion: , ConfigVersion: 1.0.0, Status: downloaded, K8S: <nil>, ErrorMessage: , BaseWorkingDirectory: , AgentUpgradeInternal: <nil>

So the exchange now has this for the node

    "softwareVersions": {
      "certificate": "",
      "config": "1.0.0",
      "horizon": "2.31.0-1591"
    },

Describe the steps to reproduce the behavior.

No response

Expected behavior.

No response

Screenshots.

No response

Operating Environment

Linux

Additional Information

No response

@dlarson04 dlarson04 added the bug label Feb 13, 2025
@dlarson04
Copy link
Contributor Author

LiilyZhang added a commit to LiilyZhang/anax that referenced this issue Feb 13, 2025
LiilyZhang added a commit to LiilyZhang/anax that referenced this issue Feb 17, 2025
LiilyZhang added a commit to LiilyZhang/anax that referenced this issue Feb 18, 2025
LiilyZhang added a commit to LiilyZhang/anax that referenced this issue Feb 18, 2025
LiilyZhang added a commit to LiilyZhang/anax that referenced this issue Feb 21, 2025
LiilyZhang added a commit to LiilyZhang/anax that referenced this issue Feb 21, 2025
LiilyZhang added a commit to LiilyZhang/anax that referenced this issue Feb 26, 2025
LiilyZhang added a commit that referenced this issue Feb 27, 2025
Issue #4253 - Bug: Cert version info lost after config au…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant