-
Notifications
You must be signed in to change notification settings - Fork 13
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
Hostnames change: cluster playbook - when hostnames are defined, the … #501
Conversation
…irods should have fqdn
@@ -1,10 +1,11 @@ | |||
--- | |||
firewall_allowed_tcp_ports: | |||
irods_icat_fqdn: "umcg-icat01.hpc.rug.nl" # fqdn of iCAT server |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file should contain values for variables that are the same for any machine from any cluster in the corresponding inventory group; in this case any machine in the irods
group. Currently we only have Nibbler machines in the irods inventory group, but there may be more in the future. Some of the variables listed are machine specific though: these are in the wrong location/file and should be relocated to elsewhere. E.g. the ones below are machine specific and not inventory group specific:
irods_icat_fqdn: "umcg-icat01.hpc.rug.nl" # fqdn of iCAT server
irods_ssl_certificate_chain_file: "localhost_and_chain_umcg-icat01.crt"
irods_ssl_certificate_key_file: "localhost-umcg01.key"
irods_ssl_dh_params_file: "dhparams.pem"
irods_zone: 'nlumcg' # default main iRODS zone name
irods_db_server: '127.0.0.1' #iRODS Database Server | ||
irods_db_name: 'ICAT' #iRODS Database Name | ||
irods_db_user: 'irods' #iRODS Database Username | ||
server_type: 'icat' #iRODS Server Type |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this file should be located instead at
roles/irods/defaults/main.yml
@@ -1,7 +1,9 @@ | |||
--- | |||
- name: 'Set hostname to inventory_hostname.' | |||
hostname: | |||
name: "{{ inventory_hostname | regex_replace('^' + ai_jumphost + '\\+','') }}" | |||
name: "{%- if groups['irods'] is defined and inventory_hostname in groups['irods'] and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will work, but is very specific for one type of machine from one type of inventory group. Would it be possible to make this more generic? Putting fqdn values in group_vars/nibbler_cluster/ip_addresses.yml
was not the issue, the issue was listing the wrong fqdn for a certain IP address. The other issue is that these machines can have different interfaces with different names, but there van be only one hostname. Hence I think we should look for a more generic way to specify hostnames in fqdn syntax for individual machines.
In theory Ansible can also use a host_vars
subdir in addition to group_vars
, but the problem is that the hostnames can change dynamically when using a dynamic inventory to handle different jumphosts. Maybe we can specify the fqdn hostname in the static inventory, but will probably require updates to the script that parses the static inventory to create a dynamic one...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See inline comments.
We'll merge this for now and create a new story to improve our dynamic inventory.py script, so it can handle host specific variables inside the static inventories. |
…irods should have fqdn
The issue:
we need the hostname to be a short name of the machine. The FQDN is not used within the virtual network and most of the machines don't have set one. The iRODS machines on the other hand need to have hostname exactly the same as their FQDN. The playbooks need to work for with regular clusters and with the iRODS server. At the same time, it was pointed out that the task is done twice, and should be in the
ssh_host_signer
only.Fix was tested on the
irods-test
(iRODS type of server) andhc-vcompute01
(non-iRODS type of server). Test was:single_group_playbooks/cluster_part1.yml
except ssh_host_signer and rerun the playbook