Closed Bug 1232400 Opened 9 years ago Closed 9 years ago

Make LDAP master updates optional when SSHing to hg.mozilla.org

Categories

(Developer Services :: Mercurial: hg.mozilla.org, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: gps, Assigned: gps)

Details

Attachments

(2 files)

The LDAP master has been keeling over repeatedly for the past week or so. SSH sessions into hg.mozilla.org are failing due to inability to talk to the LDAP master.

We use a read-only LDAP server for processing logins and permissions. We use the writable LDAP master for recording last access date. We don't strictly need to record the last access date on every SSH session. So let's make this optional and reduce our failure points by 1.
hgserver: don't require LDAP attribute update (bug 1232400); r?fubar

The LDAP master has been failing periodically for the last several days.
This was causing people to fail to SSH into hg.mozilla.org.

Since the LDAP master is only used for updating the last access
attribute and it isn't critical for this to succeed 100% of the time,
let's loosen the requirements around updating the last access attribute.

With this commit, we now ignore failures connecting to the LDAP master
server. A test demonstrating the graceful failure has been added.
Attachment #8698138 - Flags: review?(klibby)
Comment on attachment 8698138 [details]
MozReview Request: hgserver: don't require LDAP attribute update (bug 1232400); r?fubar

https://reviewboard.mozilla.org/r/27833/#review24983

::: hgserver/pash/ldap_helper.py:31
(Diff revision 1)
> -    if ldap_conn:
> +    if not ldap_conn:

get_ldap_attrib is where we check for hgAccountEnabled, which I think we DO want to be strict about. Setting the access time is in update_access_date().
Attachment #8698138 - Flags: review?(klibby)
Comment on attachment 8698612 [details]
MozReview Request: hgserver: don't require LDAP attribute update (bug 1232400); r?fubar

https://reviewboard.mozilla.org/r/27833/#review25121

awesome, that's much clearer for adled brains. ;-)
Attachment #8698612 - Flags: review?(klibby) → review+
Thank you. Will deploy shortly.
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Just a note that the LDAP master issue has been fixed now, so we should have stability there again.
Thanks for the update, jabba!
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: