Troubleshooting

How to check if Fleio connects successfully to the OpenStack API

After you fill in the details on the OpenStack settings Credentials tab press Test connection to see if credentials are working. Then by pressing Save & sync or Sync button all the OpenStack objects (projects, instances, volumes, networks etc.) from the Fleio database are reset and the list of objects with states is retrieved from OpenStack.

You can then go to Cloud > Instances and check list of instances (or volumes, or some other resource that you know has elements in OpenStack) and see if there are any objects present.

How to check if OpenStack notifications are working

Fleio needs access to the OpenStack API to launch commands like create compute instance, volume etc. Fleio also requires notification messages from the OpenStack internal RabbitMQ queue to update the cloud objects state.

You can confirm that Fleio receives notifications by shutting down an existing instance and see the instance status being updated in Fleio. Follow these steps:

  1. Go to Fleio /staff panel
  2. Sync OpenStack objects as described in section How to check if Fleio connects successfully to the OpenStack API
  3. Assuming you have a running instance, shut it down
  4. Wait 20-30 seconds or so for the instance to reach the STOPPED state. If your instance still shows as RUNNING state in Fleio, while you can see the instance being SHUTOFF in OpenStack ( openstack server list --all-projects, that means that notifications are not working.

These steps apply for other operations as well: create instance but it never shows up in Fleio, while you can see it created in OpenStack, or instance start for a shutoff instance.

To repeat these steps, make sure you start from a synced database by pressing Sync on the OpenStack Credentials tab.

Troubleshoot email messages are not sent

You can check if your email settings are configured correctly in settings.py by trying to send an email message from the Django shell command line utility.

SSH to the server where Fleio is installed and run these commands in bash:

# following line is only needed on CentOS 7
if [ -e /opt/rh/rh-python35/enable ] ; then . /opt/rh/rh-python35/enable; fi
# activate the Python virtual environment
. /var/webapps/fleio/env/bin/activate
# move to the Django backend project directory
cd /var/webapps/fleio/project/fleio
# start the Django shell
django shell
# you should see the shell prompt now: >>>
# let's try to send an email
# !!! replace with from and to email addresses accepted by your mail server
from django.core.mail import send_mail
send_mail('Subject', 'message', 'from@example.com', ['to@example.com'], fail_silently=False)
# exit Django shell by typing CTRL_D or exit()
exit()

If mail sending fails, you’ll see the error and a stack trace, try to fix settings in settings.py. See How to apply Fleio backend settings.py changes.

All email settings are explained in the Django documentation: https://docs.djangoproject.com/en/dev/topics/email/

If there’s no error and “1” is displayed instead, the email was successfully sent and you should analyze the mail server log if you do not receive the test message.