Chapter 2. Enabling RHOSO observability logging
Enable and configure Red Hat OpenStack Services on OpenShift (RHOSO) observability logging to collect, store, and access logs from your RHOSO environment. When observability logging is enabled on the control plane, you can enable the RHOSO observability logging service on the data plane.
2.1. Prerequisites Copy linkLink copied to clipboard!
-
The Loki Operator is installed and started by creating a
LokiStackinstance. For more information, see Installing the Loki Operator by using the CLI in the Red Hat OpenShift Logging Installing logging guide. - The Red Hat OpenShift Logging Operator is installed. For more information about installing the Red Hat OpenShift Logging Operator, see Installing Red Hat OpenShift Logging Operator by using the CLI in the Red Hat OpenShift Logging Installing Logging guide.
-
An instance of the Red Hat OpenShift Logging Operator is started for the control plane by creating a
ClusterLogForwarderthat is configured for application logs retrieval. For an example of how to configure theClusterLogForwarderinstance for application logs retrieval, see the Application logs retrieval configuration example. -
An instance of the Red Hat OpenShift Logging Operator is started for the data plane by creating a
ClusterLogForwarderthat is configured with aSyslogreceiver. For an example of how to configure theClusterLogForwarderinstance with a `Syslog`receiver, see the Syslog receiver configuration example. - The logging plugin is installed to enable the logging tab in the observability dashboard. For more information, see Installing the logging UI plugin by using the CLI.
2.2. Enabling RHOSO observability logging on the control plane Copy linkLink copied to clipboard!
To enable and configure observability logging on the control plane, you edit the Telemetry service in your OpenStackControlPlane custom resource (CR) file.
Procedure
-
Open the
OpenStackControlPlaneCR definition file,openstack_control_plane.yaml, on your workstation. Update the
telemetrysection based on the needs of your environment:Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
logging.enabled: Set totrueto enable observability logging. -
logging.annotations.metallb.universe.tf/address-pool: Set to the RHOSO network that you want to use to transport the logs from the Compute nodes to the control plane. -
logging.annotations.metallb.universe.tf/loadBalancerIPs: Set to the IP address thatrsyslogsends messages to. Ensure that the IP address is reachable from the Compute node. The default IP address is the default VIP forinternalapi, which is 172.17.0.80.
-
Update the control plane:
oc apply -f openstack_control_plane.yaml -n openstack
$ oc apply -f openstack_control_plane.yaml -n openstackCopy to Clipboard Copied! Toggle word wrap Toggle overflow Wait until RHOCP creates the resources related to the
OpenStackControlPlaneCR. Run the following command to check the status:oc get openstackcontrolplane -n openstack NAME STATUS MESSAGE openstack-control-plane Unknown Setup started
$ oc get openstackcontrolplane -n openstack NAME STATUS MESSAGE openstack-control-plane Unknown Setup startedCopy to Clipboard Copied! Toggle word wrap Toggle overflow The OpenStackControlPlane resources are created when the status is "Setup complete".
TipAppend the
-woption to the end of thegetcommand to track deployment progress
Verification
- Open the logging pane in the OpenShift Console.
-
Select Observe
Logs. - From the drop-down menu, choose Application.
- Verify that pod logs from the RHOSO control plane services are present.
2.3. Enabling RHOSO observability logging on the data plane Copy linkLink copied to clipboard!
You can enable Red Hat OpenStack Services on OpenShift (RHOSO) observability logging on the data plane by adding the OpenStackDataPlaneService logging service to the services list of each OpenStackDataPlaneNodeSet custom resource (CR) defined for the data plane.
Prerequisites
- RHOSO observability logging is enabled on the control plane.
Procedure
-
Open the
OpenStackDataPlaneNodeSetCR definition file for the node set you want to update, for example,openstack_data_plane.yaml. Add the
servicesfield, and include all the required services, including the default services, then addloggingaftertelemetry:Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
Save the
OpenStackDataPlaneNodeSetCR definition file. Apply the updated
OpenStackDataPlaneNodeSetCR configuration:oc apply -f openstack_data_plane.yaml
$ oc apply -f openstack_data_plane.yamlCopy to Clipboard Copied! Toggle word wrap Toggle overflow Verify that the data plane resource has been updated by confirming that the status is
SetupReady:oc wait openstackdataplanenodeset openstack-data-plane --for condition=SetupReady --timeout=10m
$ oc wait openstackdataplanenodeset openstack-data-plane --for condition=SetupReady --timeout=10mCopy to Clipboard Copied! Toggle word wrap Toggle overflow When the status is
SetupReadythe command returns acondition metmessage, otherwise it returns a timeout error.For information about the data plane conditions and states, see Data plane conditions and states in Deploying Red Hat OpenStack Services on OpenShift.
Create a file on your workstation to define the
OpenStackDataPlaneDeploymentCR:apiVersion: dataplane.openstack.org/v1beta1 kind: OpenStackDataPlaneDeployment metadata: name: <node_set_deployment_name>
apiVersion: dataplane.openstack.org/v1beta1 kind: OpenStackDataPlaneDeployment metadata: name: <node_set_deployment_name>Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
Replace
<node_set_deployment_name>with the name of theOpenStackDataPlaneDeploymentCR. The name must be unique, must consist of lower case alphanumeric characters,-(hyphen) or.(period), and must start and end with an alphanumeric character.
TipGive the definition file and the
OpenStackDataPlaneDeploymentCR unique and descriptive names that indicate the purpose of the modified node set.-
Replace
Add the
OpenStackDataPlaneNodeSetCR that you modified:spec: nodeSets: - <nodeSet_name>spec: nodeSets: - <nodeSet_name>Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
Save the
OpenStackDataPlaneDeploymentCR deployment file. Deploy the modified
OpenStackDataPlaneNodeSetCR:oc create -f openstack_data_plane_deploy.yaml -n openstack
$ oc create -f openstack_data_plane_deploy.yaml -n openstackCopy to Clipboard Copied! Toggle word wrap Toggle overflow You can view the Ansible logs while the deployment executes:
oc get pod -l app=openstackansibleee -w oc logs -l app=openstackansibleee -f --max-log-requests 10
$ oc get pod -l app=openstackansibleee -w $ oc logs -l app=openstackansibleee -f --max-log-requests 10Copy to Clipboard Copied! Toggle word wrap Toggle overflow If the
oc logscommand returns an error similar to the following error, increase the--max-log-requestsvalue:error: you are attempting to follow 19 log streams, but maximum allowed concurrency is 10, use --max-log-requests to increase the limit
error: you are attempting to follow 19 log streams, but maximum allowed concurrency is 10, use --max-log-requests to increase the limitCopy to Clipboard Copied! Toggle word wrap Toggle overflow Verify that the modified
OpenStackDataPlaneNodeSetCR is deployed:Copy to Clipboard Copied! Toggle word wrap Toggle overflow For information about the meaning of the returned status, see Data plane conditions and states in the Deploying Red Hat OpenStack Services on OpenShift guide.
If the status indicates that the data plane has not been deployed, then troubleshoot the deployment. For information, see Troubleshooting the data plane creation and deployment in the Deploying Red Hat OpenStack Services on OpenShift guide.
If you added a new node to the node set, then map the node to the Compute cell it is connected to:
oc rsh nova-cell0-conductor-0 nova-manage cell_v2 discover_hosts --verbose
$ oc rsh nova-cell0-conductor-0 nova-manage cell_v2 discover_hosts --verboseCopy to Clipboard Copied! Toggle word wrap Toggle overflow If you did not create additional cells, this command maps the Compute nodes to
cell1.Access the remote shell for the
openstackclientpod and verify that the deployed Compute nodes are visible on the control plane:oc rsh -n openstack openstackclient openstack hypervisor list
$ oc rsh -n openstack openstackclient $ openstack hypervisor listCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Verification
- Open the logging pane in the OpenShift Console.
-
Click
Observeand then clickLogs. -
From the drop-down menu, choose
Infrastructure. -
Verify that
Journaldlogs from the Compute nodes are present.