Skip to content

Conversation

blizzz
Copy link
Member

@blizzz blizzz commented May 24, 2017

Continuation of #4992

@bline I signed-off your commits so this test passes :) Please test whether my changes still work for you.

For Nc 13 we should aim for a cleaner solution, but this requires architectural changes. Alas, we need to backport it, so let's get this is as an intermediate step.

Fixes LDAP Server caused timeout with long-running processes where there is a too big gap between LDAP calls.

bline and others added 3 commits May 25, 2017 00:34
…e was a generic way to pass by reference with call_user_func_array..

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
@mention-bot
Copy link

@blizzz, thanks for your PR! By analyzing the history of the files in this pull request, we identified @MorrisJobke, @LukasReschke and @Xenopathic to be potential reviewers.

@bline
Copy link
Contributor

bline commented May 25, 2017

Thanks @blizzz, I'll test this tonight.

@blizzz
Copy link
Member Author

blizzz commented May 26, 2017

Unfortunately the controlPagedResultResponse does not work around this way. With https://github.com/nextcloud/server/pull/5122/files you can use the IntegrationTestPaging and will see it fails. Likely invokeLDAPMethod() just does not handle this as reference.

@blizzz
Copy link
Member Author

blizzz commented May 26, 2017

Possible solutions:

(1) don't use this method against the invoker, because it is fired very soon after an LDAP operation took place. An idleTimeout sould not be effective here.

(2) expect the command name, accept ALL attributes as references (invokeLDAPMethod($command, &...$arguments)). Downside: many places where value instead of variables are passed. Makes it cumbersome.

For simplicity I'd go with (1), although I first liked the second more at first. The final solution for 13 could adopt this.

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
@codecov
Copy link

codecov bot commented May 26, 2017

Codecov Report

Merging #5104 into master will increase coverage by <.01%.
The diff coverage is 45%.

@@             Coverage Diff              @@
##             master    #5104      +/-   ##
============================================
+ Coverage     54.14%   54.15%   +<.01%     
- Complexity    22283    22289       +6     
============================================
  Files          1379     1379              
  Lines         85337    85361      +24     
  Branches       1322     1322              
============================================
+ Hits          46209    46227      +18     
- Misses        39128    39134       +6
Impacted Files Coverage Δ Complexity Δ
apps/user_ldap/lib/Access.php 18.42% <45%> (+1.12%) 301 <7> (+6) ⬆️
lib/private/Server.php 93.27% <0%> (-0.15%) 120% <0%> (ø)
core/js/js.js 61.78% <0%> (+0.56%) 0% <0%> (ø) ⬇️
lib/private/Security/CertificateManager.php 91.83% <0%> (+1.02%) 39% <0%> (ø) ⬇️

@blizzz
Copy link
Member Author

blizzz commented May 26, 2017

I created a backport to stable11 #5128

stable12 upcoming, but this is far easier as the code base is pretty much the same as master

@blizzz
Copy link
Member Author

blizzz commented May 26, 2017

Tests succeeds, only DB=postgresENABLE_REDIS=truePHP=5.6 runs into a timeout [sic!], but this is known from CI.

@blizzz
Copy link
Member Author

blizzz commented May 29, 2017

Tested successfully by @bline as stated #5128 (comment)

Still need a reviewer @nextcloud/ldap :)

Copy link
Member

@rullzer rullzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense 👍

@blizzz blizzz merged commit 8318b2a into master May 31, 2017
@blizzz blizzz deleted the ldap-attempt-reconnect branch May 31, 2017 23:21
@blizzz
Copy link
Member Author

blizzz commented May 31, 2017

@karlitschek btw, backport OK? Down to 11?

@blizzz
Copy link
Member Author

blizzz commented Jun 1, 2017

missing backport to 12: #5210

@karlitschek
Copy link
Member

nice. definitely backport to 12 and 11

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

Successfully merging this pull request may close these issues.

6 participants