I split this up into three other tickets: #7740 for kadmind accepting anonymous names, #7741 for kadmin -n choosing an appropriate principal, and #7743 for the ability to add a principal and extract its random key. I was not able to reproduce any sporadic failures. If we get enough information about such failures to have a hope of debugging it, we can open a new issue about it.