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

Replacing edpm_chrony with linux-systemroles.timesync #373

Merged

Conversation

jpodivin
Copy link
Contributor

No description provided.

@softwarefactory-project-zuul
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://review.rdoproject.org/zuul/buildset/399e2e41cc2a437eb4fca726b515bb75

✔️ openstack-k8s-operators-content-provider SUCCESS in 1h 34m 37s
podified-multinode-edpm-deployment-crc FAILURE in 1h 22m 07s
✔️ edpm-ansible-molecule-edpm_podman SUCCESS in 6m 42s
✔️ edpm-ansible-molecule-edpm_module_load SUCCESS in 5m 42s
✔️ edpm-ansible-molecule-edpm_kernel SUCCESS in 11m 42s
✔️ edpm-ansible-molecule-edpm_libvirt SUCCESS in 6m 56s
✔️ edpm-ansible-molecule-edpm_nova SUCCESS in 7m 01s

@softwarefactory-project-zuul
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://review.rdoproject.org/zuul/buildset/565868dd752c45628600cc54c735a423

✔️ openstack-k8s-operators-content-provider SUCCESS in 1h 37m 48s
podified-multinode-edpm-deployment-crc FAILURE in 1h 22m 56s
✔️ edpm-ansible-molecule-edpm_podman SUCCESS in 6m 31s
✔️ edpm-ansible-molecule-edpm_module_load SUCCESS in 5m 45s
✔️ edpm-ansible-molecule-edpm_kernel SUCCESS in 11m 48s
✔️ edpm-ansible-molecule-edpm_libvirt SUCCESS in 6m 47s
✔️ edpm-ansible-molecule-edpm_nova SUCCESS in 7m 14s

@softwarefactory-project-zuul
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://review.rdoproject.org/zuul/buildset/f6c484867ffe4ea485ec1fcc20ca839d

✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 04m 14s
podified-multinode-edpm-deployment-crc FAILURE in 1h 46m 37s
cifmw-crc-podified-edpm-baremetal FAILURE in 1h 48m 14s
✔️ edpm-ansible-molecule-edpm_podman SUCCESS in 6m 05s
✔️ edpm-ansible-molecule-edpm_module_load SUCCESS in 4m 59s
✔️ edpm-ansible-molecule-edpm_kernel SUCCESS in 10m 18s
✔️ edpm-ansible-molecule-edpm_libvirt SUCCESS in 6m 05s
✔️ edpm-ansible-molecule-edpm_nova SUCCESS in 5m 59s

@softwarefactory-project-zuul
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://review.rdoproject.org/zuul/buildset/ff8a9be787e3495a9c251c54bfd217a2

✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 06m 31s
podified-multinode-edpm-deployment-crc FAILURE in 1h 48m 52s
cifmw-crc-podified-edpm-baremetal FAILURE in 1h 16m 47s
✔️ edpm-ansible-molecule-edpm_podman SUCCESS in 5m 49s
✔️ edpm-ansible-molecule-edpm_module_load SUCCESS in 5m 07s
✔️ edpm-ansible-molecule-edpm_kernel SUCCESS in 10m 36s
✔️ edpm-ansible-molecule-edpm_libvirt SUCCESS in 6m 09s
✔️ edpm-ansible-molecule-edpm_nova SUCCESS in 6m 15s

@softwarefactory-project-zuul
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://review.rdoproject.org/zuul/buildset/e61b7267acf24962999e19211f85bbe5

✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 20m 09s
podified-multinode-edpm-deployment-crc FAILURE in 1h 54m 15s
cifmw-crc-podified-edpm-baremetal FAILURE in 1h 50m 36s
✔️ edpm-ansible-molecule-edpm_podman SUCCESS in 6m 16s
✔️ edpm-ansible-molecule-edpm_module_load SUCCESS in 5m 30s
✔️ edpm-ansible-molecule-edpm_kernel SUCCESS in 10m 44s
✔️ edpm-ansible-molecule-edpm_libvirt SUCCESS in 6m 23s
✔️ edpm-ansible-molecule-edpm_nova SUCCESS in 6m 36s

@softwarefactory-project-zuul
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://review.rdoproject.org/zuul/buildset/f5593539f2fb422187121e3617b9c852

✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 11m 58s
podified-multinode-edpm-deployment-crc FAILURE in 1h 58m 25s
cifmw-crc-podified-edpm-baremetal FAILURE in 1h 50m 14s
✔️ edpm-ansible-molecule-edpm_podman SUCCESS in 5m 56s
✔️ edpm-ansible-molecule-edpm_module_load SUCCESS in 5m 03s
✔️ edpm-ansible-molecule-edpm_kernel SUCCESS in 11m 21s
✔️ edpm-ansible-molecule-edpm_libvirt SUCCESS in 5m 58s
✔️ edpm-ansible-molecule-edpm_nova SUCCESS in 6m 16s

@jpodivin jpodivin changed the title [WIP] Replacing edpm_chrony with linux-systemroles.timesync Replacing edpm_chrony with linux-systemroles.timesync Oct 10, 2023
@jpodivin jpodivin requested a review from rebtoor October 10, 2023 13:15
playbooks/install_os.yml Outdated Show resolved Hide resolved
playbooks/install_os.yml Outdated Show resolved Hide resolved
Copy link
Contributor

@rebtoor rebtoor left a comment

Choose a reason for hiding this comment

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

.

playbooks/install_os.yml Outdated Show resolved Hide resolved
playbooks/install_os.yml Outdated Show resolved Hide resolved
@softwarefactory-project-zuul
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://review.rdoproject.org/zuul/buildset/19d4399489ae4ecab1f780968f15a26e

✔️ openstack-k8s-operators-content-provider SUCCESS in 1h 38m 53s
✔️ podified-multinode-edpm-deployment-crc SUCCESS in 1h 24m 42s
cifmw-crc-podified-edpm-baremetal FAILURE in 1h 10m 26s
✔️ edpm-ansible-molecule-edpm_podman SUCCESS in 5m 51s
✔️ edpm-ansible-molecule-edpm_module_load SUCCESS in 5m 20s
✔️ edpm-ansible-molecule-edpm_kernel SUCCESS in 11m 25s
✔️ edpm-ansible-molecule-edpm_libvirt SUCCESS in 6m 08s
✔️ edpm-ansible-molecule-edpm_nova SUCCESS in 6m 08s

@jpodivin jpodivin force-pushed the timesync branch 2 times, most recently from 720ca9e to 5621dd8 Compare October 11, 2023 09:20
@jpodivin
Copy link
Contributor Author

I've updated the docs with some notes on the playbook. The defaults situation is not exactly clean, but it's unavoidable until the install_yamls is patched to use new var names.

@jpodivin jpodivin requested a review from slagle October 17, 2023 07:38
playbooks/install_os.yml Outdated Show resolved Hide resolved
Copy link
Contributor

@fultonj fultonj left a comment

Choose a reason for hiding this comment

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

  1. What is order you want these patches merged in?

I see you have the following depends-on relationships:

https://github.com/openstack-k8s-operators/dataplane-operator/pull/463
  https://github.com/openstack-k8s-operators/edpm-ansible/pull/373

https://github.com/openstack-k8s-operators/install_yamls/pull/575
  https://github.com/openstack-k8s-operators/edpm-ansible/pull/373

Shouldn't dataplane-operator go before install_yamls? If so shouldn't the depends-on order be like this?

https://github.com/openstack-k8s-operators/install_yamls/pull/575
  https://github.com/openstack-k8s-operators/dataplane-operator/pull/463
    https://github.com/openstack-k8s-operators/edpm-ansible/pull/373

Then when the above is done would you patch edpm-ansible to remove the old tripleo chrony role?

I mentioned this before, why change the name of edpm_ntp_servers but have it keep the same structure as edpm_chrony_ntp_servers?

Copy link
Contributor

@slagle slagle left a comment

Choose a reason for hiding this comment

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

I'm also not following how this will eventually evolve to be used.

I would instead add the new functionality to use the timesync system role to edpm-ansible, and guard that with a "when" on if timesync_ntp_servers is defined and set.

Then update dataplane-operator and install_yamls to use the system role by defining timesync_ntp_servers. I don't see a reason for edpm_ntp_servers, as we don't want that abstraction over the system role variables. Just use the system role variables directly.

Then followup with an edpm-ansible PR to remove the chrony role, both the role iteself and from the playbooks. You could also drop the "when" at that point guarding the usage of the timesync role, assuming that role does the right thing when timesync_ntp_servers is not defined.

playbooks/install_os.yml Outdated Show resolved Hide resolved
@jpodivin jpodivin force-pushed the timesync branch 2 times, most recently from 4dc195e to 95eb7c1 Compare October 25, 2023 08:01
jpodivin added a commit to jpodivin/dataplane-operator that referenced this pull request Oct 25, 2023
The edpm_chrony role is getting replaced with timesync system role.
This variable changed to list of dictionaries, in order to fit timesync role expectactions.

Depends-On: openstack-k8s-operators/edpm-ansible#373

Signed-off-by: Jiri Podivin <[email protected]>
jpodivin added a commit to jpodivin/dataplane-operator that referenced this pull request Oct 25, 2023
The edpm_chrony role is getting replaced with timesync system role.
This variable changed to list of dictionaries, in order to fit timesync role expectactions.

Depends-On: openstack-k8s-operators/edpm-ansible#373

Signed-off-by: Jiri Podivin <[email protected]>
@jpodivin
Copy link
Contributor Author

  1. What is order you want these patches merged in?

I see you have the following depends-on relationships:

https://github.com/openstack-k8s-operators/dataplane-operator/pull/463
  https://github.com/openstack-k8s-operators/edpm-ansible/pull/373

https://github.com/openstack-k8s-operators/install_yamls/pull/575
  https://github.com/openstack-k8s-operators/edpm-ansible/pull/373

Shouldn't dataplane-operator go before install_yamls? If so shouldn't the depends-on order be like this?

https://github.com/openstack-k8s-operators/install_yamls/pull/575
  https://github.com/openstack-k8s-operators/dataplane-operator/pull/463
    https://github.com/openstack-k8s-operators/edpm-ansible/pull/373

Then when the above is done would you patch edpm-ansible to remove the old tripleo chrony role?

I mentioned this before, why change the name of edpm_ntp_servers but have it keep the same structure as edpm_chrony_ntp_servers?

The dependent patches should be fine to merge in any order. At least it appears to be the case from the CI. There may be a short period of time when something doesn't quite work. But that would be the case anyway when the backwards compatibility is not an issue. The variable now actually holds a dictionary.

@jpodivin jpodivin requested review from slagle and fultonj October 30, 2023 12:25
jpodivin added a commit to jpodivin/dataplane-operator that referenced this pull request Nov 2, 2023
The edpm_chrony role is getting replaced with timesync system role.
This variable changed to list of dictionaries, in order to fit timesync role expectactions.

Depends-On: openstack-k8s-operators/edpm-ansible#373

Signed-off-by: Jiri Podivin <[email protected]>
jpodivin added a commit to jpodivin/install_yamls that referenced this pull request Nov 2, 2023
Variables were renamed to reflect that there is no longer any edpm_chrony role
to consume them. Default values were changed to accomodate timesync spec.

Depends-On: openstack-k8s-operators/edpm-ansible#373

Signed-off-by: Jiri Podivin <[email protected]>
@fultonj
Copy link
Contributor

fultonj commented Nov 3, 2023

The changes that I have requested have been addressed, so thanks for that.

As per @slagle's comments:

#373 (review)

You've added timesync_ntp_servers to the two patches which depend on this one (and that variable's structure looks good). However, he also suggested you "guard that with a when on if timesync_ntp_servers is defined and set". That when is not here. Also, this patch could be split into two so that you don't remove the calling of the old role until later.

Would you please reply to these comments with an ack or reasons for a nack instead of simply requesting re-review?

@jpodivin
Copy link
Contributor Author

jpodivin commented Nov 6, 2023

I'm also not following how this will eventually evolve to be used.

I would instead add the new functionality to use the timesync system role to edpm-ansible, and guard that with a "when" on if timesync_ntp_servers is defined and set.

Then update dataplane-operator and install_yamls to use the system role by defining timesync_ntp_servers. I don't see a reason for edpm_ntp_servers, as we don't want that abstraction over the system role variables. Just use the system role variables directly.

Then followup with an edpm-ansible PR to remove the chrony role, both the role iteself and from the playbooks. You could also drop the "when" at that point guarding the usage of the timesync role, assuming that role does the right thing when timesync_ntp_servers is not defined.

Original proposal was backwards compatible, in that the incoming variable was checked and turned into format the timesync role expected, no matter what was used with the playbook. This one is not backwards compatible. But it has following advantages:

  1. Minimizes number of patches we need to merge.
  2. Keeps the code clean.

Wrapping original role invocation in conditional is possible, but imho inferior approach. The conditional would have to be implemented not just in one, but in all three playbooks using the edpm_chrony role. And then subsequently removed.

This way we would just need to remove edpm_chrony which would no longer be used anywhere at that point.

If you want backwards compatibility, with no chance of failure, I can restore the original argument checking task, with some adjustment to names of variables.

Copy link
Contributor

@rebtoor rebtoor left a comment

Choose a reason for hiding this comment

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

I left a single comment for the code, just a minor issue on tag.

BTW, I'm fine with this approach, as long as it followed pretty soon by a followup PR which removes the edpm_chrony role and its invocation within the playbooks.

Keeping 2 ways to configure ntp it could only generate noise during the CRs generation.

ansible.builtin.include_role:
name: "{{timesyncfqcn}}"
tags:
- edpm_chrony
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd remove edpm_chrony tag with something like timesync or chrony. I don't think that edpm_ prefix is mandatory for the tags.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

dataplane_chrony @slagle @fultonj wdyt?

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm fine with the tag being called edpm_chrony since it involes calling the edpm_chrony role. I expect the calls to that role and the tag will be removed soon so I don't think this needs further revision on that level.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, then edpm_chrony when it calls the edpm_chrony, otherwise the new tag.

@openshift-ci openshift-ci bot added the lgtm label Nov 9, 2023
Copy link
Contributor

openshift-ci bot commented Nov 9, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jpodivin, rebtoor

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-merge-bot openshift-merge-bot bot merged commit f1b8046 into openstack-k8s-operators:main Nov 9, 2023
3 checks passed
@jpodivin jpodivin deleted the timesync branch August 14, 2024 12:38
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.

5 participants