Skip to content

Commit

Permalink
Configure nova-compute to log to stdout
Browse files Browse the repository at this point in the history
This change configures nova-compute to log to stdout
so that the logs can be redirected to the systemd journal
or openshift logging infrastructure.

Related: OSPRH-140
  • Loading branch information
SeanMooney authored and openshift-merge-bot[bot] committed Feb 19, 2024
1 parent 41497aa commit 0cb1d48
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 0 additions & 1 deletion controllers/novacell_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,6 @@ func (r *NovaCellReconciler) generateComputeConfigs(
"default_user_domain": "Default", // fixme
"compute_driver": "libvirt.LibvirtDriver",
"transport_url": string(secret.Data[TransportURLSelector]),
"log_file": "/var/log/containers/nova/nova-compute.log",
}
// vnc is optional so we only need to configure it for the compute
// if the proxy service is deployed in the cell
Expand Down
5 changes: 5 additions & 0 deletions test/functional/novacell_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,11 @@ var _ = Describe("NovaCell controller", func() {
ContainSubstring(
"live_migration_uri = qemu+ssh://nova@%s/system?keyfile=/var/lib/nova/.ssh/ssh-privatekey"))
Expect(configData).To(ContainSubstring("cpu_power_management=true"))
// The nova compute agent is expected to log to stdout. On edpm nodes this allows podman to
// capture the logs and make them available via `podman logs` while also redirecting the logs
// to the systemd journal. For openshift compute services, the logs are captured by the openshift
// logging infrastructure.
Expect(configData).To(Not(ContainSubstring("log_file = /var/log/nova/nova-compute.log")))

th.ExpectCondition(
cell1.CellCRName,
Expand Down

0 comments on commit 0cb1d48

Please sign in to comment.