-
-
Notifications
You must be signed in to change notification settings - Fork 428
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
Fix inventory group etcd_cluster #649
base: master
Are you sure you want to change the base?
Conversation
…ng ip for instance with few interfaces. Improve pg_hba.conf.j2 and patroni.yml.j2. Reuse values from pg_cluster_default in etcd role
Thanks for this PR! Could you help me understand a bit more about why you've classified this as a fix? This was not a mistake, the requirement to specify the IP address in the inventory was in all releases of this product. It would be great if you could describe the details of what is offered in this PR. Also, I'm curious about the decision to create a separate role. Could you share your thoughts on why this approach was chosen over defining variables in |
Because you use ip-address as hosts in inventory file in etcd_cluster group. Normally, records in group writes like a short hostname or FQDN. You are right, it is not a mistake, because ETCD config require IP-address instead hostname.
I wrote some logic, which allow automatically generate variables and properties for configs. My solutions in this PR inspired by Kubespray role
Yeah. I think, better use simple role, which prepare final variables, then write this logic in vars/ files |
@dtrdnk Thanks for the answer! I'll review the use of a role to define variables and assess whether it brings any advantages or conveniences. I'll get back to you with my thoughts soon. At first glance, it doesn't appear to be a conventional method for defining variables. Could you consider this change in a broader context? Perhaps you'd be interested in helping to rethink the logic for all host groups, not just for etcd. As it stands, it seems like this might be only a partial solution. In the Consul role, we use a different approach to define the listening IP address, not using the 'inventory_hostname' variable. Here are the relevant sections for reference: Here, the I was thinking of implementing a similar approach for all host groups. What are your thoughts on this? |
@ThomasSanson I would be grateful if you would take a look at this PR and take part in our discussion. |
Yeah. I offer two variants for using automatically generated variables:
With Consul, you took approximately the same approach as I did with ETCD, but did not include the connecting address in the Patroni config. You can globally define the
P.S And after successfully running Vagrant, check the |
@dtrdnk What method do you think will be more convenient? |
Take both. As I say above, in roles without reusing vars between roles, just keep them in <role_name>/defaults/main.yml. p.s thx for your response |
@dtrdnk Could you close this PR and prepare a new one that would implement this functionality for all cluster components and not just etcd? Important! It is necessary to leave backward compatibility so that if the |
Add ability use specific IP. Fix inventory group etcd_cluster: use hostnames instead of ip-address #612