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

Use copy instead of template for disconnected registries.conf #808

Conversation

bshephar
Copy link
Contributor

@bshephar bshephar commented Nov 13, 2024

This change switches the Ansible module from template to copy for writing the disconnected registries.conf file. Since trying to use src in the template module looks for a path and not content.

Jira: https://issues.redhat.com/browse/OSPRH-11475

Copy link
Contributor

@rabi rabi left a comment

Choose a reason for hiding this comment

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

Did we not test it at all? That would have never worked.

@bshephar
Copy link
Contributor Author

Did we not test it at all? That would have never worked.

I checked the container I built to test this in my lab, it used copy and content. It seems I then got distracted by the issues I was having with the openstack-operator side of the change and forgot to update my PR for edpm-ansible. My bad.

ansible.builtin.template:
src: "{{ edpm_podman_registries_conf }}"
ansible.builtin.copy:
content: "{{ edpm_podman_registries_conf }}"
Copy link
Contributor

Choose a reason for hiding this comment

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

this LGTM as a fix.
I missed reviewing the original patch that added the variable. I think we need a way to distinguish between variables that are meant to be set by our code (openstack-operator in this case), and user variables. As it is now, a user has no way of knowing that they shouldn't use this variable themselves, and if they do, it might not even take effect as they intend.

Just looking at the variable, and the description in argument_specs.yml, as I user I would expect I could use this to define the registries.conf content. When in fact, it only works with disconnected, and could also be overwritten by openstack-operator.

I think we should file an issue to clean this sort of thing up across all the code, b/c I'm sure there are other examples.

@bshephar bshephar force-pushed the write-registries-conf branch from 0fffc77 to f7f124d Compare November 14, 2024 02:29
@openshift-ci openshift-ci bot removed the lgtm label Nov 14, 2024
Copy link

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/a3c1f66025e640edb90591ef160fde2d

✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 37m 52s
✔️ podified-multinode-edpm-deployment-crc SUCCESS in 1h 19m 22s
✔️ cifmw-crc-podified-edpm-baremetal SUCCESS in 1h 33m 05s
✔️ edpm-ansible-tempest-multinode SUCCESS in 1h 34m 54s
✔️ edpm-ansible-molecule-edpm_bootstrap SUCCESS in 5m 49s
✔️ edpm-ansible-molecule-edpm_podman SUCCESS in 5m 39s
✔️ edpm-ansible-molecule-edpm_module_load SUCCESS in 4m 41s
✔️ edpm-ansible-molecule-edpm_kernel SUCCESS in 9m 51s
✔️ edpm-ansible-molecule-edpm_libvirt SUCCESS in 9m 33s
✔️ edpm-ansible-molecule-edpm_nova SUCCESS in 10m 08s
✔️ edpm-ansible-molecule-edpm_frr SUCCESS in 7m 04s
✔️ edpm-ansible-molecule-edpm_iscsid SUCCESS in 4m 49s
✔️ edpm-ansible-molecule-edpm_ovn_bgp_agent SUCCESS in 7m 49s
✔️ edpm-ansible-molecule-edpm_ovs SUCCESS in 12m 16s
✔️ edpm-ansible-molecule-edpm_tripleo_cleanup SUCCESS in 4m 10s
✔️ edpm-ansible-molecule-edpm_tuned SUCCESS in 5m 54s
✔️ edpm-ansible-molecule-edpm_telemetry_power_monitoring SUCCESS in 7m 10s
adoption-standalone-to-crc-ceph-provider FAILURE in 2h 20m 06s

@bshephar
Copy link
Contributor Author

Adoption job failed:

❯ curl -s "https://logserver.rdoproject.org/08/808/f7f124df2108cc1d082fb988bca47cc2643a691a/github-check/adoption-standalone-to-crc-ceph-provider/14968bf/controller/ci-framework-data/logs/openstack-k8s-operators-openstack-must-gather/namespaces/openstack/crs/openstackdataplanedeployments.dataplane.openstack.org/tripleo-cleanup.yaml" | yq '.status.conditions[0]'
lastTransitionTime: "2024-11-14T04:44:26Z"
message: 'Deployment error occurred nodeSet: openstack error: backoff limit reached for execution.name tripleo-cleanup-tripleo-cleanup-openstack execution.namespace openstack execution.condition.message: Job has reached the specified backoff limit'
reason: BackoffLimitExceeded
severity: Error
status: "False"
type: Ready

Seems unrelated:

❯ curl -s "https://logserver.rdoproject.org/08/808/f7f124df2108cc1d082fb988bca47cc2643a691a/github-check/adoption-standalone-to-crc-ceph-provider/14968bf/controller/ci-framework-data/logs/openstack-k8s-operators-openstack-must-gather/namespaces/openstack/pods/tripleo-cleanup-tripleo-cleanup-openstack-9hphq/logs/tripleo-cleanup-tripleo-cleanup-openstack.log"  | grep -E "failed: \[standalone\]" | tail -n1
failed: [standalone] (item={'failed': False, 'msg': 'Failed to mask the service (tripleo_swift_proxy.service): Failed to mask unit: File /etc/systemd/system/tripleo_swift_proxy.service already exists.', 'invocation': {'module_args': {'name': 'tripleo_swift_proxy.service', 'state': 'stopped', 'enabled': False, 'masked': True, 'daemon_reload': False, 'daemon_reexec': False, 'scope': 'system', 'no_block': False, 'force': None}}, 'changed': False, 'failed_when_result': False, 'item': 'tripleo_swift_proxy.service', 'ansible_loop_var': 'item'}) => {

@bshephar
Copy link
Contributor Author

recheck

Copy link

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/963a5004082e4b0ebf072fc443cf9b54

✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 28m 18s
✔️ podified-multinode-edpm-deployment-crc SUCCESS in 1h 18m 24s
✔️ cifmw-crc-podified-edpm-baremetal SUCCESS in 1h 32m 58s
✔️ edpm-ansible-tempest-multinode SUCCESS in 1h 37m 22s
✔️ edpm-ansible-molecule-edpm_bootstrap SUCCESS in 5m 36s
✔️ edpm-ansible-molecule-edpm_podman SUCCESS in 6m 01s
✔️ edpm-ansible-molecule-edpm_module_load SUCCESS in 4m 59s
✔️ edpm-ansible-molecule-edpm_kernel SUCCESS in 10m 24s
✔️ edpm-ansible-molecule-edpm_libvirt SUCCESS in 10m 03s
✔️ edpm-ansible-molecule-edpm_nova SUCCESS in 10m 52s
✔️ edpm-ansible-molecule-edpm_frr SUCCESS in 7m 37s
✔️ edpm-ansible-molecule-edpm_iscsid SUCCESS in 4m 57s
✔️ edpm-ansible-molecule-edpm_ovn_bgp_agent SUCCESS in 8m 08s
✔️ edpm-ansible-molecule-edpm_ovs SUCCESS in 12m 00s
✔️ edpm-ansible-molecule-edpm_tripleo_cleanup SUCCESS in 4m 23s
✔️ edpm-ansible-molecule-edpm_tuned SUCCESS in 6m 27s
✔️ edpm-ansible-molecule-edpm_telemetry_power_monitoring SUCCESS in 6m 59s
adoption-standalone-to-crc-ceph-provider FAILURE in 2h 15m 50s

@bshephar bshephar mentioned this pull request Nov 15, 2024
@bshephar
Copy link
Contributor Author

Same thing on recheck. There's something that needs fixing in the adoption job I guess:

❯ curl -s "https://logserver.rdoproject.org/08/808/f7f124df2108cc1d082fb988bca47cc2643a691a/github-check/adoption-standalone-to-crc-ceph-provider/d2e0237/controller/ci-framework-data/logs/openstack-k8s-operators-openstack-must-gather/namespaces/openstack/pods/tripleo-cleanup-tripleo-cleanup-openstack-974q9/logs/tripleo-cleanup-tripleo-cleanup-openstack.log" | grep -E "failed: \[standalone\]" | tail -n1
failed: [standalone] (item={'failed': False, 'msg': 'Failed to mask the service (tripleo_swift_proxy.service): Failed to mask unit: File /etc/systemd/system/tripleo_swift_proxy.service already exists.', 'invocation': {'module_args': {'name': 'tripleo_swift_proxy.service', 'state': 'stopped', 'enabled': False, 'masked': True, 'daemon_reload': False, 'daemon_reexec': False, 'scope': 'system', 'no_block': False, 'force': None}}, 'changed': False, 'failed_when_result': False, 'item': 'tripleo_swift_proxy.service', 'ansible_loop_var': 'item'}) => {

@rabi
Copy link
Contributor

rabi commented Nov 15, 2024

Same thing on recheck. There's something that needs fixing in the adoption job I guess:

❯ curl -s "https://logserver.rdoproject.org/08/808/f7f124df2108cc1d082fb988bca47cc2643a691a/github-check/adoption-standalone-to-crc-ceph-provider/d2e0237/controller/ci-framework-data/logs/openstack-k8s-operators-openstack-must-gather/namespaces/openstack/pods/tripleo-cleanup-tripleo-cleanup-openstack-974q9/logs/tripleo-cleanup-tripleo-cleanup-openstack.log" | grep -E "failed: \[standalone\]" | tail -n1
failed: [standalone] (item={'failed': False, 'msg': 'Failed to mask the service (tripleo_swift_proxy.service): Failed to mask unit: File /etc/systemd/system/tripleo_swift_proxy.service already exists.', 'invocation': {'module_args': {'name': 'tripleo_swift_proxy.service', 'state': 'stopped', 'enabled': False, 'masked': True, 'daemon_reload': False, 'daemon_reexec': False, 'scope': 'system', 'no_block': False, 'force': None}}, 'changed': False, 'failed_when_result': False, 'item': 'tripleo_swift_proxy.service', 'ansible_loop_var': 'item'}) => {

Maybe #816 would fix it. This showed up after #804 I guess.

@bshephar bshephar force-pushed the write-registries-conf branch from f7f124d to fbd3941 Compare November 15, 2024 23:06
Copy link

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/5df7a185dc1445f49ee8cb4c7251ac4f

✔️ openstack-k8s-operators-content-provider SUCCESS in 4h 02m 19s
✔️ podified-multinode-edpm-deployment-crc SUCCESS in 1h 21m 42s
✔️ cifmw-crc-podified-edpm-baremetal SUCCESS in 1h 36m 19s
✔️ edpm-ansible-tempest-multinode SUCCESS in 1h 52m 09s
✔️ edpm-ansible-molecule-edpm_bootstrap SUCCESS in 5m 34s
✔️ edpm-ansible-molecule-edpm_podman SUCCESS in 5m 29s
✔️ edpm-ansible-molecule-edpm_module_load SUCCESS in 4m 42s
✔️ edpm-ansible-molecule-edpm_kernel SUCCESS in 10m 19s
✔️ edpm-ansible-molecule-edpm_libvirt SUCCESS in 8m 59s
✔️ edpm-ansible-molecule-edpm_nova SUCCESS in 10m 35s
✔️ edpm-ansible-molecule-edpm_frr SUCCESS in 6m 56s
✔️ edpm-ansible-molecule-edpm_iscsid SUCCESS in 5m 00s
edpm-ansible-molecule-edpm_ovn_bgp_agent FAILURE in 7m 57s
✔️ edpm-ansible-molecule-edpm_ovs SUCCESS in 13m 04s
✔️ edpm-ansible-molecule-edpm_tripleo_cleanup SUCCESS in 4m 06s
✔️ edpm-ansible-molecule-edpm_tuned SUCCESS in 5m 47s
✔️ edpm-ansible-molecule-edpm_telemetry_power_monitoring SUCCESS in 7m 33s
✔️ adoption-standalone-to-crc-ceph-provider SUCCESS in 3h 49m 28s

This change switches the Ansible module from template to copy for writing the
disconnected registries.conf file. Since trying to use `src` in the
`template` module looks for a path and not content.

Signed-off-by: Brendan Shephard <bshephar@redhat.com>
@bshephar bshephar force-pushed the write-registries-conf branch from fbd3941 to a4ac54c Compare November 17, 2024 23:56
@openshift-ci openshift-ci bot added the lgtm label Nov 18, 2024
Copy link
Contributor

openshift-ci bot commented Nov 18, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bshephar, rabi, slagle

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:
  • OWNERS [bshephar,rabi,slagle]

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

@openshift-merge-bot openshift-merge-bot bot merged commit 06d9702 into openstack-k8s-operators:main Nov 20, 2024
35 checks passed
@bshephar
Copy link
Contributor Author

bshephar commented Dec 2, 2024

/cherry-pick 18.0-fr1

@openshift-cherrypick-robot

@bshephar: new pull request created: #833

In response to this:

/cherry-pick 18.0-fr1

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.

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.

4 participants