Issue #3879
closedIssue #3981: Switch Pulp3 settings to Dynaconf
Cannot opt out of settings defaults due to merging of settings
Description
Issue¶
The pointed issue is that if I want to configure pure console logging (for container environments) I cannot. The syslog handler gets configured and attempts to connect failing. If I try to set my logging configuration like the following, the syslog handler I explicitly try to exclude is added:
logging:
formatters:
simple:
format: "pulp: %(name)s:%(levelname)s: %(message)s"
handlers:
console:
class: logging.StreamHandler
formatter: simple
loggers:
'':
handlers: ["console"]
level: INFO
I have had to hack around this for now via -- https://github.com/ehelms/pulp/commit/8e82d27a6294c2db139ce2ffc41002cc70309777
How can I only use my settings and not "merge" with the defaults.
Solution¶
Update the behavior to be an 'overwrite' from the top level of each. The merge could would only replace user values for default values for the keys: DATABASES, logging, ..., PROFILING
Updated by bmbouter over 6 years ago
- Subject changed from Can not configure pure console logging, settings merges unwanted content to Cannot opt out of settings defaults due to merging of settings
@ehelms, I agree this design is problematic in several ways. One is the inability to waive included defaults. Also the yaml format overlaid onto Python code here causes some issues as I remember. We should write out some ideas on this ticket I think.
Also I'm +1 to syslog being the default. Maybe at INFO level? How would you feel about highlighting this default change for pulp3 on pulp-dev? If not I'm happy to. Then this ticket can be for the overlay issue.
Updated by ehelms@redhat.com over 6 years ago
Updated description reads good for talking the merge. The issues around console logging by default will be raised by me to the list.
Updated by daviddavis over 6 years ago
+1 to adding this to the sprint. At the very least, I'll mark it as a sprint candidate so we consider it at the sprint planning next week.
Updated by daviddavis over 6 years ago
- Groomed changed from No to Yes
- Sprint Candidate changed from No to Yes
Updated by CodeHeeler over 6 years ago
- Triaged changed from No to Yes
- Sprint set to Sprint 40
Updated by vdusek over 6 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to vdusek
Updated by jortel@redhat.com over 6 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to jortel@redhat.com
Updated by jortel@redhat.com over 6 years ago
Looks like only the console logging (change) has been resolved on @pulp-dev. I don't recall a discussion or consensus reached re: how the .yaml is applied to the settings.py. I'll start the discussion on @pulp-dev just to be sure.
Updated by jortel@redhat.com about 6 years ago
- Status changed from ASSIGNED to NEW
- Assignee deleted (
jortel@redhat.com)
Updated by bmbouter about 6 years ago
- Sprint deleted (
Sprint 43)
This will be resolved by the epic 3981.
Updated by dkliban@redhat.com about 6 years ago
- Status changed from NEW to POST
- Assignee set to dkliban@redhat.com
Updated by dkliban@redhat.com about 6 years ago
Added by Bruno Rocha about 6 years ago
Added by Bruno Rocha about 6 years ago
Revision e1fcdda1 | View on GitHub
Problem: Pulp can't be configured using environment variables
Solution: use dynaconf to manage all of Pulp configuration settings
This patch also adds pulpcore.rqconfig module that is dynamically generated from the Django settings generated by dynaconf. The rq workers use this module for their configuration.
The default location of the config file is now at /etc/pulp/settings.py
. Pulp can operate without by relying
on environment variables.
closes: #3981 https://pulp.plan.io/issues/3981
closes: #3879 https://pulp.plan.io/issues/3879
closes: #3980 https://pulp.plan.io/issues/3980
Updated by Anonymous about 6 years ago
- Status changed from POST to MODIFIED
Applied in changeset pulp|e1fcdda1d56f388bc8daba20f13d6a25217f5c25.
Updated by bmbouter almost 5 years ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Problem: Pulp can't be configured using environment variables
Solution: use dynaconf to manage all of Pulp configuration settings
This patch also adds pulpcore.rqconfig module that is dynamically generated from the Django settings generated by dynaconf. The rq workers use this module for their configuration.
The default location of the config file is now at
/etc/pulp/settings.py
. Pulp can operate without by relying on environment variables.closes: #3981 https://pulp.plan.io/issues/3981
closes: #3879 https://pulp.plan.io/issues/3879
closes: #3980 https://pulp.plan.io/issues/3980
closes #3618 https://pulp.plan.io/issues/3618
closes: #3943 https://pulp.plan.io/issues/3943