Skip to content

fix: infra-openshift-cnv-resources network config not valid JSON#9776

Open
prakhar1985 wants to merge 2 commits intodevelopmentfrom
fix-infra-cnv-network-json
Open

fix: infra-openshift-cnv-resources network config not valid JSON#9776
prakhar1985 wants to merge 2 commits intodevelopmentfrom
fix-infra-cnv-network-json

Conversation

@prakhar1985
Copy link
Copy Markdown
Collaborator

Problem

infra-openshift-cnv-resources/tasks/create_network.yaml defines config
as a Python-style dict string (single quotes):

```yaml
config: "{'cniVersion':'0.3.1','type':'ovn-k8s-cni-overlay',...}"
```

Applying | to_json to a string just wraps it in JSON string quotes
rather than converting the content to JSON. Multus webhook rejects the
resulting NetworkAttachmentDefinition:

```
admission webhook "multus-validating-config.k8s.io" denied the request:
configuration string is not in JSON format
```

Fix

Define config as a proper YAML dict. | to_json on a dict produces
valid JSON that Multus accepts.

Affects

lb1404 and any other catalog item using infra-openshift-cnv-resources
with CNV network attachment definitions.

The config var was defined as a single-quoted Python dict string.
Applying | to_json to a string just wraps it in quotes rather than
converting it to valid JSON, causing Multus webhook to reject the
NetworkAttachmentDefinition with 'configuration string is not in
JSON format'.

Defining config as a proper YAML dict ensures | to_json produces
valid JSON that Multus accepts.
@prakhar1985 prakhar1985 requested a review from a team as a code owner April 16, 2026 06:40
@github-actions github-actions Bot added the core label Apr 16, 2026
local_bastion is a string (VM name). ansible-core 2.18 requires
conditionals to return a boolean, not a string. 'local_bastion is defined'
correctly checks if the bastion was found without relying on string
truthiness.
@agonzalezrh
Copy link
Copy Markdown
Collaborator

Use EE chain 4-10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants