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

ldap2: fix crash in development mode #561

Closed
wants to merge 2 commits into from
Closed

ldap2: fix crash in development mode #561

wants to merge 2 commits into from

Conversation

HonzaCholasta
Copy link
Contributor

@HonzaCholasta HonzaCholasta commented Mar 9, 2017

Do not set or delete attributes directly on the ldap2 instance, as that
raises an AttributeError in development mode because of ReadOnly locking.

Use the usual workaround of object.__setattr__ and object.__delattr__
to fix the issue.

https://pagure.io/freeipa/issue/6625

@tkrizek
Copy link
Contributor

tkrizek commented Mar 9, 2017

Seems to work all right, but the locking issue still affects other parts of the code. For example, ipa cert-show in development mode fails with:

AttributeError: locked: cannot set ra_lightweight_ca.cookie 

I'm not sure if that's in the ticket's scope or not.

@tkrizek tkrizek self-assigned this Mar 9, 2017
@HonzaCholasta
Copy link
Contributor Author

Let's see what Travis detects.

@HonzaCholasta
Copy link
Contributor Author

Travis didn't detect anything else, so I think we are good to go. Shall we keep the .test_runner_config.yaml change? (@martbab?)

@martbab
Copy link
Contributor

martbab commented Mar 10, 2017

Yes but please split it into a separate patch so that CI-related changes are tracked separately and do not pollute the changes in the code.

@HonzaCholasta
Copy link
Contributor Author

Turns out unsetting mode in default.conf is not good enough, one has to explicitly set it to "development" to enable development mode, because "production" is the default.

Let's see if Travis detects something this time.

Jan Cholasta added 2 commits March 10, 2017 14:13
Do not set or delete attributes directly on KerberosWSGIExecutioner, ldap2
and ra_lightweight_ca instances, as that raises an AttributeError in
development mode because of ReadOnly locking.

Use the usual workaround of `object.__setattr__` and `object.__delattr__`
to fix the issue.

https://pagure.io/freeipa/issue/6625
Set `mode` to `development` in default.conf after ipa-server-install.

https://pagure.io/freeipa/issue/6625
@HonzaCholasta
Copy link
Contributor Author

OK everything is green now.

@tkrizek tkrizek added the ack Pull Request approved, can be merged label Mar 13, 2017
@MartinBasti MartinBasti added the pushed Pull Request has already been pushed label Mar 13, 2017
@MartinBasti
Copy link
Contributor

master:

  • 8fdd7a9 backend plugins: fix crashes in development mode
  • fe4489e Travis CI: run tests in development mode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ack Pull Request approved, can be merged pushed Pull Request has already been pushed
Projects
None yet
4 participants