Skip to content

Fix ansible 2.19 jinja incompatibility#3168

Merged
rabi merged 1 commit into
openstack-k8s-operators:mainfrom
rabi:ansible_2.19
Aug 12, 2025
Merged

Fix ansible 2.19 jinja incompatibility#3168
rabi merged 1 commit into
openstack-k8s-operators:mainfrom
rabi:ansible_2.19

Conversation

@rabi

@rabi rabi commented Jul 30, 2025

Copy link
Copy Markdown
Contributor

With ansible 2.19 it prints the return value of the mtu_list.append() as None and the network config is not parseable with os-net-config and it fails with,

os_net_config.main No interfaces defined in config: /etc/os-net-config/config.yaml"]}

jira: OSPRH-18609

Signed-off-by: rabi <ramishra@redhat.com>
@rabi rabi requested review from a team as code owners July 30, 2025 01:26
rabi added a commit to rabi/edpm-ansible that referenced this pull request Jul 30, 2025
rabi added a commit to rabi/edpm-ansible that referenced this pull request Jul 30, 2025
rabi added a commit to rabi/edpm-ansible that referenced this pull request Jul 31, 2025
Non boolean conditionals are not allowed in ansible 2.19.
Fix private var access from namespace not allowed

Depends-On: openstack-k8s-operators/openstack-operator#1547
Depends-On: openstack-k8s-operators/ci-framework#3168
Signed-off-by: rabi <ramishra@redhat.com>
rabi added a commit to rabi/edpm-ansible that referenced this pull request Aug 1, 2025
Non boolean conditionals are not allowed in ansible 2.19.
Fix private var access from namespace not allowed

Depends-On: openstack-k8s-operators/openstack-operator#1547
Depends-On: openstack-k8s-operators/ci-framework#3168
Signed-off-by: rabi <ramishra@redhat.com>
rabi added a commit to rabi/edpm-ansible that referenced this pull request Aug 1, 2025
Non boolean conditionals are not allowed in ansible 2.19.
Fix private var access from namespace not allowed

Depends-On: openstack-k8s-operators/openstack-operator#1547
Depends-On: openstack-k8s-operators/ci-framework#3168
Signed-off-by: rabi <ramishra@redhat.com>
@rabi

rabi commented Aug 11, 2025

Copy link
Copy Markdown
Contributor Author

We need to merge this, as openstack-k8s-operators/edpm-ansible#993 has already merged.

@danpawlik danpawlik left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't like the commit message, but I can live with that.

@rabi rabi enabled auto-merge (rebase) August 12, 2025 01:55
@rabi

rabi commented Aug 12, 2025

Copy link
Copy Markdown
Contributor Author

I don't like the commit message, but I can live with that.

Linked jira has the details. Anyway, I've updated it now.

@jokke-ilujo

Copy link
Copy Markdown

/approve

@openshift-ci

openshift-ci Bot commented Aug 12, 2025

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by: jokke-ilujo

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

The pull request process is described here

Details 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

@rabi rabi merged commit a3d2915 into openstack-k8s-operators:main Aug 12, 2025
8 checks passed
@danpawlik

Copy link
Copy Markdown
Contributor

Probably it would fix error:

fatal: [compute-0]: FAILED! => {"ansible_job_id": "j925253240665.63263", "changed": false, "finished": true, "msg": "Running os-net-config --config-file /etc/os-net-config
/config.yaml --cleanup --debug --detailed-exit-codes --provider nmstate failed with return code 1.", "rc": 1, "results_file": "/root/.ansible_async/j925253240665.63263", "
started": true, "stderr": "", "stderr_lines": [], "stdout": "2025-08-12 07:01:40.883 INFO os_net_config.main Using config file at: /etc/os-net-config/config.yaml\n2025-08-
12 07:01:40.883 INFO os_net_config.main Not using any mapping file.\n2025-08-12 07:01:40.883 INFO os_net_config.get_iface_config Reading /etc/os-net-config/config.yaml for
 network_config section\n2025-08-12 07:01:40.889 INFO os_net_config.common.print_config \nnetwork_config:\nnull\n...\n\n2025-08-12 07:01:40.889 ERROR os_net_config.get_ifa
ce_config No interfaces defined in config: /etc/os-net-config/config.yaml\n", "stdout_lines": ["2025-08-12 07:01:40.883 INFO os_net_config.main Using config file at: /etc/
os-net-config/config.yaml", "2025-08-12 07:01:40.883 INFO os_net_config.main Not using any mapping file.", "2025-08-12 07:01:40.883 INFO os_net_config.get_iface_config Rea
ding /etc/os-net-config/config.yaml for network_config section", "2025-08-12 07:01:40.889 INFO os_net_config.common.print_config ", "network_config:", "null", "...", "", "
2025-08-12 07:01:40.889 ERROR os_net_config.get_iface_config No interfaces defined in config: /etc/os-net-config/config.yaml"]}

softwarefactory-project-zuul Bot added a commit to openstack-k8s-operators/architecture that referenced this pull request Aug 13, 2025
Update jinja2 template to work with ansible 2.19

Corresponding cifmw fix: openstack-k8s-operators/ci-framework#3168.

Reviewed-by: Rabi Mishra <ramishra@redhat.com>
Reviewed-by: John Fulton <johfulto@redhat.com>
@tosky

tosky commented Aug 19, 2025

Copy link
Copy Markdown
Contributor

/cherry-pick 18.0-fr3

@openshift-cherrypick-robot

Copy link
Copy Markdown

@tosky: cannot checkout 18.0-fr3: error checking out "18.0-fr3": exit status 1 error: pathspec '18.0-fr3' did not match any file(s) known to git

Details

In response to this:

/cherry-pick 18.0-fr3

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.

@tosky

tosky commented Aug 19, 2025

Copy link
Copy Markdown
Contributor

/cherry-pick 18.0-fr3

Ups, please ignore this, I just wanted to backport a similar change in another repository and used the wrong browser window.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants