Troubleshoot the OpenStack cloud provider

Troubleshoot the OpenStack cloud providerΒΆ

The table in this section lists solutions for issues related to the OpenStack cloud provider operations after deployment.

Issue

Solution

Cinder volume cannot be mounted

  1. Verify logs for the pod that failed and the kubelet logs on the Kubernetes Nodes. Identify and fix permission issues, if any.

Cinder volume is not created

  1. Verify that your user has privileges to create Cinder volumes:

    1. Source the openrc file of your environment. For details, see: Create OpenStack client environment scripts.

    2. Run the openstack volume create test --size 1.

  2. Verify logs for openstack-cloud-controller-manager on each Kubernetes Master node.

The kubelet agent does not register with apiserver

  1. Verify that the instance name does not contain invalid characters. An instance name must be a RFC-953 compliant, which states that a DNS name must consist of characters drawn from the alphabet (A-Z), digits (0-9), minus sign (-), and period (.). It is best to destroy and recreate the instance because the configdrive metadata located in /dev/vdb cannot be updated automatically even after renaming an instance.

  2. Verify that your cloud credentials are valid. The kubelet agent will not start if the credentials are wrong.

Heat stack cannot be deleted because of LoadBalancer services

  1. Delete all service resources before deleting the Heat stack using the kubectl delete svc --all command.

  2. If the stack was already deleted and is now in the DELETE_FAILED state, purge all LBaaS objects visible to your OpenStack user with the following commands:

    for pool in `neutron lbaas-pool-list -c id -f value`; do
      while read member; do
        neutron lbaas-member-delete $member $pool
      done < <(neutron lbaas-member-list $pool -c id -f value)
      neutron lbaas-pool-delete $pool
    done
    for listener in `neutron lbaas-listener-list -c id -f value`; do
      neutron lbaas-listener-delete $listener
    done
    for lb in `neutron lbaas-loadbalancer-list -c id -f value`; do
     neutron lbaas-loadbalancer-delete $lb
    done
    
  3. Delete the stack safely with the openstack stack delete STACKNAME command.

LBaaS is stuck in Pending state

  1. Verify the subnet ID used for deployment. The subnet should match the network attached to the first interface on the instances (such as net01). Use the openstack subnet list command to get a list of subnets.

  2. Verify that the public net ID is correct. Use the neutron net-external-list command to find the public net.

  3. Verify that Octavia is deployed and configured. The neutron lbaas-loadbalancer-list command must return either 0 or some entries, but not an error. For the Octavia deployment details, see Configure load balancing with OpenStack Octavia.