You are viewing a plain text version of this content. The canonical link for it is here.
Posted to devnull@infra.apache.org by "rlevas (GitHub)" <gi...@apache.org> on 2018/08/21 21:47:19 UTC
[GitHub] [ambari] rlevas opened pull request #2147: [AMBARI-24522]
Cannot connect to MIT KDC admin server when port is specified in
kerberos-env/admin_server_host
## What changes were proposed in this pull request?
Cannot connect to MIT KDC admin server when port is specified in `kerberos-env/admin_server_host`. The following error is seen when validating the KDC admin credentials:
```
kinit: Server not found in Kerberos database while getting initial credentials
```
The reason for this is due to how the credentials are created for accessing the MIT KDC administration server.
```
kinit -c <path> -S kadmin/<kerberos-env/admin_server_host> <principal>
```
If a port was added to the {{kerberos-env/admin_server_host}} value then the server principal will be generated like `kadmin/kdc.example.com:4749` rather than `kadmin/kdc.example.com`. Therefore the server principal is not found.
## How was this patch tested?
Manually tested.
Added new unit tests, all unit tests passed.
Please review [Ambari Contributing Guide](https://cwiki.apache.org/confluence/display/AMBARI/How+to+Contribute) before opening a pull request.
[ Full content available at: https://github.com/apache/ambari/pull/2147 ]
This message was relayed via gitbox.apache.org for devnull@infra.apache.org
[GitHub] [ambari] asfgit commented on issue #2147: [AMBARI-24522]
Cannot connect to MIT KDC admin server when port is specified in
kerberos-env/admin_server_host
Posted by "asfgit (GitHub)" <gi...@apache.org>.
Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/Ambari-Github-PullRequest-Builder/3704/
Test PASSed.
[ Full content available at: https://github.com/apache/ambari/pull/2147 ]
This message was relayed via gitbox.apache.org for devnull@infra.apache.org
[GitHub] [ambari] jonathan-hurley commented on pull request #2147:
[AMBARI-24522] Cannot connect to MIT KDC admin server when port is specified
in kerberos-env/admin_server_host
Posted by "jonathan-hurley (GitHub)" <gi...@apache.org>.
It feels like this is a bit error prone to have a boolean control whether you get server:port or just server. I actually don't clearly see why `invokeKAdmin` wants server:port while `getKinitCommand` does not. Would it be clearer to break this out into 2 properties?
[ Full content available at: https://github.com/apache/ambari/pull/2147 ]
This message was relayed via gitbox.apache.org for devnull@infra.apache.org
[GitHub] [ambari] asfgit commented on issue #2147: [AMBARI-24522]
Cannot connect to MIT KDC admin server when port is specified in
kerberos-env/admin_server_host
Posted by "asfgit (GitHub)" <gi...@apache.org>.
Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/Ambari-Github-PullRequest-Builder/3702/
Test FAILed.
Test FAILured.
[ Full content available at: https://github.com/apache/ambari/pull/2147 ]
This message was relayed via gitbox.apache.org for devnull@infra.apache.org
[GitHub] [ambari] rlevas closed pull request #2147: [AMBARI-24522]
Cannot connect to MIT KDC admin server when port is specified in
kerberos-env/admin_server_host
Posted by "rlevas (GitHub)" <gi...@apache.org>.
[ pull request closed by rlevas ]
[ Full content available at: https://github.com/apache/ambari/pull/2147 ]
This message was relayed via gitbox.apache.org for devnull@infra.apache.org
[GitHub] [ambari] jonathan-hurley commented on pull request #2147:
[AMBARI-24522] Cannot connect to MIT KDC admin server when port is specified
in kerberos-env/admin_server_host
Posted by "jonathan-hurley (GitHub)" <gi...@apache.org>.
Hmmm - OK, we can keep it as one. It was just confusing to me when you'd need one vs the other.
[ Full content available at: https://github.com/apache/ambari/pull/2147 ]
This message was relayed via gitbox.apache.org for devnull@infra.apache.org
[GitHub] [ambari] rlevas commented on pull request #2147:
[AMBARI-24522] Cannot connect to MIT KDC admin server when port is specified
in kerberos-env/admin_server_host
Posted by "rlevas (GitHub)" <gi...@apache.org>.
For most cases, the host and port are needed to declare where the server is. However in a special case, we need to not have the port since we are using the data to build a service principal name.
I guess that I can break this into two methods. I originally did this and then changed it. I figured someone would see the getAdminServerHost method and not notice the getAdminServerHostAndPort method or not know to get the port using some getAdminServerPort method. Also since most of the time the hostname and port values were to be used together, I would have that value cached and ready to go rather then recalculating the string every time.
[ Full content available at: https://github.com/apache/ambari/pull/2147 ]
This message was relayed via gitbox.apache.org for devnull@infra.apache.org
[GitHub] [ambari] rlevas commented on issue #2147: [AMBARI-24522]
Cannot connect to MIT KDC admin server when port is specified in
kerberos-env/admin_server_host
Posted by "rlevas (GitHub)" <gi...@apache.org>.
retest this please
[ Full content available at: https://github.com/apache/ambari/pull/2147 ]
This message was relayed via gitbox.apache.org for devnull@infra.apache.org