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

[dnsmasq] Refactor the role to be consumed by the ci_network role #1741

Merged
merged 14 commits into from
May 27, 2024

Conversation

rebtoor
Copy link
Contributor

@rebtoor rebtoor commented May 21, 2024

Since the ci_network role has already its own task(s) to manage dns configuration, this PR will try to fill the gap in terms of functionality between both roles, so in the future dnsmasq role can be consumed by ci_network role with low effort.

As a pull request owner and reviewers, I checked that:

  • Appropriate testing is done and actually running
  • Appropriate documentation exists and/or is up-to-date:
    • README in the role
    • Content of the docs/source is reflecting the changes

Copy link
Contributor

openshift-ci bot commented May 21, 2024

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@rebtoor rebtoor force-pushed the OSPRH-6690 branch 3 times, most recently from 5d389a2 to 9c87c54 Compare May 21, 2024 16:46
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/c9bcd21e46594800a416e07eebd53a72

✔️ noop SUCCESS in 0s
✔️ cifmw-pod-ansible-test SUCCESS in 8m 38s
cifmw-pod-pre-commit FAILURE in 7m 36s
✔️ cifmw-molecule-dnsmasq SUCCESS in 5m 10s

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/80232633d22c4958ae023852de71d557

✔️ noop SUCCESS in 0s
✔️ cifmw-pod-ansible-test SUCCESS in 8m 04s
✔️ cifmw-pod-pre-commit SUCCESS in 7m 15s
cifmw-molecule-dnsmasq FAILURE in 4m 00s

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/90b8f1480d46445c9ec58ceebfde5188

✔️ noop SUCCESS in 0s
✔️ cifmw-pod-ansible-test SUCCESS in 8m 49s
✔️ cifmw-pod-pre-commit SUCCESS in 8m 15s
cifmw-molecule-dnsmasq FAILURE in 5m 02s

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/d3ef94166bac404d96eaf45972ab25f0

✔️ noop SUCCESS in 0s
✔️ cifmw-pod-ansible-test SUCCESS in 9m 34s
✔️ cifmw-pod-pre-commit SUCCESS in 8m 49s
cifmw-molecule-dnsmasq FAILURE in 3m 57s

Copy link
Contributor

@cjeanner cjeanner left a comment

Choose a reason for hiding this comment

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

@hjensas care to have a look? The goal:

  • modify dnsmasq role so that it can be used within ci_network role
  • ensure it exposes the needed entry-points to nudge content "at will" while avoiding to rely on plain ansible.builtin.copy calls

roles/dnsmasq/molecule/default/converge.yml Outdated Show resolved Hide resolved
roles/dnsmasq/defaults/main.yml Outdated Show resolved Hide resolved
roles/dnsmasq/README.md Outdated Show resolved Hide resolved
roles/dnsmasq/molecule/default/converge.yml Outdated Show resolved Hide resolved
@@ -60,6 +60,12 @@
src: "cifmw-dnsmasq.conf.j2"
validate: "/usr/sbin/dnsmasq -C %s --test"

- name: Render listener configuration
Copy link
Contributor

Choose a reason for hiding this comment

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

so this means we're expected to know everything before we start to deploy dnsmasq? It may get slightly ugly pretty fast with the way we'll call things:

  • deploy dnsmasq basics
  • create libvirt networks (and add configuration snippets to dnsmasq for the DHCP)
  • get to devscripts parts, where we have to inject yet other snippets, some related to DNS, listeners and so on

We therefore want to set target file names to ensure we can add content "on the fly".

roles/dnsmasq/tasks/dns.yml Outdated Show resolved Hide resolved
roles/dnsmasq/tasks/listener.yml Outdated Show resolved Hide resolved
roles/dnsmasq/templates/cifmw-dnsmasq.conf.j2 Outdated Show resolved Hide resolved
roles/dnsmasq/templates/dns.conf.j2 Outdated Show resolved Hide resolved
roles/libvirt_manager/README.md Show resolved Hide resolved
rebtoor added 5 commits May 27, 2024 09:22
Signed-off-by: Roberto Alfieri <ralfieri@redhat.com>
Signed-off-by: Roberto Alfieri <ralfieri@redhat.com>
…ario

Signed-off-by: Roberto Alfieri <ralfieri@redhat.com>
…sq_dns_config_file` vars

Signed-off-by: Roberto Alfieri <ralfieri@redhat.com>
…_raw_config`

Signed-off-by: Roberto Alfieri <ralfieri@redhat.com>
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/5ce47856c9a54728b7d73d8fdba2fcff

✔️ noop SUCCESS in 0s
✔️ cifmw-pod-ansible-test SUCCESS in 8m 45s
✔️ cifmw-pod-pre-commit SUCCESS in 7m 51s
cifmw-molecule-dnsmasq FAILURE in 6m 04s

Signed-off-by: Roberto Alfieri <ralfieri@redhat.com>
@rebtoor
Copy link
Contributor Author

rebtoor commented May 27, 2024

/label tide/merge-method-squash

Copy link
Contributor

openshift-ci bot commented May 27, 2024

@rebtoor: The label(s) tide/merge-method-squash cannot be applied, because the repository doesn't have them.

In response to this:

/label tide/merge-method-squash

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.

rebtoor added 2 commits May 27, 2024 11:48
…ters section of the doc

Signed-off-by: Roberto Alfieri <ralfieri@redhat.com>
Signed-off-by: Roberto Alfieri <ralfieri@redhat.com>
@cjeanner
Copy link
Contributor

/approve

I could run the fixed IP part with 32721e9 as last commit of this PR - and it's working fine apparently, at least for #1767 PR.

I propose to go with that version, and do the needed follow-ups with the needed changes.

Copy link
Contributor

openshift-ci bot commented May 27, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cjeanner

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

@rebtoor rebtoor marked this pull request as ready for review May 27, 2024 13:46
@rebtoor rebtoor requested a review from hjensas May 27, 2024 13:46
@rebtoor
Copy link
Contributor Author

rebtoor commented May 27, 2024

/approve

I could run the fixed IP part with 32721e9 as last commit of this PR - and it's working fine apparently, at least for #1767 PR.

I propose to go with that version, and do the needed follow-ups with the needed changes.

@hjensas what do you think?

Copy link
Contributor

@hjensas hjensas left a comment

Choose a reason for hiding this comment

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

/lgtm

I think we can merge this, and iterate on it.

IMO we should move listening address and interface to the "manage_network" tasks - i.e we start with installing a basic service that do nothing - then as we add networks/hosts/dns records with manage_network,manage_host,manage_address etc we add the interface and listen address, DNS records wildcards etc via those "api" task's.

@openshift-ci openshift-ci bot added the lgtm label May 27, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit 9366dee into openstack-k8s-operators:main May 27, 2024
7 checks passed
@rebtoor rebtoor deleted the OSPRH-6690 branch September 23, 2024 12:04
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.

3 participants