rocknsm / rock-docs

Documentation for ROCK NSM
24 stars 16 forks source link

Underscore Not Valid In Domain Names #52

Closed peasead closed 4 years ago

peasead commented 4 years ago

If you make the hostname have an _, it will fail on the build. Example: The label rock_2-5 is not a valid A-label

Suggest putting a warning in there regarding that.

An exception occurred during task execution. To see the full traceback, use -vvv. The error was: idna.core.IDNAError: The label rock_2-5 is not a valid A-label
fatal: [rock_2-5]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n  File \"/root/.ansible/tmp/ansible-tmp-1575659134.03-57208017198983/AnsiballZ_openssl_csr.py\", line 102, in <module>\n    _ansiballz_main()\n  File \"/root/.ansible/tmp/ansible-tmp-1575659134.03-57208017198983/AnsiballZ_openssl_csr.py\", line 94, in _ansiballz_main\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n  File \"/root/.ansible/tmp/ansible-tmp-1575659134.03-57208017198983/AnsiballZ_openssl_csr.py\", line 40, in invoke_module\n    runpy.run_module(mod_name='ansible.modules.crypto.openssl_csr', init_globals=None, run_name='__main__', alter_sys=True)\n  File \"/usr/lib64/python2.7/runpy.py\", line 176, in run_module\n    fname, loader, pkg_name)\n  File \"/usr/lib64/python2.7/runpy.py\", line 82, in _run_module_code\n    mod_name, mod_fname, mod_loader, pkg_name)\n  File \"/usr/lib64/python2.7/runpy.py\", line 72, in _run_code\n    exec code in run_globals\n  File \"/tmp/ansible_openssl_csr_payload_Omf_tN/ansible_openssl_csr_payload.zip/ansible/modules/crypto/openssl_csr.py\", line 1104, in <module>\n  File \"/tmp/ansible_openssl_csr_payload_Omf_tN/ansible_openssl_csr_payload.zip/ansible/modules/crypto/openssl_csr.py\", line 1087, in main\n  File \"/tmp/ansible_openssl_csr_payload_Omf_tN/ansible_openssl_csr_payload.zip/ansible/modules/crypto/openssl_csr.py\", line 541, in generate\n  File \"/tmp/ansible_openssl_csr_payload_Omf_tN/ansible_openssl_csr_payload.zip/ansible/modules/crypto/openssl_csr.py\", line 834, in _generate_csr\n  File \"/usr/lib64/python2.7/site-packages/cryptography/x509/base.py\", line 393, in sign\n    return backend.create_x509_csr(self, private_key, algorithm)\n  File \"/usr/lib64/python2.7/site-packages/cryptography/hazmat/backends/multibackend.py\", line 395, in create_x509_csr\n    return b.create_x509_csr(builder, private_key, algorithm)\n  File \"/usr/lib64/python2.7/site-packages/cryptography/hazmat/backends/openssl/backend.py\", line 793, in create_x509_csr\n    gc=False\n  File \"/usr/lib64/python2.7/site-packages/cryptography/hazmat/backends/openssl/backend.py\", line 1009, in _create_x509_extensions\n    handlers, extension\n  File \"/usr/lib64/python2.7/site-packages/cryptography/hazmat/backends/openssl/backend.py\", line 1040, in _create_x509_extension\n    ext_struct = encode(self, extension.value)\n  File \"/usr/lib64/python2.7/site-packages/cryptography/hazmat/backends/openssl/encode_asn1.py\", line 359, in _encode_alt_name\n    general_names = _encode_general_names(backend, san)\n  File \"/usr/lib64/python2.7/site-packages/cryptography/hazmat/backends/openssl/encode_asn1.py\", line 351, in _encode_general_names\n    gn = _encode_general_name(backend, name)\n  File \"/usr/lib64/python2.7/site-packages/cryptography/hazmat/backends/openssl/encode_asn1.py\", line 387, in _encode_general_name\n    value = _idna_encode(name.value)\n  File \"/usr/lib64/python2.7/site-packages/cryptography/hazmat/backends/openssl/encode_asn1.py\", line 376, in _idna_encode\n    return idna.encode(value)\n  File \"/usr/lib/python2.7/site-packages/idna/core.py\", line 355, in encode\n    result.append(alabel(label))\n  File \"/usr/lib/python2.7/site-packages/idna/core.py\", line 265, in alabel\n    raise IDNAError('The label {0} is not a valid A-label'.format(label))\nidna.core.IDNAError: The label rock_2-5 is not a valid A-label\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
seven62 commented 4 years ago

To clarify: you want to add this note regarding the naming of any hosts in a ROCK cluster?

peasead commented 4 years ago

I'm not sure.

I ran rock setup and set the hostname as rock_2-5 in the TUI and got the error above, which is because you can't have _'s in domain names. I'm not sure how wide-spread that is/needs to be.

seven62 commented 4 years ago

Makes sense, I'll add it thanks!