Thursday, 25 August 2016

Invalid input for operation: network_type value 'local' not supported

I was trying to create a type 'local' network in the controller node, but the command gave below error.

root@controller:~# neutron net-create mgmt-net --provider:network-type local
Invalid input for operation: network_type value 'local' not supported.

FIX

In the ml2 driver the 'local' type was not enabled. So edited the configuration file

/etc/neutron/plugins/ml2/ml2_conf.ini

modified the the line to add 'local' option.

type_drivers = flat,vlan,vxlan,local

After restarting the neutron service, when I tried again the network got created.

 service neutron-server restart
neutron-server stop/waiting
neutron-server start/running, process 29892

root@controller:~# neutron net-create mgmt-net --provider:network-type local
Created a new network:
+---------------------------+--------------------------------------+
| Field                     | Value                                |
+---------------------------+--------------------------------------+
| admin_state_up            | True                                 |
| availability_zone_hints   |                                      |
| availability_zones        |                                      |
| created_at                | 2016-08-25T08:00:10                  |
| description               |                                      |
| id                        | 867fc72b-164b-447b-b986-4c9f1db20c14 |
| ipv4_address_scope        |                                      |
| ipv6_address_scope        |                                      |
| mtu                       | 1500                                 |
| name                      | mgmt-net                             |
| port_security_enabled     | True                                 |
| provider:network_type     | local                                |
| provider:physical_network |                                      |
| provider:segmentation_id  |                                      |
| router:external           | False                                |
| shared                    | False                                |
| status                    | ACTIVE                               |
| subnets                   |                                      |
| tags                      |                                      |
| tenant_id                 | 670a31668af7494b91bbfb23fe406a2e     |
| updated_at                | 2016-08-25T08:00:11                  |
+---------------------------+--------------------------------------+

Tuesday, 23 August 2016

ssh-add Could not open a connection to your authentication agent

While adding a new key for cloud image, I was getting the below error.

root@controller:~# ssh-add key2.pem
Could not open a connection to your authentication agent.


FIX

We need to start the ssh agent / the agent must be running, prior to adding the newkey. So I followed below steps.

root@controller:~# eval `ssh-agent -s`
Agent pid 21609

root@controller:~# ssh-add key2.pem
Identity added: key2.pem (key2.pem)

Tuesday, 16 August 2016

chronyd is running and offline

Hi Guys,

While installing Openstack Liberty or Mitaka at the NTP implementation face you might have come across the below error.

"root@controller:/etc/chrony# service chrony restart
Restarting time daemon: Starting /usr/sbin/chronyd...
chronyd is running and offline."

"root@compute1:/etc/chrony# chronyc sources
506 Cannot talk to daemon"

 Why this error ?

Chrony daemon try to bind with the localhost by default, but when it looks for it doesn't resolve to the desired IP address. This error usually comes when you comment out or remove the localhost entries from your /etc/hosts file.

Note: The openstack installation guide suggest you to put entries for controller,compute,block,object etc in your hosts file and take out the localhost entries, But this may not work in all the OS distributions.

Fix:-

Just put back the local host entries to /etc/hosts file.

root@controller:~# cat /etc/hosts
127.0.0.1       localhost
# controller
10.1.1.111       controller

# compute1
10.1.1.112       compute1

# block1
10.1.1.113      block1

# object1
10.1.1.114       object1

# object2
10.1.1.115      object2

Tuesday, 2 August 2016

Unable to complete operation on subnet One or more ports have an IP allocation from this subnet

root@controller:~# neutron net-list
+--------------------------------------+-------------+-----------------------------------------------------+
| id                                   | name        | subnets                                             |
+--------------------------------------+-------------+-----------------------------------------------------+
| 0d5e24d8-4123-4089-9c03-5072028dc782 | oneseries   |                                                     |
| a7386ebf-bb8f-4831-adb0-d87b49bd581c | provider    | 02d54463-d558-4b78-a081-07a278e52327 192.168.1.0/24 |
| 8a816987-d40d-4823-97a6-bb25bd158d7b | selfservice | eedfde36-bd92-43eb-b570-78eac106b615 10.1.12.192/26 |
|                                      |             | 19f3dab4-2ea8-4385-8c3b-69f47577f935 172.16.1.0/24  |
+--------------------------------------+-------------+-----------------------------------------------------+

When I tried to remove the subnet , I got the below error.

root@controller:~# neutron net-delete selfservice
Unable to complete operation on network 8a816987-d40d-4823-97a6-bb25bd158d7b. There are one or more ports still in use on the network.
Neutron server returns request_ids: ['req-6ba9f812-be4e-4339-91f3-c4ffb25c8ea3']


root@controller:~# neutron subnet-delete selfservice
Unable to complete operation on subnet 19f3dab4-2ea8-4385-8c3b-69f47577f935: One or more ports have an IP allocation from this subnet.
Neutron server returns request_ids: ['req-88bd0673-3041-493d-842b-7ab1b2076108']

root@controller:~# neutron subnet-delete oneseries
Unable to complete operation on subnet eedfde36-bd92-43eb-b570-78eac106b615: One or more ports have an IP allocation from this subnet.
Neutron server returns request_ids: ['req-3be34152-07d8-49f2-81b0-b262978fc198']





 root@controller:~# neutron router-list
+--------------------------------------+--------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+-------+
| id                                   | name   | external_gateway_info                                                                                                                                                                     | distributed | ha    |
+--------------------------------------+--------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+-------+
| 7682cdda-f152-4eea-b35b-3a81dd91fd04 | router | {"network_id": "a7386ebf-bb8f-4831-adb0-d87b49bd581c", "enable_snat": true, "external_fixed_ips": [{"subnet_id": "02d54463-d558-4b78-a081-07a278e52327", "ip_address": "192.168.1.102"}]} | False       | False |
+--------------------------------------+--------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+-------+
root@controller:~# neutron router-gateway-clear router
Removed gateway from router router

root@controller:~# neutron router-interface-delete router oneseries
Removed interface from router router.

root@controller:~# neutron subnet-delete oneseries
Deleted subnet: oneseries

root@controller:~# neutron subnet-list
+--------------------------------------+-------------+----------------+----------------------------------------------------+
| id                                   | name        | cidr           | allocation_pools                                   |
+--------------------------------------+-------------+----------------+----------------------------------------------------+
| 02d54463-d558-4b78-a081-07a278e52327 | provider    | 192.168.1.0/24 | {"start": "192.168.1.101", "end": "192.168.1.200"} |
| 19f3dab4-2ea8-4385-8c3b-69f47577f935 | selfservice | 172.16.1.0/24  | {"start": "172.16.1.2", "end": "172.16.1.254"}     |
+--------------------------------------+-------------+----------------+----------------------------------------------------+

you may notice that the subnet "oneseries" was removed.


Openstack Mitaka Networking

Source the demo / admin profile.

List the available networks

root@controller:~# neutron net-list
+--------------------------------------+-------------+-----------------------------------------------------+
| id                                   | name        | subnets                                             |
+--------------------------------------+-------------+-----------------------------------------------------+
| 0d5e24d8-4123-4089-9c03-5072028dc782 | oneseries   |                                                     |
| a7386ebf-bb8f-4831-adb0-d87b49bd581c | provider    | 02d54463-d558-4b78-a081-07a278e52327 192.168.1.0/24 |
| 8a816987-d40d-4823-97a6-bb25bd158d7b | selfservice | eedfde36-bd92-43eb-b570-78eac106b615 10.1.12.192/26 |
|                                      |             | 19f3dab4-2ea8-4385-8c3b-69f47577f935 172.16.1.0/24  |
+--------------------------------------+-------------+-----------------------------------------------------+