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
replica install: relax domain level check for promotion #416
replica install: relax domain level check for promotion #416
Conversation
Build failure is unrelated to patch. |
a97b9db
to
aa19592
Compare
Excuse me, but what is the point of checking for an exact domain level? Shouldn't |
expected is for domain level 0, because there are different expectations about replica file, it must exactly match domain level 0, you cannot have higher DL. |
I see. The point is, def check_domain_level(api, want_promote):
...
promote = current >= constants.DOMAIN_LEVEL_1
if promote != want_promote:
raise RuntimeError(message)
... |
IMO the whole @stlaz may know more details |
So, what do we want the behaviour of |
promote_check currently requires DL == 1. Relax the check to require DL >= 1, so that things will work for future DL increases. Also separate the concerns of retrieving the current domain level, validating whether the domain level is supported by the IPA version, and validating whether the current domain level supports the replica installation method attempted (i.e. replica file versus promotion). Part of: https://fedorahosted.org/freeipa/ticket/5011
aa19592
to
5517b9e
Compare
@HonzaCholasta @MartinBasti PR updated. I extracted the specific (== 0) and (>= 1) checks to the relevant call sites. Also separated DL retrieval and "DL in range for IPA version" check into separate functions. |
The purpose of Looking back at it I think I chose poor naming and documentation of the check so it's rather confusing. |
@stlaz there are three considerations when "checking the DL":
Whether it makes sense to have a unified function for (3), I am not sure. I think the approach as implemented in this PR - that each replica installation method checks the DL and if necessary raises an appropriate error message - is satisfactory. Certainly it makes more sense to me to have these checks separate from the check for (2). |
@frasertweedale Alright. I am definitely not against having it separated since we came to the realization that replica install checks can not be merged in a satisfactory way anyway. |
Any other changes requested? What's preventing ack on this? |
ACK and I found a new bug: https://fedorahosted.org/freeipa/ticket/6654 |
Fixed upstream |
promote_check currently requires DL == 1. Relax the check to
require DL >= 1, so that things will work for future DL increases.
Part of: https://fedorahosted.org/freeipa/ticket/5011