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] Pasting multi-line environment variables into "Agent Environment Vars" results in incorrect parsing of values #13070

Open
skanakal opened this issue Jan 12, 2025 · 1 comment · May be fixed by #13071
Labels
area/clusterprovisioningv2 JIRA kind/bug QA/dev-automation Issues that engineers have written automation around so QA doesn't have look at this
Milestone

Comments

@skanakal
Copy link
Contributor

skanakal commented Jan 12, 2025

Setup

  • Rancher version: 2.9.4, master
  • Rancher UI Extensions:
  • Browser type & version: Any

Describe the bug

When copying and pasting a multi-line string of environment variables into the "variable name" field in Cluster Manager’s Agent Environment Vars section, the values are incorrectly parsed. This happens when the pasted string includes multiple key-value pairs separated by either = or :. The values are not properly extracted, causing incorrect data.

To Reproduce

  1. Copy the following multi-line string:
guestinfo.interface.0.ip.0.address=ip:${var.tools_cluster_infra.network}
guestinfo.interface.0.ip.0.netmask=$${netmask:${var.tools_cluster_infra.network}}
guestinfo.interface.0.route.0.gateway=$${gateway:${var.tools_cluster_infra.network}}
guestinfo.dns.servers=$${dns:${var.tools_cluster_infra.network}}
  1. Navigate to Cluster Manager.
  2. Go to Create custom RKE2 Cluster
  3. Select the Agent Environment Vars section.
  4. Paste the copied content into the Variable Name field.

Result
The values are not parsed correctly, resulting in incorrectly formatted values. The environment variables are not populated as expected.

Expected Result

The pasted multi-line string should be correctly parsed into key-value pairs by splitting on the first occurrence of = or :.

Screenshots

image

Additional context

SURE-9553

@github-actions github-actions bot added the QA/dev-automation Issues that engineers have written automation around so QA doesn't have look at this label Jan 12, 2025
@richard-cox
Copy link
Member

This should be reviewed as part of the work for #12720

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/clusterprovisioningv2 JIRA kind/bug QA/dev-automation Issues that engineers have written automation around so QA doesn't have look at this
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants