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

Remove logging config workarounds #12

Merged
merged 3 commits into from
Aug 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions build-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,7 @@ buildah config \
--env=LDAP_ADMPASS="secret" \
--env=LDAP_DOMAIN="nethserver.test" \
--env=LDAP_SUFFIX="dc=nethserver,dc=test" \
--env=LDAP_LOGTAG="slapd" \
--env=LDAP_LOGLEVEL="16704" \
--env=LDAP_LOGLEVEL="16384" \
--env=LDAP_DEBUGLEVEL="0" \
"${container}"
# Commit the image
Expand Down
2 changes: 0 additions & 2 deletions imageroot/actions/configure-module/50start_provisioning
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ ldapenv = {
'LDAP_SERVERID': str(server_id),
'LDAP_PORT': os.environ['TCP_PORT'],
'LDAP_IPADDR': ip_address,
'LDAP_LOGTAG': os.environ['MODULE_ID'],
}

for lvar in ldapenv:
Expand All @@ -92,4 +91,3 @@ os.environ.update({
'LDAP_ADMPASS': request['admpass'],
})
agent.run_helper(*podman_cmd).check_returncode()
agent.dump_env() # Persist environment file for Systemd unit
3 changes: 0 additions & 3 deletions imageroot/actions/import-module/50import_environment
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,7 @@ ldapenv = {
'LDAP_SERVERID': str(server_id),
'LDAP_PORT': os.environ['TCP_PORT'],
'LDAP_IPADDR': ip_address,
'LDAP_LOGTAG': os.environ['MODULE_ID'],
}

for lvar in ldapenv:
agent.set_env(lvar, ldapenv[lvar])

agent.dump_env()
3 changes: 0 additions & 3 deletions imageroot/actions/restore-module/10resume_environment
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,7 @@ ldapenv = {
'LDAP_SERVERID': str(server_id),
'LDAP_PORT': os.environ['TCP_PORT'],
'LDAP_IPADDR': ip_address,
'LDAP_LOGTAG': os.environ['MODULE_ID'],
}

for lvar in ldapenv:
agent.set_env(lvar, ldapenv[lvar])

agent.dump_env()
2 changes: 0 additions & 2 deletions server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ The LDAP database schema should be compliant with RFC2307.
always added to this too)
* `LDAP_SERVERID`, a unique positive integer required to identify the
server among others of the same domain
* `LDAP_LOGTAG`, server Syslog identifier
* `LDAP_DEBUGLEVEL`, slapd debug-level (see `slapd` manpage for info).
* `LDAP_LOGLEVEL`, slapd log level (see `slapd` manpage for info).
Used to set log file verbosity, for debug purposes.
Expand Down Expand Up @@ -96,7 +95,6 @@ Create a `./lenv` file with the following contents
LDAP_SERVERID=1
LDAP_PORT=10389
LDAP_IPADDR=10.5.4.1
LDAP_LOGTAG=domtest1

Provision the domain

Expand Down
3 changes: 1 addition & 2 deletions server/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ LDAP_SUFFIX=${LDAP_SUFFIX:?}
LDAP_DOMAIN=${LDAP_DOMAIN:?}
LDAP_IPADDR=${LDAP_IPADDR:?}
LDAP_PORT=${LDAP_PORT:?}
LDAP_LOGTAG=${LDAP_LOGTAG:?}
LDAP_DEBUGLEVEL=${LDAP_DEBUGLEVEL:?}
LDAP_LOGLEVEL=${LDAP_LOGLEVEL:?}

Expand All @@ -52,7 +51,7 @@ mkdir -p run

if [ $# -eq 0 ]; then
rm -vf run/*
exec slapd -n "${LDAP_LOGTAG}" -d "${LDAP_DEBUGLEVEL}" -F conf.d -h "${tmpl_server_url} ldap://127.0.0.1:${LDAP_PORT} ldapi://"
exec slapd -d "${LDAP_DEBUGLEVEL}" -F conf.d -h "${tmpl_server_url} ldap://127.0.0.1:${LDAP_PORT} ldapi://"
else
exec "${@}"
fi
Loading