deckhouse / deckhouse/deckhouse

[dhctl] Bootstrap command does not output some errors

Open
#684 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/cli priority/backlog
Dominant language
Go
Stars
1.3k
Forks
162
Avg merge
1d 5h
Merged PRs (30d)
653

Description

Preflight Checklist
  • I agree to follow the Code of Conduct that this project adheres to.
  • I have searched the issue tracker for an issue that matches the one I want to file, without success.
Version

v1.30.0

Expected Behavior

If deckhouse has error while bootstrap, we will output it.

Actual Behavior

This error did not output.

ModuleRun failed. Requeue task to retry after delay. Failed count is 3. Error: template: node-manager/templates/monitoring.yaml:1:4: executing "node-manager/templates/monitoring.yaml" at <include "helm_lib_prometheus_rules" (list . "d8-cloud-instance-manager")>: error calling include: template: node-manager/charts/helm_lib/templates/_monitoring_prometheus_rules.tpl:59:4: executing "helm_lib_prometheus_rules" at <include "helm_lib_prometheus_rules_recursion" (list $context $namespace "monitoring/prometheus-rules")>: error calling include: template: node-manager/charts/helm_lib/templates/_monitoring_prometheus_rules.tpl:18:24: executing "helm_lib_prometheus_rules_recursion" at <tpl ($context.Files.Get $path) $context>: error calling tpl: error during tpl function execution for "- name: d8.node-unmanaged\n  rules:\n    - alert: D8NodeIsUnmanaged\n      expr: max by (node) (d8_unmanaged_nodes_on_cluster) > 0\n      for: 10m\n      labels:\n        tier: cluster\n        severity_level: \"9\"\n      annotations:\n        plk_markup_format: \"markdown\"\n        plk_protocol_version: \"1\"\n        plk_incident_initial_status: \"todo\"\n        plk_grouped_by__main: \"D8ClusterHasUnmanagedNodes,tier=cluster,prometheus=deckhouse\"\n    {{- if .Values.global.modules.publicDomainTemplate }}\n        summary: The {{`{{ $labels.node }}`}} Node is not managed by the [node-manager]({{ include \"helm_lib_module_uri_scheme\" . }}://{{ include \"helm_lib_module_public_domain\" (list . \"deckhouse\") }}/modules/040-node-manager/) module.\n        description: |\n          The {{`{{ $labels.node }}`}} Node is not managed by the [node-manager]({{ include \"helm_lib_module_uri_scheme\" . }}://{{ include \"helm_lib_module_public_domain\" (list . \"deckhouse\") }}/modules/040-node-manager/) module.\n    {{- else }}\n        summary: The {{`{{ $labels.node }}`}} Node is not managed by the `node-manager`.\n        description: |\n          The {{`{{ $labels.node }}`}} Node is not managed by the `node-manager`.\n    {{- end }}\n\n          The recommended actions are as follows:\n          - Create a `NodeGroup` for the Node or select the existing one;\n          - Add a `node.deckhouse.io/group: <nodeGroup_name>`: `kubectl label node {{`{{ $labels.node }}`}} node.deckhouse.io/group=<nodeGroup_name>` label to it;\n          - Get the script for adopting the Node: `kubectl -n d8-cloud-instance-manager get secret manual-bootstrap-for-<nodeGroup_name> -o json | jq '.data.\"adopt.sh\"' -r`;\n          - Perform `base64` decoding on the {{`{{ $labels.node }}`}} Node: `echo <base64_string> | base64 -d | bash`;\n          - Analyze the execution log: `journalctl -fu bashible`.\n    - alert: D8ClusterHasUnmanagedNodes\n      expr: count(ALERTS{alertname=\"D8NodeIsUnmanaged\", alertstatie=\"firing\"}) > 0\n      for: 10m\n      labels:\n        tier: cluster\n      annotations:\n        plk_markup_format: \"markdown\"\n        plk_protocol_version: \"1\"\n        plk_alert_type: \"group\"\n        summary: There are Nodes in the cluster that are not managed by `node-manager`.\n        description: There are Nodes in the cluster that are not managed by `node-manager`. See the relevant alerts for more information.\n\n": template: node-manager/templates/monitoring.yaml:15:91: executing "node-manager/templates/monitoring.yaml" at <include "helm_lib_module_uri_scheme" .>: error calling include: template: node-manager/charts/helm_lib/templates/_module_https.tpl:6:24: executing "helm_lib_module_uri_scheme" at <include "helm_lib_module_https_mode" $context>: error calling include: template: node-manager/charts/helm_lib/templates/_module_https.tpl:64:23: executing "helm_lib_module_https_mode" at <include "helm_lib_https_values" $context>: error calling include: template: node-manager/charts/helm_lib/templates/_module_https.tpl:50:85: executing "helm_lib_https_values"
Steps To Reproduce
  1. Try bootstrap cluster with errors in helm templates.
Additional Information

Probably, Helm errors is skipping, in current time.

Logs

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the dhctl bootstrap flow and the Helm template error shown in the report. Trace where bootstrap errors are collected and output, then reproduce with errors in Helm templates. Done means the reported Helm error is displayed during bootstrap; add or update the relevant test if the existing flow has coverage.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, helm
Domain
cli, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.