Skip to content
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
17 changes: 15 additions & 2 deletions docs/user/parameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,21 @@ There are multiple use cases from the users perspective that dictate what parame
| foreman-installer Parameter | Description | Reason |
| --------------------------- | ----------- | ------ |

#### Logging

##### New

| Parameter | Description |
| ----------| ----------- |
| `--log-level` | Default log level for all services. Accepted values: `debug`, `info`, `warn`, `error`, `fatal`. Defaults to `info`. |

##### Mapped

| Parameter | Description | foreman-installer Parameters |
| ----------| ----------- | ---------------------------- |
| `--foreman-log-level` | Log level for Foreman. Overrides `--log-level` for Foreman only. | `--foreman-logging-level` |
| `--foreman-proxy-log-level` | Log level for Foreman Proxy. Overrides `--log-level` for Foreman Proxy only. | `--foreman-proxy-log-level` |

#### Undetermined

| foreman-installer Parameter | Description | Module | Puppet Parameter | Keep |
Expand All @@ -95,7 +110,6 @@ There are multiple use cases from the users perspective that dictate what parame
| `--foreman-keycloak-app-name` | | |
| `--foreman-keycloak-realm` | | |
| `--foreman-logging-layout` | | |
| `--foreman-logging-level` | | |
| `--foreman-logging-type` | | |
Comment on lines 112 to 113

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Not a blocker, but I think I think we can say that layout and type will likely not be supported.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Given the author of this PR won't get to fix it quickly, I propose you track this as a separate work item

| `--foreman-oauth-map-users` | | |
| `--foreman-plugin-remote-execution-cockpit-ensure` | | |
Expand Down Expand Up @@ -165,7 +179,6 @@ There are multiple use cases from the users perspective that dictate what parame
| `--foreman-proxy-content-enable-ostree` | | | |
| `--foreman-proxy-http` | | | |
| `--foreman-proxy-log` | | | |

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Similar to above. This controls where the proxy logs to (stdout, syslog, journal). I think in a containerized world we won't make that configurable so move this to the Unmapped section?

| `--foreman-proxy-log-level` | | | |
| `--foreman-proxy-plugin-ansible-working-dir` | | | |
| `--foreman-proxy-plugin-dhcp-infoblox-dns-view` | | | |
| `--foreman-proxy-plugin-dhcp-infoblox-network-view` | | | |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
include:
- _logging
- _pulp
- _foreman_proxy
1 change: 1 addition & 0 deletions src/playbooks/_flavors/katello/metadata.obsah.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@ include:
- _database_connection
- _foreman
- _foreman_proxy
- _logging
- _pulp
- _tuning
19 changes: 19 additions & 0 deletions src/playbooks/_logging/metadata.obsah.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
variables:
log_level:
help: Default log level for all services.
parameter: --log-level
choices:
- debug
- info
- warn
- error
- fatal
foreman_proxy_log_level:
Comment thread
arvind4501 marked this conversation as resolved.
help: Log level for Foreman Proxy. Defaults to the global log level.
choices:
- debug
- info
- warn
- error
- fatal
1 change: 1 addition & 0 deletions src/playbooks/deploy-proxy/deploy-proxy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
- "../../vars/tuning/{{ tuning }}.yml"
- "../../vars/database.yml"
- "../../vars/foreman.yml"
- "../../vars/logging.yml"
- "../../vars/base.yaml"
roles:
- role: pre_install
Expand Down
1 change: 1 addition & 0 deletions src/playbooks/deploy/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
- "../../vars/tuning/{{ tuning }}.yml"
- "../../vars/database.yml"
- "../../vars/foreman.yml"
- "../../vars/logging.yml"
- "../../vars/base.yaml"
roles:
- role: pre_install
Expand Down
8 changes: 8 additions & 0 deletions src/playbooks/deploy/metadata.obsah.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ variables:
- ipa_with_api
external_authentication_pam_service:
help: Name of the PAM service to use for IPA authentication
foreman_log_level:
help: Log level for Foreman. Defaults to the global log level.
choices:
- debug
- info
- warn
- error
- fatal

include:
- _flavor_features
Expand Down
3 changes: 3 additions & 0 deletions src/roles/foreman/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@
FOREMAN_PUMA_THREADS_MAX: "{{ foreman_puma_threads_max }}"
FOREMAN_PUMA_WORKERS: "{{ foreman_puma_workers }}"
FOREMAN_ENABLED_PLUGINS: "{{ foreman_plugins | join(' ') }}"
FOREMAN_LOGGING_LEVEL: "{{ foreman_log_level }}"
Comment thread
stejskalleos marked this conversation as resolved.
quadlet_options:
- |
[Install]
Expand Down Expand Up @@ -165,6 +166,7 @@
DYNFLOW_REDIS_URL: "redis://localhost:6379/6"
REDIS_PROVIDER: "DYNFLOW_REDIS_URL"
FOREMAN_ENABLED_PLUGINS: "{{ foreman_plugins | join(' ') }}"
FOREMAN_LOGGING_LEVEL: "{{ foreman_log_level }}"
command: "/usr/libexec/foreman/sidekiq-selinux -e production -r ./extras/dynflow-sidekiq.rb -C /etc/foreman/dynflow/%i.yml"
quadlet_options:
- |
Expand Down Expand Up @@ -222,6 +224,7 @@
env:
SEED_ORGANIZATION: "{{ foreman_initial_organization }}"
SEED_LOCATION: "{{ foreman_initial_location }}"
FOREMAN_LOGGING_LEVEL: "{{ foreman_log_level }}"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

not directly related to the PR here, but we have a set of env vars we pass to all foreman containers. time to consolidate them into a variable so we don't have to edit them in multuple places? same for secrets, I guess?

the pulp role has some prior work on this if you look for inspiration

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

quadlet_options:
- |
[Unit]
Expand Down
2 changes: 1 addition & 1 deletion src/roles/foreman_proxy/templates/settings.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

:bind_host: '*'

:log_level: INFO
:log_level: {{ foreman_proxy_log_level | upper }}
:log_file: JOURNAL
:log_buffer: 2000
:log_buffer_errors: 1000
5 changes: 5 additions & 0 deletions src/vars/logging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
log_level: info

foreman_log_level: "{{ log_level }}"
foreman_proxy_log_level: "{{ log_level }}"