Este conteúdo não está disponível no idioma selecionado.
Chapter 13. Troubleshooting and maintaining the Load-balancing service
Basic troubleshooting and maintenance for the Load-balancing service (octavia) starts with being familiar with the OpenStack client commands for showing status and migrating instances, and knowing how to access logs. If you need to troubleshoot more in depth, you can SSH into one or more Load-balancing service instances (amphorae).
- Section 13.1, “Verifying the load balancer”
- Section 13.2, “Load-balancing service instance administrative logs”
- Section 13.3, “Migrating a specific Load-balancing service instance”
- Section 13.4, “Using SSH to connect to load-balancing instances”
- Section 13.5, “Showing listener statistics”
- Section 13.6, “Interpreting listener request errors”
13.1. Verifying the load balancer Copiar o linkLink copiado para a área de transferência!
You can troubleshoot the Load-balancing service (octavia) and its various components by viewing the output of the load balancer show and list commands.
Procedure
Source your credentials file.
Example
source ~/overcloudrc
$ source ~/overcloudrc
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Verify the load balancer (
lb1
) settings.NoteValues inside parentheses are sample values that are used in the example commands in this procedure. Substitute these sample values with ones that are appropriate for your site.
Example
openstack loadbalancer show lb1
$ openstack loadbalancer show lb1
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Sample output
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Using the loadbalancer ID (
265d0b71-c073-40f4-9718-8a182c6d53ca
) from the previous step, obtain the ID of the amphora associated with the load balancer (lb1
).Example
openstack loadbalancer amphora list | grep 265d0b71-c073-40f4-9718-8a182c6d53ca
$ openstack loadbalancer amphora list | grep 265d0b71-c073-40f4-9718-8a182c6d53ca
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Sample output
| 1afabefd-ba09-49e1-8c39-41770aa25070 | 265d0b71-c073-40f4-9718-8a182c6d53ca | ALLOCATED | STANDALONE | 198.51.100.7 | 192.0.2.177 |
| 1afabefd-ba09-49e1-8c39-41770aa25070 | 265d0b71-c073-40f4-9718-8a182c6d53ca | ALLOCATED | STANDALONE | 198.51.100.7 | 192.0.2.177 |
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Using the amphora ID (
1afabefd-ba09-49e1-8c39-41770aa25070
) from the previous step, view amphora information.Example
openstack loadbalancer amphora show 1afabefd-ba09-49e1-8c39-41770aa25070
$ openstack loadbalancer amphora show 1afabefd-ba09-49e1-8c39-41770aa25070
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Sample output
Copy to Clipboard Copied! Toggle word wrap Toggle overflow View the listener (
listener1
) details.Example
openstack loadbalancer listener show listener1
$ openstack loadbalancer listener show listener1
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Sample output
Copy to Clipboard Copied! Toggle word wrap Toggle overflow View the pool (
pool1
) and load-balancer members.Example
openstack loadbalancer pool show pool1
$ openstack loadbalancer pool show pool1
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Sample output
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Verify HTTPS traffic flows across a load balancer whose listener is configured for
HTTPS
orTERMINATED_HTTPS
protocols by connecting to the VIP address (192.0.2.177
) of the load balancer.TipObtain the load-balancer VIP address by using the command,
openstack loadbalancer show <load_balancer_name>
.NoteSecurity groups implemented for the load balancer VIP only allow data traffic for the required protocols and ports. For this reason you cannot ping load balancer VIPs, because ICMP traffic is blocked.
Example
curl -v https://192.0.2.177 --insecure
$ curl -v https://192.0.2.177 --insecure
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Sample output
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
13.2. Load-balancing service instance administrative logs Copiar o linkLink copiado para a área de transferência!
The administrative log offloading feature of the Load-balancing service instance (amphora) covers all of the system logging inside the amphora except for the tenant flow logs. You can send tenant flow logs to the same syslog receiver where the administrative logs are sent. You can send tenant flow logs to the same syslog receiver that processes the administrative logs, but you must configure the tenant flow logs separately.
The amphora sends all administrative log messages by using the native log format for the application sending the message. The amphorae log to the Red Hat OpenStack Platform (RHOSP) Controller node in the same location as the other RHOSP logs (/var/log/containers/octavia/
).
13.3. Migrating a specific Load-balancing service instance Copiar o linkLink copiado para a área de transferência!
In some cases you must migrate a Load-balancing service instance (amphora). For example, if the host is being shut down for maintenance
Procedure
Source your credentials file.
Example
source ~/overcloudrc
$ source ~/overcloudrc
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Locate the ID of the amphora that you want to migrate. You need to provide the ID in a later step.
openstack loadbalancer amphora list
$ openstack loadbalancer amphora list
Copy to Clipboard Copied! Toggle word wrap Toggle overflow To prevent the Compute scheduler service from scheduling any new amphorae to the Compute node being evacuated, disable the Compute node (
compute-host-1
).NoteValues inside parentheses are sample values that are used in the example commands in this procedure. Substitute these sample values with ones that are appropriate for your site.
Example
openstack compute service set compute-host-1 nova-compute --disable
$ openstack compute service set compute-host-1 nova-compute --disable
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Fail over the amphora by using the amphora ID (
ea17210a-1076-48ff-8a1f-ced49ccb5e53
) that you obtained.Example
openstack loadbalancer amphora failover ea17210a-1076-48ff-8a1f-ced49ccb5e53
$ openstack loadbalancer amphora failover ea17210a-1076-48ff-8a1f-ced49ccb5e53
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
13.4. Using SSH to connect to load-balancing instances Copiar o linkLink copiado para a área de transferência!
Use SSH to log in to Load-balancing service instances (amphorae) when troubleshooting service problems.
It can be helpful to use Secure Shell (SSH) to log into running Load-balancing service instances (amphorae) when troubleshooting service problems.
Prerequisites
- You must have the Load-balancing service (octavia) SSH private key.
Procedure
On the director node, start
ssh-agent
and add your user identity key to the agent:eval $(ssh-agent -s) ssh-add
$ eval $(ssh-agent -s) $ ssh-add
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Source your credentials file.
Example
source ~/overcloudrc
$ source ~/overcloudrc
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Determine the IP address on the load-balancing management network (
lb_network_ip
) for the amphora that you want to connect to:openstack loadbalancer amphora list
$ openstack loadbalancer amphora list
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Use SSH to connect to the amphora:
ssh -A -t heat-admin@<controller_node_IP_address> ssh cloud-user@<lb_network_ip>
$ ssh -A -t heat-admin@<controller_node_IP_address> ssh cloud-user@<lb_network_ip>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow When you are finished, close your connection to the amphora and stop the SSH agent:
exit
$ exit
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
13.5. Showing listener statistics Copiar o linkLink copiado para a área de transferência!
Using the OpenStack Client, you can obtain statistics about the listener for a particular Red Hat OpenStack Platform (RHOSP) loadbalancer:
-
current active connections (
active_connections
). -
total bytes received (
bytes_in
). -
total bytes sent (
bytes_out
). -
total requests that were unable to be fulfilled (
request_errors
). -
total connections handled (
total_connections
).
Procedure
Source your credentials file.
Example
source ~/overcloudrc
$ source ~/overcloudrc
Copy to Clipboard Copied! Toggle word wrap Toggle overflow View the stats for the listener (
listener1
).NoteValues inside parentheses are sample values that are used in the example commands in this procedure. Substitute these sample values with ones that are appropriate for your site.
Example
openstack loadbalancer listener stats show listener1
$ openstack loadbalancer listener stats show listener1
Copy to Clipboard Copied! Toggle word wrap Toggle overflow TipIf you do not know the name of the listener, enter the command
loadbalancer listener list
.Sample output
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
13.6. Interpreting listener request errors Copiar o linkLink copiado para a área de transferência!
You can obtain statistics about the listener for a particular Red Hat OpenStack Platform (RHOSP) loadbalancer. For more information, see Section 13.5, “Showing listener statistics”.
One of the statistics tracked by the RHOSP loadbalancer, request_errors
, is only counting errors that occurred in the request from the end user connecting to the load balancer. The request_errors
variable is not measuring errors reported by the member server.
For example, if a tenant connects through the RHOSP Load-balancing service (octavia) to a web server that returns an HTTP status code of 400 (Bad Request)
, this error is not collected by the Load-balancing service. Loadbalancers do not inspect the content of data traffic. In this example, the loadbalancer interprets this flow as successful because it transported information between the user and the web server correctly.
The following conditions can cause the request_errors
variable to increment:
- early termination from the client, before the request has been sent.
- read error from the client.
- client timeout.
- client closed the connection.
- various bad requests from the client.