Skip to content

OCPBUGS-57072: configure-ovs: don't escape : in nmcli output #5106

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

Merged

Conversation

rbbratta
Copy link
Contributor

@rbbratta rbbratta commented Jun 4, 2025

nmcli --get-values will escape : and \ by default. This is because : is the normal key:value separator. This escape breaks IPv6 output and MAC address output.

src/nmcli/utils.c

	if (nmc_config->print_output == NMC_PRINT_TERSE) {
	    if (nmc_config->escape_values) {
		const char *p = text;
		while (*p) {
		    if (*p == ':' || *p == '\\')
			g_string_append_c(str, '\\'); /* Escaping by '\' */
		    g_string_append_c(str, *p);
		    p++;
		}
	    } else

nmcli --get-values will escape `:` and `\` by default.
This is because `:` is the normal key:value separator.
This escape breaks IPv6 output and MAC address output.

`src/nmcli/utils.c`
```c
	if (nmc_config->print_output == NMC_PRINT_TERSE) {
	    if (nmc_config->escape_values) {
		const char *p = text;
		while (*p) {
		    if (*p == ':' || *p == '\\')
			g_string_append_c(str, '\\'); /* Escaping by '\' */
		    g_string_append_c(str, *p);
		    p++;
		}
	    } else
```
@openshift-ci-robot openshift-ci-robot added jira/severity-critical Referenced Jira bug's severity is critical for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Jun 4, 2025
@openshift-ci-robot
Copy link
Contributor

@rbbratta: This pull request references Jira Issue OCPBUGS-57072, which is invalid:

  • expected the bug to target the "4.20.0" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

nmcli --get-values will escape : and \ by default. This is because : is the normal key:value separator. This escape breaks IPv6 output and MAC address output.

src/nmcli/utils.c

  if (nmc_config->print_output == NMC_PRINT_TERSE) {
      if (nmc_config->escape_values) {
  	const char *p = text;
  	while (*p) {
  	    if (*p == ':' || *p == '\\')
  		g_string_append_c(str, '\\'); /* Escaping by '\' */
  	    g_string_append_c(str, *p);
  	    p++;
  	}
      } else

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot requested review from cheesesashimi and djoshy June 4, 2025 15:03
@rbbratta
Copy link
Contributor Author

Looks okay with IPv6 DNS.

Jun 11 01:01:39 master-2 configure-ovs.sh[2992]: ++ nmcli --escape no --get-values ipv4.dns conn show 47985c50-3026-5b7c-a140-fdc2f2b62653
Jun 11 01:01:39 master-2 configure-ovs.sh[2497]: + ipv4_dns=192.168.111.1,192.168.111.22
Jun 11 01:01:39 master-2 configure-ovs.sh[2497]: + extra_if_brex_args+='ipv4.dns 192.168.111.1,192.168.111.22 '
Jun 11 01:01:39 master-2 configure-ovs.sh[2996]: ++ nmcli --escape no --get-values ipv6.dns conn show 47985c50-3026-5b7c-a140-fdc2f2b62653
Jun 11 01:01:39 master-2 configure-ovs.sh[2497]: + ipv6_dns=2001:4860:4860::8888
Jun 11 01:01:39 master-2 configure-ovs.sh[2497]: + extra_if_brex_args+='ipv6.dns 2001:4860:4860::8888 '
Jun 11 01:01:39 master-2 configure-ovs.sh[2497]: + add_nm_conn ovs-if-br-ex type ovs-interface slave-type ovs-port conn.interface br-ex master e3bcfafa-b0bd-4243-a856-1f594916d9f8 802-3-ethernet.mtu 1500 802-3-ethernet.cloned-mac-address 30:d0:42:56:66:c9 ipv4.method auto ipv4.route-metric 48 ipv6.method dhcp ipv6.route-metric 48 ipv4.may-fail no ipv4.dhcp-client-id mac ipv6.dhcp-duid ll ipv6.addr-gen-mode eui64 ipv4.dns 192.168.111.1,192.168.111.22 ipv6.dns 2001:4860:4860::8888 ipv4.ignore-auto-dns yes ipv6.ignore-auto-dns yes
Jun 11 01:01:39 master-2 configure-ovs.sh[2497]: + nmcli c add save no con-name ovs-if-br-ex type ovs-interface slave-type ovs-port conn.interface br-ex master e3bcfafa-b0bd-4243-a856-1f594916d9f8 802-3-ethernet.mtu 1500 802-3-ethernet.cloned-mac-address 30:d0:42:56:66:c9 ipv4.method auto ipv4.route-metric 48 ipv6.method dhcp ipv6.route-metric 48 ipv4.may-fail no ipv4.dhcp-client-id mac ipv6.dhcp-duid ll ipv6.addr-gen-mode eui64 ipv4.dns 192.168.111.1,192.168.111.22 ipv6.dns 2001:4860:4860::8888 ipv4.ignore-auto-dns yes ipv6.ignore-auto-dns yes connection.autoconnect no

@rbbratta
Copy link
Contributor Author

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Jun 11, 2025
@openshift-ci-robot
Copy link
Contributor

@rbbratta: This pull request references Jira Issue OCPBUGS-57072, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.20.0) matches configured target version for branch (4.20.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @rbbratta

In response to this:

/jira refresh

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

Copy link
Contributor

openshift-ci bot commented Jun 11, 2025

@openshift-ci-robot: GitHub didn't allow me to request PR reviews from the following users: rbbratta.

Note that only openshift members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

@rbbratta: This pull request references Jira Issue OCPBUGS-57072, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.20.0) matches configured target version for branch (4.20.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @rbbratta

In response to this:

/jira refresh

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@mkowalski
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jun 17, 2025
Copy link
Contributor

@yuqi-zhang yuqi-zhang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logically lgtm

Copy link
Contributor

openshift-ci bot commented Jun 17, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mkowalski, rbbratta, yuqi-zhang

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 17, 2025
@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD b3377c9 and 2 for PR HEAD 15e7e5e in total

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD a12b62b and 1 for PR HEAD 15e7e5e in total

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD a12b62b and 2 for PR HEAD 15e7e5e in total

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD a4ec776 and 1 for PR HEAD 15e7e5e in total

@mkowalski
Copy link
Contributor

/retest-required

@mkowalski
Copy link
Contributor

/test ?

Copy link
Contributor

openshift-ci bot commented Jun 19, 2025

@mkowalski: The following commands are available to trigger required jobs:

/test e2e-aws-ovn
/test e2e-aws-ovn-upgrade
/test e2e-gcp-op
/test e2e-gcp-op-single-node
/test e2e-hypershift
/test images
/test unit
/test verify
/test verify-deps

The following commands are available to trigger optional jobs:

/test bootstrap-unit
/test e2e-agent-compact-ipv4
/test e2e-aws-disruptive
/test e2e-aws-ovn-fips
/test e2e-aws-ovn-fips-op
/test e2e-aws-ovn-ocb-techpreview
/test e2e-aws-ovn-upgrade-ocb-techpreview
/test e2e-aws-ovn-upgrade-out-of-change
/test e2e-aws-ovn-windows
/test e2e-aws-ovn-workers-rhel8
/test e2e-aws-proxy
/test e2e-aws-serial
/test e2e-aws-single-node
/test e2e-aws-upgrade-single-node
/test e2e-aws-workers-rhel8
/test e2e-azure
/test e2e-azure-ovn-upgrade
/test e2e-azure-ovn-upgrade-out-of-change
/test e2e-azure-upgrade
/test e2e-gcp-op-ocl
/test e2e-gcp-op-techpreview
/test e2e-gcp-ovn-rt-upgrade
/test e2e-gcp-rt
/test e2e-gcp-rt-op
/test e2e-gcp-single-node
/test e2e-gcp-upgrade
/test e2e-hypershift-techpreview
/test e2e-metal-assisted
/test e2e-metal-ipi-ovn-dualstack
/test e2e-metal-ipi-ovn-ipv6
/test e2e-openstack
/test e2e-openstack-dualstack
/test e2e-openstack-externallb
/test e2e-openstack-hypershift
/test e2e-openstack-parallel
/test e2e-openstack-singlestackv6
/test e2e-ovirt
/test e2e-ovirt-upgrade
/test e2e-ovn-step-registry
/test e2e-vsphere
/test e2e-vsphere-ovn-upi
/test e2e-vsphere-ovn-upi-zones
/test e2e-vsphere-ovn-zones
/test e2e-vsphere-upgrade
/test okd-e2e-aws
/test okd-e2e-gcp-op
/test okd-e2e-upgrade
/test okd-e2e-vsphere
/test okd-images
/test okd-scos-e2e-aws-ovn
/test okd-scos-images
/test security

Use /test all to run the following jobs that were automatically triggered:

pull-ci-openshift-machine-config-operator-main-bootstrap-unit
pull-ci-openshift-machine-config-operator-main-e2e-agent-compact-ipv4
pull-ci-openshift-machine-config-operator-main-e2e-aws-ovn
pull-ci-openshift-machine-config-operator-main-e2e-aws-ovn-upgrade
pull-ci-openshift-machine-config-operator-main-e2e-aws-ovn-upgrade-out-of-change
pull-ci-openshift-machine-config-operator-main-e2e-aws-ovn-windows
pull-ci-openshift-machine-config-operator-main-e2e-azure-ovn-upgrade-out-of-change
pull-ci-openshift-machine-config-operator-main-e2e-gcp-op
pull-ci-openshift-machine-config-operator-main-e2e-gcp-op-ocl
pull-ci-openshift-machine-config-operator-main-e2e-gcp-op-single-node
pull-ci-openshift-machine-config-operator-main-e2e-gcp-op-techpreview
pull-ci-openshift-machine-config-operator-main-e2e-hypershift
pull-ci-openshift-machine-config-operator-main-images
pull-ci-openshift-machine-config-operator-main-okd-scos-e2e-aws-ovn
pull-ci-openshift-machine-config-operator-main-security
pull-ci-openshift-machine-config-operator-main-unit
pull-ci-openshift-machine-config-operator-main-verify
pull-ci-openshift-machine-config-operator-main-verify-deps

In response to this:

/test ?

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@mkowalski
Copy link
Contributor

/test e2e-metal-ipi-ovn-dualstack
/test e2e-metal-ipi-ovn-ipv6

1 similar comment
@mkowalski
Copy link
Contributor

/test e2e-metal-ipi-ovn-dualstack
/test e2e-metal-ipi-ovn-ipv6

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD a4ec776 and 2 for PR HEAD 15e7e5e in total

Copy link
Contributor

openshift-ci bot commented Jun 20, 2025

@rbbratta: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-gcp-op-ocl 15e7e5e link false /test e2e-gcp-op-ocl
ci/prow/e2e-azure-ovn-upgrade-out-of-change 15e7e5e link false /test e2e-azure-ovn-upgrade-out-of-change
ci/prow/e2e-metal-ipi-ovn-dualstack 15e7e5e link false /test e2e-metal-ipi-ovn-dualstack
ci/prow/e2e-metal-ipi-ovn-ipv6 15e7e5e link false /test e2e-metal-ipi-ovn-ipv6

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD 7177bf1 and 1 for PR HEAD 15e7e5e in total

@openshift-merge-bot openshift-merge-bot bot merged commit dbdfa3d into openshift:main Jun 21, 2025
17 of 21 checks passed
@openshift-ci-robot
Copy link
Contributor

@rbbratta: Jira Issue OCPBUGS-57072: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-57072 has been moved to the MODIFIED state.

In response to this:

nmcli --get-values will escape : and \ by default. This is because : is the normal key:value separator. This escape breaks IPv6 output and MAC address output.

src/nmcli/utils.c

  if (nmc_config->print_output == NMC_PRINT_TERSE) {
      if (nmc_config->escape_values) {
  	const char *p = text;
  	while (*p) {
  	    if (*p == ':' || *p == '\\')
  		g_string_append_c(str, '\\'); /* Escaping by '\' */
  	    g_string_append_c(str, *p);
  	    p++;
  	}
      } else

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-bot
Copy link
Contributor

[ART PR BUILD NOTIFIER]

Distgit: ose-machine-config-operator
This PR has been included in build ose-machine-config-operator-container-v4.20.0-202506212242.p0.gdbdfa3d.assembly.stream.el9.
All builds following this will include this PR.

@rbbratta
Copy link
Contributor Author

/label qe-approved

@openshift-ci openshift-ci bot added the qe-approved Signifies that QE has signed off on this PR label Jun 23, 2025
@openshift-ci-robot
Copy link
Contributor

@rbbratta: Jira Issue OCPBUGS-57072 is in an unrecognized state (ON_QA) and will not be moved to the MODIFIED state.

In response to this:

nmcli --get-values will escape : and \ by default. This is because : is the normal key:value separator. This escape breaks IPv6 output and MAC address output.

src/nmcli/utils.c

  if (nmc_config->print_output == NMC_PRINT_TERSE) {
      if (nmc_config->escape_values) {
  	const char *p = text;
  	while (*p) {
  	    if (*p == ':' || *p == '\\')
  		g_string_append_c(str, '\\'); /* Escaping by '\' */
  	    g_string_append_c(str, *p);
  	    p++;
  	}
      } else

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/severity-critical Referenced Jira bug's severity is critical for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. qe-approved Signifies that QE has signed off on this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants