$ sudo changeip -checkhostname
If you need to change it (ie: after a DNS table change) use the following command (for OD sites):
changeip /LDAPv3/127.0.0.1/ 18.104.22.168 22.214.171.124 old.example.com new.example.com
changeip also has a lot of other uses (ie: if you change the ip address of your machine you can use changeip to change the setting in the directory as well). Have a look at the man pages for more info.
If you’re having trouble kerberizing your Open Directory under OSX server then you are also most likely having hostname problems. Run the first command to check the hostname information and make sure “Current Hostname” and “DNS Hostname” in it’s output match. If they don’t use the second command to change (fix) it (assuming your DNS is working properly). Then you can go to Server Admin and under Open Directory/Settings press the Kerberize button that Pops up on the lower left.