Discussion:
[Freeipa-devel] [freeipa PR#689][opened] Sort SRV records by priority
alex-zel
2017-04-04 07:04:25 UTC
Permalink
URL: https://github.com/freeipa/freeipa/pull/689
Author: alex-zel
Title: #689: Sort SRV records by priority
Action: opened

PR body:
"""
In some cases where multiple SRV records are present, LDAP and Kerberos records were returned in different order, causing replication issues in a multi master enviorment.

## Replication:
DNS configuration (using PfSense):
```
srv-host=_kerberos._udp.example.com,server01.example.com,88,0,1
srv-host=_kerberos._tcp.example.com,server01.example.com,88,0,1
srv-host=_kerberos-master._tcp.example.com,server01.example.com,88,0,1
srv-host=_kerberos-master._udp.example.com,server01.example.com,88,0,1
srv-host=_kpasswd._tcp.example.com,server01.example.com,88,0,1
srv-host=_kpasswd._udp.example.com,server01.example.com,88,0,1
srv-host=_ldap._tcp.example.com,server01.example.com,389,0,1
srv-host=_kerberos._udp.example.com,server02.example.com,88,0,2
srv-host=_kerberos._tcp.example.com,server02.example.com,88,0,2
srv-host=_kerberos-master._tcp.example.com,server02.example.com,88,0,2
srv-host=_kerberos-master._udp.example.com,server02.example.com,88,0,2
srv-host=_kpasswd._tcp.example.com,server02.example.com,88,0,2
srv-host=_kpasswd._udp.example.com,server02.example.com,88,0,2
srv-host=_ldap._tcp.example.com,server02.example.com,389,0,2
txt-record=_kerberos.example.com,EXAMPLE.COM
```

Client installation:
Host record is added beforehand from web UI on server01.example.com ONLY.
`/usr/sbin/ipa-client-install --force-join --principal=bind_user --password=bind_pass --hostname=`hostname -f` --unattended`
2017-04-02T10:54:09Z DEBUG [IPA Discovery]
2017-04-02T10:54:09Z DEBUG Starting IPA discovery with domain=None, servers=None, hostname=client01.example.com
2017-04-02T10:54:09Z DEBUG Start searching for LDAP SRV record in "example.com" (domain of the hostname) and its sub-domains
2017-04-02T10:54:09Z DEBUG Search DNS for SRV record of _ldap._tcp.example.com
2017-04-02T10:54:09Z DEBUG DNS record found: 0 1 389 server01.example.com.
2017-04-02T10:54:09Z DEBUG DNS record found: 0 2 389 server02.example.com.
2017-04-02T10:54:09Z DEBUG [Kerberos realm search]
2017-04-02T10:54:09Z DEBUG Search DNS for TXT record of _kerberos.example.com
2017-04-02T10:54:09Z DEBUG DNS record not found: NoAnswer
2017-04-02T10:54:09Z DEBUG Search DNS for SRV record of _kerberos._udp.example.com
2017-04-02T10:54:09Z DEBUG DNS record found: 0 2 88 server02.example.com.
2017-04-02T10:54:09Z DEBUG DNS record found: 0 1 88 server01.example.com.
Notice the records are not in the same order, ipa-client-install did not return any error and the client machine could see user, groups, netgroups, but users could not authenticate.
Looking at the web UI, server01.example.com shows the client is not enrolled and no kerberos key is present, but server02.example.com shows the client is enrolled and has a key.

In cases were either server01 or server02 were returned first in IPA Discovery the installation and replication went fine.
"""

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/689/head:pr689
git checkout pr689
alex-zel
2017-04-06 07:06:39 UTC
Permalink
URL: https://github.com/freeipa/freeipa/pull/689
Author: alex-zel
Title: #689: Sort SRV records by priority
Action: synchronized

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/689/head:pr689
git checkout pr689
MartinBasti
2017-04-06 10:54:06 UTC
Permalink
URL: https://github.com/freeipa/freeipa/pull/689
Title: #689: Sort SRV records by priority

MartinBasti commented:
"""
@alex-zel Please merge your commits into one, thanks.
"""

See the full comment at https://github.com/freeipa/freeipa/pull/689#issuecomment-292138392
alex-zel
2017-04-06 11:05:01 UTC
Permalink
URL: https://github.com/freeipa/freeipa/pull/689
Author: alex-zel
Title: #689: Sort SRV records by priority
Action: synchronized

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/689/head:pr689
git checkout pr689
alex-zel
2017-04-06 11:05:55 UTC
Permalink
URL: https://github.com/freeipa/freeipa/pull/689
Title: #689: Sort SRV records by priority

alex-zel commented:
"""
Sorry I think I messed up trying to squash the commits
"""

See the full comment at https://github.com/freeipa/freeipa/pull/689#issuecomment-292140831
MartinBasti
2017-04-06 11:13:32 UTC
Permalink
URL: https://github.com/freeipa/freeipa/pull/689
Title: #689: Sort SRV records by priority

MartinBasti commented:
"""
```
git reset HEAD~3
git commit add -p
git commit --amend
```

should help
"""

See the full comment at https://github.com/freeipa/freeipa/pull/689#issuecomment-292142293
alex-zel
2017-04-24 06:52:11 UTC
Permalink
URL: https://github.com/freeipa/freeipa/pull/689
Author: alex-zel
Title: #689: Sort SRV records by priority
Action: synchronized

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/689/head:pr689
git checkout pr689
MartinBasti
2017-05-15 13:48:47 UTC
Permalink
URL: https://github.com/freeipa/freeipa/pull/689
Author: alex-zel
Title: #689: Sort SRV records by priority
Action: synchronized

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/689/head:pr689
git checkout pr689
MartinBasti
2017-05-15 13:49:54 UTC
Permalink
URL: https://github.com/freeipa/freeipa/pull/689
Title: #689: Sort SRV records by priority

MartinBasti commented:
"""
I squashed your commits, please check
"""

See the full comment at https://github.com/freeipa/freeipa/pull/689#issuecomment-301480548
alex-zel
2017-05-16 05:44:08 UTC
Permalink
URL: https://github.com/freeipa/freeipa/pull/689
Title: #689: Sort SRV records by priority

alex-zel commented:
"""
Thanks, sorry I didn't get to it.
"""

See the full comment at https://github.com/freeipa/freeipa/pull/689#issuecomment-301681362
MartinBasti
2017-05-16 07:37:48 UTC
Permalink
URL: https://github.com/freeipa/freeipa/pull/689
Title: #689: Sort SRV records by priority

Label: +ack
MartinBasti
2017-05-16 07:44:25 UTC
Permalink
URL: https://github.com/freeipa/freeipa/pull/689
Title: #689: Sort SRV records by priority

Label: +pushed
MartinBasti
2017-05-16 07:44:29 UTC
Permalink
URL: https://github.com/freeipa/freeipa/pull/689
Title: #689: Sort SRV records by priority

MartinBasti commented:
"""
master:

* 8ec8e24015df29bae97fa58d1a7ae12d28639d25 Sort SRV records by priority


"""

See the full comment at https://github.com/freeipa/freeipa/pull/689#issuecomment-301702375
MartinBasti
2017-05-16 07:44:33 UTC
Permalink
URL: https://github.com/freeipa/freeipa/pull/689
Author: alex-zel
Title: #689: Sort SRV records by priority
Action: closed

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/689/head:pr689
git checkout pr689

Loading...