• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

UnixArena

  • Home
  • Discover DevOps Tools
  • kubernetes
  • DevOps
    • Terraform
    • Jenkins
    • Docker
    • Openshift
      • OKD
    • Ansible engine
    • Ansible Tower
      • AWX
    • Puppet
  • Cloud
    • Azure
    • AWS
    • Openstack
    • Docker
  • VMware
    • vCloud Director
    • VMware-Guests
    • Vcenter Appliance 5.5
    • vC OPS
    • VMware SDDC
    • VMware vSphere 5.x
      • vSphere Network
      • vSphere DS
      • vShield Suite
    • VMware vSphere 6.0
    • VSAN
    • VMware Free Tools
  • DevOps Instructor-led Training
  • Contact

Openstack – Configuring the Compute Node – Part 5

September 28, 2015 By Cloud_Devops 2 Comments

Configure a compute node:

 

1.Login to Compute node and install compute packages on it.

root@OSCMP-UA:~# apt-get install nova-compute-kvm python-guestfs
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  alembic binutils btrfs-tools cryptsetup cryptsetup-bin fontconfig-config
  fonts-dejavu-core genisoimage ghostscript gsfonts icoutils ieee-data
  jfsutils kpartx ldmtool libauthen-sasl-perl libcryptsetup4 libcups2

Click here to see the complete, Nova installation log

 

2. Make the kernel to readable for normal users like qemu & libguestfs.  But default , it will be set to 0600 due to security reason.

root@OSCMP-UA:~# dpkg-statoverride  --update --add root root 0644 /boot/vmlinuz-$(uname -r)

 

To make the kernel readable for future updates, create a file like below & make it executable.

root@OSCMP-UA:~# cat /etc/kernel/postinst.d/statoverride
#!/bin/sh
version="$1"
# passing the kernel version is required
[ -z "${version}" ] && exit 0
dpkg-statoverride --update --add root root 0644 /boot/vmlinuz-${version}
root@OSCMP-UA:~#
root@OSCMP-UA:~# chmod +x /etc/kernel/postinst.d/statoverride

 

3.Edit the /etc/nova/nova/conf file like below.
Under [DEFAULT] ,

#Glance Node
glance_host = OSCTRL-UA


#VNC
my_ip = 192.168.203.131
vnc_enabled = True
vncserver_listen = 0.0.0.0
vncserver_proxyclient_address = 192.168.203.131
novncproxy_base_url = http://OSCTRL-UA:6080/vnc_auto.html

#Provide the MQ details
rpc_backend = rabbit
rabbit_host = OSCTRL-UA
rabbit_password = rabbit123

#Nova service to use keystone as auth service
auth_strategy = keystone
[keystone_authtoken]
auth_uri = http://OSCTRL-UA:5000
auth_host = OSCTRL-UA
auth_port = 35357
auth_protocol = http
admin_tenant_name = service
admin_user = nova
admin_password = nova123

#Proivde the DB location
[database]
connection = mysql://nova:novadb123@OSCTRL-UA/nova

 

4. Run the command below to check whether your compute node supports KVM or not. If the value returned as greater than zero , it supports KVM and doesn’t require any configuration changes.

root@OSCMP-UA:~# egrep -c '(vmx|svm)' /proc/cpuinfo
0
root@OSCMP-UA:~#

 

As per output above , our compute node doesn’t support KVM. Therefore , we will use qemu.

Set “virt_type=qemu” in libvirt.conf like below.

root@OSCMP-UA:~# cat /etc/nova/nova-compute.conf
[DEFAULT]
compute_driver=libvirt.LibvirtDriver
[libvirt]
virt_type=kvm
root@OSCMP-UA:~# vi /etc/nova/nova-compute.conf
root@OSCMP-UA:~# cat /etc/nova/nova-compute.conf
[DEFAULT]
compute_driver=libvirt.LibvirtDriver
[libvirt]
virt_type=qemu
root@OSCMP-UA:~#

 

5.Remove the default test database in the compute node.

root@OSCMP-UA:~# rm /var/lib/nova/nova.sqlite
root@OSCMP-UA:~#

 

6. Restart the compute service.

root@OSCMP-UA:~# service nova-compute restart
nova-compute stop/waiting
nova-compute start/running, process 14735
root@OSCMP-UA:~# tail -f /var/log/nova/nova-compute.log
2015-09-28 05:15:28.996 14696 TRACE oslo.messaging._drivers.impl_rabbit
2015-09-28 05:15:29.006 14696 INFO oslo.messaging._drivers.impl_rabbit [req-37a1f7ee-29fb-4f12-9954-0626f71105d3 ] Delaying reconnect for 1.0 seconds...
2015-09-28 05:15:30.011 14696 INFO oslo.messaging._drivers.impl_rabbit [req-37a1f7ee-29fb-4f12-9954-0626f71105d3 ] Connecting to AMQP server on OSCTRL-UA:5672
2015-09-28 05:15:30.037 14696 INFO oslo.messaging._drivers.impl_rabbit [req-37a1f7ee-29fb-4f12-9954-0626f71105d3 ] Connected to AMQP server on OSCTRL-UA:5672
2015-09-28 05:15:54.794 14735 INFO nova.virt.driver [-] Loading compute driver 'libvirt.LibvirtDriver'
2015-09-28 05:15:54.799 14735 INFO nova.openstack.common.periodic_task [-] Skipping periodic task _periodic_update_dns because its interval is negative
2015-09-28 05:15:54.823 14735 INFO oslo.messaging._drivers.impl_rabbit [req-521a020c-9a70-4382-8f31-9d2b54f2830f ] Connecting to AMQP server on OSCTRL-UA:5672
2015-09-28 05:15:54.834 14735 INFO oslo.messaging._drivers.impl_rabbit [req-521a020c-9a70-4382-8f31-9d2b54f2830f ] Connected to AMQP server on OSCTRL-UA:5672
2015-09-28 05:15:54.838 14735 INFO oslo.messaging._drivers.impl_rabbit [req-521a020c-9a70-4382-8f31-9d2b54f2830f ] Connecting to AMQP server on OSCTRL-UA:5672
2015-09-28 05:15:54.846 14735 INFO oslo.messaging._drivers.impl_rabbit [req-521a020c-9a70-4382-8f31-9d2b54f2830f ] Connected to AMQP server on OSCTRL-UA:5672

 

 

Verify the compute configuration:

 

1. Login to controller node and check the nova services.

root@OSCTRL-UA:~# nova service-list
+----+------------------+-----------+----------+---------+-------+----------------------------+-----------------+
| Id | Binary           | Host      | Zone     | Status  | State | Updated_at                 | Disabled Reason |
+----+------------------+-----------+----------+---------+-------+----------------------------+-----------------+
| 1  | nova-cert        | OSCTRL-UA | internal | enabled | up    | 2015-09-28T01:33:15.000000 | -               |
| 2  | nova-consoleauth | OSCTRL-UA | internal | enabled | up    | 2015-09-28T01:33:16.000000 | -               |
| 3  | nova-scheduler   | OSCTRL-UA | internal | enabled | up    | 2015-09-28T01:33:16.000000 | -               |
| 4  | nova-conductor   | OSCTRL-UA | internal | enabled | up    | 2015-09-28T01:33:16.000000 | -               |
| 5  | nova-compute     | OSCMP-UA  | nova     | enabled | up    | 2015-09-28T01:33:11.000000 | -               |
+----+------------------+-----------+----------+---------+-------+----------------------------+-----------------+
root@OSCTRL-UA:~#

 

We have successfully configured the compute service.
If you are getting output like below (State=down), there must be some misconfiguration in nova.conf on controller node or compute node. You need to re-validate the [default] tab entries.

root@OSCTRL-UA:~# nova service-list
+----+------------------+-----------+----------+---------+-------+------------+-----------------+
| Id | Binary           | Host      | Zone     | Status  | State | Updated_at | Disabled Reason |
+----+------------------+-----------+----------+---------+-------+------------+-----------------+
| 1  | nova-cert        | OSCTRL-UA | internal | enabled | down  | -          | -               |
| 2  | nova-consoleauth | OSCTRL-UA | internal | enabled | down  | -          | -               |
| 3  | nova-scheduler   | OSCTRL-UA | internal | enabled | down  | -          | -               |
| 4  | nova-conductor   | OSCTRL-UA | internal | enabled | down  | -          | -               |
+----+------------------+-----------+----------+---------+-------+------------+-----------------+
root@OSCTRL-UA:~#

In compute node, you will get message like below:

# tail -f /var/log/nova/nova-compute.log

2015-09-28 05:15:28.993 14696 WARNING nova.conductor.api [req-37a1f7ee-29fb-4f12-9954-0626f71105d3 None] Timed out waiting for nova-conductor. Is it running? Or did this service start before nova-conductor? Reattempting establishment of nova-conductor connection…
2015-09-28 05:15:28.996 14696 ERROR oslo.messaging._drivers.impl_rabbit [req-37a1f7ee-29fb-4f12-9954-0626f71105d3 ] Failed to publish message to topic ‘conductor’: [Errno 104] Connection reset by peer

 

Nova configuration should looks like below. ( [DEFAULT] , [database] , [keystone_authtoken] elements)

root@OSCMP-UA:~# egrep -i "default|database|keystone_" -A35 /etc/nova/nova.conf
[DEFAULT]
dhcpbridge_flagfile=/etc/nova/nova.conf
dhcpbridge=/usr/bin/nova-dhcpbridge
logdir=/var/log/nova
state_path=/var/lib/nova
lock_path=/var/lock/nova
force_dhcp_release=True
libvirt_use_virtio_for_bridges=True
verbose=True
ec2_private_dns_show_ip=True
api_paste_config=/etc/nova/api-paste.ini
enabled_apis=ec2,osapi_compute,metadata
#Glance Node
glance_host = OSCTRL-UA


#VNC
my_ip = 192.168.203.131
vnc_enabled = True
vncserver_listen = 0.0.0.0
vncserver_proxyclient_address = 192.168.203.131
novncproxy_base_url = http://OSCTRL-UA:6080/vnc_auto.html


#Nova service to use keystone as auth service
auth_strategy = keystone

#Provide the MQ details
rpc_backend = rabbit
rabbit_host = OSCTRL-UA
rabbit_password = rabbit123

#Proivde the DB location
[database]
connection = mysql://nova:novadb123@OSCTRL-UA/nova

[keystone_authtoken]
auth_uri = http://OSCTRL-UA:5000
auth_host = OSCTRL-UA
auth_port = 35357
auth_protocol = http
admin_tenant_name = service
admin_user = nova
admin_password = nova123
root@OSCMP-UA:~#

Hope this article is informative to you.

Share it !! Be Sociable !!!

Pages: Page 1 Page 2

Filed Under: Openstack, Openstack on Ubuntu, Openstack Tutorial

Reader Interactions

Comments

  1. obfuscatu says

    July 3, 2016 at 8:10 pm

    I removed /var/lib/nova/nova.sqlite but is recreated

    Reply
  2. obfuscatu says

    July 3, 2016 at 8:06 pm

    can’t start nova-scheduler and nova-cert: attempt to write readonly database !

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Follow UnixArena

  • Facebook
  • LinkedIn
  • Twitter

Copyright © 2026 · UnixArena ·