<div dir="ltr"><div>I agree with Kevin. What I'd like to add here is that enabling haproxy firewall management by puppet</div><div>means we have both ansible and puppet to manage firewall rules, and this is likely to cause undesired</div><div>conjunction in the future. IMO it's better to find out the way to facilitate the requirement within tripleo-ansible(*1).</div><div><br></div><div>Note that this issue is not specific to Designate and can affect any deployment which has separate nodes</div><div>for api servers and haproxy, as is mentioned in the bug.</div><div><br></div><div>I tend to think of a mixed approach of b and c, and gather frontend firewall rules for all services enabled in all roles by yaql,</div><div>and then put that data into tripleo-firewall, then use that data only if haproxy is enabled in the node.</div><div>I started drafting the change, but it's too late in my tz to implement such composition beyond roles ...</div><div> <a href="https://review.opendev.org/q/topic:bug%252F1961799">https://review.opendev.org/q/topic:bug%252F1961799</a></div><div>(I hesitate to share this because it implements almost nothing but hope this explains my thought well)</div><div><br></div><div>(*1)</div><div>By the way it reminds me that we still require puppet to set up NAT rules, which we also need to deal with, later,</div><div>as a completely separate topic.<br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Mar 3, 2022 at 12:43 AM Kevin Carter <<a href="mailto:kecarter@redhat.com">kecarter@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-family:courier new,monospace"><span style="font-family:Arial,Helvetica,sans-serif">On Wed, Mar 2, 2022 at 8:59 AM Brent Eagles <<a href="mailto:beagles@redhat.com" target="_blank">beagles@redhat.com</a>> wrote:</span><br></div></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi all,<br>
<br>
Designate has a requirement that appears to be a first for TripleO. It<br>
needs to deploy miniDNS instances on the internal network but each are<br>
accessible from the public network so external bind instances can sync<br>
with them. This is done by mapping port numbers on the VIP to each<br>
miniDNS instances [1] e.g.<br>
<br>
<a href="http://10.0.0.5:16000" rel="noreferrer" target="_blank">10.0.0.5:16000</a> --> <a href="http://172.16.2.184:5354" rel="noreferrer" target="_blank">172.16.2.184:5354</a><br>
<a href="http://10.0.0.5:16001" rel="noreferrer" target="_blank">10.0.0.5:16001</a> --> <a href="http://172.16.2.185:5354" rel="noreferrer" target="_blank">172.16.2.185:5354</a><br>
<a href="http://10.0.0.5:16002" rel="noreferrer" target="_blank">10.0.0.5:16002</a> --> <a href="http://172.16.2.186:5354" rel="noreferrer" target="_blank">172.16.2.186:5354</a><br>
.<br>
.<br>
.<br>
<for each controller><br>
<br>
The haproxy configuration is relatively straightforward [2]. There<br>
would be no problem if it the haproxy puppet managed the firewall rules,<br>
but for typical deployments we appear to disable this [3] and rely on<br>
the tripleo.firewall ansible module instead.<br>
<br>
<br>
The complicating factors are:<br>
<br>
a. the ports range depends on the number of miniDNS instances.<br>
<br>
b. the miniDNS deployment needs to set firewall rules wherever haproxy<br>
happens to live as they are not guaranteed to be on the same host.<br>
AFAICT, our ansible based firewall rule mechanism doesn't allow for<br>
setting firewall rules on hosts in addition to the ones that the service<br>
is being deployed on.<br>
<br>
<br>
Possible solutions I've been considering:<br>
<br>
a. Have haproxy puppet create firewall rules on the public API network<br>
and use tripleo.firewall for everything else. I think we generally don't<br>
distinguish which networks firewall rules are applicable to so this<br>
would be an "interesting", pervasive change. This is in PID 1's<br>
wheelhouse and I'd be interested in how they feel about this.<br>
<br></blockquote><div><div class="gmail_default" style="font-family:"courier new",monospace">This seems like the easiest path forward. That said, within the DF we're actively attempting to reduce our dependence on puppet. As such, while the other options may be ugly or even more complex, I think they're worth pursuing especially if it means we have less puppet to maintain.</div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
b. Somehow create a jinja-ed firewall rule for haproxy that gets<br>
processed at deploy time so details could be filled in using cloud<br>
information. This seems like it would be kind of fragile, may not even<br>
be possible and depends on details of the framework I'm not familiar<br>
with.<br>
<br>
c. Extend tripleo.firewall or tripleo.iptables to process jinja'd rules<br>
- but that's problematic because it needs to be set on the haproxy host,<br>
and miniDNS is elsewhere.<br>
<br>
d. Create some ansible that gets run in the haproxy hosts that<br>
generates the firewall rules based on cloud info. I feel this is a bit<br>
ugly.<br>
<br>
<br>
Does anyone have any suggestions on other solutions or thoughts on the<br>
above?<br>
<br></blockquote><div><div class="gmail_default" style="font-family:"courier new",monospace">We make heavy use of YAQL to organize our firewall rules for tripleo.firewall, is there something we can do there? We could also transition some of our firewall setup to use hostvars / facts across the deployment and to pull back information for specific nodes, or all nodes within a given group; maybe we can make better use of that within the firewall role to pull back runtime information and compute the needed firewall rules for minidns?</div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Cheers,<br>
<br>
Brent<br>
<br>
<br>
1. <a href="https://bugzilla.redhat.com/show_bug.cgi?id=1897319" rel="noreferrer" target="_blank">https://bugzilla.redhat.com/show_bug.cgi?id=1897319</a> The TripleO HAProxy instance needs to be configured for BIND->miniDNS AXFR<br>
<br>
2. <a href="https://review.opendev.org/c/openstack/puppet-tripleo/+/828169" rel="noreferrer" target="_blank">https://review.opendev.org/c/openstack/puppet-tripleo/+/828169</a><br>
Designate: create proxy ports on external VIP to access miniDNS workers.<br>
<br>
3. <a href="https://bugs.launchpad.net/tripleo/+bug/1961799" rel="noreferrer" target="_blank">https://bugs.launchpad.net/tripleo/+bug/1961799</a> haproxy template<br>
tasks to apply IPTables rules are no ops.<br>
<br>
--<br>
Brent Eagles<br>
Principal Software Engineer<br>
Red Hat Inc.<br>
<br>
</blockquote></div></div>
</blockquote></div>