Skip to content
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

Log switching to LDAP backup host because main one is not available #35230

Merged
merged 3 commits into from
Nov 24, 2022

Conversation

come-nc
Copy link
Contributor

@come-nc come-nc commented Nov 17, 2022

Signed-off-by: Côme Chilliet come.chilliet@nextcloud.com

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
@come-nc come-nc added the 3. to review Waiting for reviews label Nov 17, 2022
@come-nc come-nc added this to the Nextcloud 26 milestone Nov 17, 2022
@come-nc come-nc requested review from PVince81, blizzz and a team November 17, 2022 13:59
@come-nc come-nc self-assigned this Nov 17, 2022
@come-nc come-nc requested review from icewind1991 and removed request for a team November 17, 2022 13:59
@come-nc
Copy link
Contributor Author

come-nc commented Nov 17, 2022

@blizzz Should that be warning? It’s an important information that main LDAP server is not reachable.

}

//if LDAP server is not reachable, try the Backup (Replica!) Server
if ($isBackupHost || $isOverrideMainServer) {
$this->doConnect($this->configuration->ldapBackupHost,
$this->configuration->ldapBackupPort);
$this->configuration->ldapBackupPort);

Check notice

Code scanning / Psalm

PossiblyNullArgument

Argument 2 of OCA\User_LDAP\Connection::doConnect cannot be null, possibly null value provided
@@ -681,8 +687,8 @@
}

$ldapLogin = @$this->ldap->bind($cr,
$this->configuration->ldapAgentName,
$this->configuration->ldapAgentPassword);
$this->configuration->ldapAgentName,

Check notice

Code scanning / Psalm

PossiblyNullArgument

Argument 2 of OCA\User_LDAP\ILDAPWrapper::bind cannot be null, possibly null value provided
$this->configuration->ldapAgentName,
$this->configuration->ldapAgentPassword);
$this->configuration->ldapAgentName,
$this->configuration->ldapAgentPassword);

Check notice

Code scanning / Psalm

PossiblyNullArgument

Argument 3 of OCA\User_LDAP\ILDAPWrapper::bind cannot be null, possibly null value provided
@blizzz
Copy link
Member

blizzz commented Nov 18, 2022

@blizzz Should that be warning? It’s an important information that main LDAP server is not reachable.

Ideally this is also noticed elsewhere, but upping it to Warning sounds good to me.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
@come-nc
Copy link
Contributor Author

come-nc commented Nov 21, 2022

Drone failure is not related.

apps/user_ldap/lib/Connection.php Outdated Show resolved Hide resolved
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
@come-nc
Copy link
Contributor Author

come-nc commented Nov 24, 2022

CI failure unrelated

@come-nc come-nc merged commit e00740e into master Nov 24, 2022
@come-nc come-nc deleted the fix/user_ldap-log-backup-switch branch November 24, 2022 17:20
@come-nc
Copy link
Contributor Author

come-nc commented Nov 24, 2022

/backport to stable25

@come-nc
Copy link
Contributor Author

come-nc commented Nov 24, 2022

/backport to stable24

@come-nc
Copy link
Contributor Author

come-nc commented Nov 24, 2022

/backport to stable23

@backportbot-nextcloud
Copy link

The backport to stable25 failed. Please do this backport manually.

@backportbot-nextcloud
Copy link

The backport to stable24 failed. Please do this backport manually.

@backportbot-nextcloud
Copy link

The backport to stable23 failed. Please do this backport manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants