New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ipa-replica-install: fix domain level 0 remote LDAP connection #620
Conversation
| @@ -1391,7 +1391,14 @@ def install(installer): | |||
| dsinstance.create_ds_user() | |||
|
|
|||
| try: | |||
| conn.connect(ccache=ccache) | |||
| conn.connect(bind_dn=ipaldap.DIRMAN_DN, bind_pw=config.dirman_password, | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be:
if promote:
conn.connect(ccache)
else:
connect as directory manager
variable promote should be already defined, and promote means domain level 1+ for now, so there is no need for gettting domain level one more time
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
Please merge commits into one and please use full description in commit message instead of ticket number. |
| if promote: | ||
| conn.connect(ccache=ccache) | ||
| else: | ||
| conn.connect(bind_dn=ipaldap.DIRMAN_DN, cacert=cafile, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a comment with explanation so that the fix does not get lost (see the pagure issue for an explanation).
|
@HonzaCholasta, @MartinBasti done :) Thank you |
|
Please try to keep the commit message summary short and append the link to the ticket at the end. For example: |
|
What do you think about: |
|
Seems all right, but I'd go with a more informative summary to make it a bit more clear what's changed when looking through the log: |
|
@felipevolpone, the comment should explain why DM authentication has to be used. |
Now, at the domain level 0, the replica install always uses Directory Manager credentials to create the LDAP connection. Since ACIs permitting hosts to manage their own services were added in 4.2 release, the old master denies this operations. https://pagure.io/freeipa/issue/6549
|
@HonzaCholasta @tomaskrizek please, check if it looks good to you. thank you for helping me guys 👍 |
|
I updated title to more descriptive one and I'm going to test it |
|
You fixed this issue, but uncover more issues, I will open particular tickets. ACK for this fix |
In order to fix https://pagure.io/freeipa/issue/6549.
First of all, I tried at
ipaserver/server/install/replicainstall.py:1393:However, the current_domain_level method was raising this exception:
So, I created a connection first, then I check the domain level.
If the domain level is 0 the connection is already created properly. If the domain level is not 0, then it should create using the ccache (how it was before).
This PR fixes the error specified at the bug #6549, however it doesn't fix the entire ipa-replica-install process. This is the output when running
sudo ipa-replica-install replica-info-vm-058-186.abc.idm.lab.eng.brq.redhat.com.gpg --skip-conncheck