Ask Your Question

fhussain's profile - activity

2019-01-17 09:50:28 -0500 marked best answer Neutron API: function for listing router interfaces?

Hi,

I am writing a small plugin for OpenStack for which I need to have the information of the interfaces of each router in a given network topology. I first thought I can fetch it from the router object returned by this function:

routers = api.neutron.router_list(self.request,params={})

<Router: {u'status': u'ACTIVE', u'external_gateway_info': {u'network_id': u'0473ea49-473e-4678-a48a-a123d64f3e12', u'enable_snat': True}, u'name': u'router1', u'admin_state_up': True, u'tenant_id': u'1e7fc802925c4f1295018cd85448455b', 'admin_state': 'UP', u'routes': [], u'id': u'28239316-61e8-4c26-a502-866f7fdb1492'}>

But the router object returned has no field for interfaces.

I have also looked into the /horizon/openstack_dashboard/api/neutron.py file. It has functions defined for adding or deleting router interfaces, but I cannot see a function to list router interfaces.

Please suggest where can I look for the function to list router interfaces which I can use in my python code?

Thanks.

2016-08-21 15:24:04 -0500 received badge  Notable Question (source)
2016-08-21 15:24:04 -0500 received badge  Famous Question (source)
2016-06-24 21:09:41 -0500 received badge  Notable Question (source)
2016-06-24 21:09:41 -0500 received badge  Popular Question (source)
2016-06-24 21:09:41 -0500 received badge  Famous Question (source)
2016-06-15 05:16:33 -0500 received badge  Famous Question (source)
2016-06-15 05:16:33 -0500 received badge  Notable Question (source)
2016-04-02 14:47:05 -0500 received badge  Famous Question (source)
2016-03-14 04:56:19 -0500 received badge  Notable Question (source)
2016-02-25 10:39:31 -0500 received badge  Famous Question (source)
2016-01-27 09:50:35 -0500 received badge  Famous Question (source)
2016-01-24 09:11:27 -0500 received badge  Famous Question (source)
2015-12-06 11:33:48 -0500 received badge  Popular Question (source)
2015-12-02 00:26:30 -0500 received badge  Notable Question (source)
2015-12-02 00:26:30 -0500 received badge  Famous Question (source)
2015-12-02 00:26:30 -0500 received badge  Popular Question (source)
2015-11-16 08:35:03 -0500 received badge  Notable Question (source)
2015-11-12 13:42:05 -0500 received badge  Famous Question (source)
2015-11-12 13:42:05 -0500 received badge  Notable Question (source)
2015-11-09 20:21:50 -0500 received badge  Famous Question (source)
2015-11-09 02:43:19 -0500 received badge  Popular Question (source)
2015-11-06 02:10:27 -0500 commented question Error accessing Glance images in Kilo: AttributeError at /project/images/instance-id

I have checked that all the services are running perfectly with the exception of cinder-backup(c-bak). It gives this error "Volume group "stack-volumes-lvmdriver-1" not found". Has this anything to do with the above problem in glance?

2015-11-06 02:06:13 -0500 commented question Error accessing Glance images in Kilo: AttributeError at /project/images/instance-id

@SGPJ, @dbaxps: could you please help me?..Glance service is working fine i.e. there are no errors in its logs.

2015-11-04 05:20:52 -0500 asked a question Error accessing Glance images in Kilo: AttributeError at /project/images/instance-id

I have installed OpenStack kilo on a single machine using devstack. When I click at an image (e.g. cirros-0.3.4-x86_64-uec) in the Dashboard, I see this error, due to which I am unable to launch it.

AttributeError at /project/images/d55c2a4c-3c09-4739-b4fb-6965a9112171/

id

Request Method:     GET
Request URL:    http://10.3.212.132/project/images/d55c2a4c-3c09-4739-b4fb-6965a9112171/
Django Version:     1.7.10
Exception Type:     AttributeError
Exception Value:    id

Exception Location:     /usr/local/lib/python2.7/dist-packages/glanceclient/openstack/common/apiclient/base.py in __getattr__, line 494
Python Executable:  /usr/bin/python

Please help me resolve the issue.

2015-10-21 02:21:29 -0500 commented question nova-docker: Nova-compute does not start, ImportError: Could not import name fileutils

@dbaxps..can you please help me in this?

2015-10-21 02:20:24 -0500 commented question nova-docker: Nova-compute does not start, ImportError: Could not import name fileutils

@SGPJ..can you please help me in this?

2015-10-20 07:38:26 -0500 asked a question nova-docker: Nova-compute does not start, ImportError: Could not import name fileutils

I have followed this link for creating a Docker instance in OpenStack. However when I update /etc/nova/nova.conf file to change compute_driver to novadocker.virt.docker.DockerDriver, and restart the nova-compute(n-cpu) service, it fails to start. It shows this error:

TRACE nova.virt.driver   Loading compute driver 'novadocker.virt.docker.DockerDriver' , 
Traceback (most recent call last):
TRACE nova.virt.driver   File "/opt/stack/nova/nova/virt/driver.py", line 1389, in load_compute_driver
TRACE nova.virt.driver     virtapi)
TRACE nova.virt.driver   File "/usr/local/lib/python2.7/dist-packages/oslo_utils/importutils.py", line 52, in import_object_ns
TRACE nova.virt.driver     return import_class(import_str)(*args, **kwargs)
TRACE nova.virt.driver   File "/usr/local/lib/python2.7/dist-packages/oslo_utils/importutils.py", line 27, in import_class
TRACE nova.virt.driver     __import__(mod_str)
TRACE nova.virt.driver   File "/opt/stack/nova-docker/novadocker/virt/docker/__init__.py", line 20, in <module>
TRACE nova.virt.driver     from novadocker.virt.docker import driver
TRACE nova.virt.driver   File "/opt/stack/nova-docker/novadocker/virt/docker/driver.py", line 32, in <module>
TRACE nova.virt.driver     from oslo_utils import fileutils
TRACE nova.virt.driver    Unable to load the virtualization driver,  
TRACE nova.virt.driver   ImportError: cannot import name fileutils.

Please help me resolve the issue.

Thanks.

2015-10-20 01:35:50 -0500 commented question Cannot ping Docker Instance on Kilo

nova-compute shows this error when the service is restarted: Loading compute driver 'novadocker.virt.docker.DockerDriver' , Unable to load the virtualization driver, ImportError: cannot import name fileutils. Can you reproduce this error after updating nova.conf?

2015-10-20 01:34:06 -0500 commented question Cannot ping Docker Instance on Kilo

Yes, I updated nova.conf to launch nova-docker container. I updated the compute_driver to novadocker.virt.docker.DockerDriver in /etc/nova/nova.conf and restarted the nova-compute service, but nova-compute service does not start. (continued in next comment)

2015-10-19 07:13:41 -0500 commented question Cannot ping Docker Instance on Kilo

This is the result of cat nova.conf | grep compute_driver compute_driver = libvirt.LibvirtDriver

2015-10-19 05:40:45 -0500 asked a question Cannot ping Docker Instance on Kilo

I have followed this link for creating a Docker instance in OpenStack. The instance is launched successfully and an IP 10.0.0.5 has been assigned to it. However, I cannot ping the docker instance from my host machine in spite of adding appropriate rules into the security group for allowing ping(ICMP).

Question: Why can't I ping any docker instance from host machine?

Note: I can successfully ping VM instances but cannot ping any docker instance.

Here is my local.conf file:

[[local|localrc]]

SERVICE_TOKEN=azertytoken
ADMIN_PASSWORD=nomoresecrete
MYSQL_PASSWORD=stackdb
RABBIT_PASSWORD=stackqueue
SERVICE_PASSWORD=$ADMIN_PASSWORD

LOGFILE=$DEST/logs/stack.sh.log

LOGDAYS=2

ENABLED_SERVICES=rabbit,mysql,key
ENABLED_SERVICES+=,n-api,n-crt,n-obj,n-cpu,n-cond,n-sch,n-novnc,n-xvnc,n-cauth
ENABLED_SERVICES+=,neutron,q-svc,q-agt,q-l3,q-meta,q-lbaas,q-fwaas,q-dhcp
ENABLED_SERVICES+=,cinder,c-api,c-vol,c-sch,c-bak
ENABLED_SERVICES+=,heat,h-api,h-api-cfn,h-api-cw,h-eng
ENABLED_SERVICES+=,horizon
ENABLED_SERVICE-=n-net

SWIFT_HASH=66a3d6b56c1f479c8b4e70ab5c2000f5
SWIFT_REPLICAS=1
SWIFT_DATA_DIR=$DEST/data

enable_service tempest

VIRT_DRIVER=novadocker.virt.docker.DockerDriver

##### Introduce glance to docker images
$GLANCE_API_CONF

[DEFAULT]
container_formats=ami,ari,aki,bare,ovf,ova,docker

##### Configure nova to use the nova-docker driver
$NOVA_CONF
[DEFAULT]
compute_driver=novadocker.virt.docker.DockerDriver

Please help me resolve the issue.

2015-10-13 01:19:56 -0500 received badge  Popular Question (source)
2015-10-12 01:39:05 -0500 commented answer Error: No valid host was found. There are not enough hosts available

Could you please explain how did you do it exactly? I am facing the exact same problem. But don't know how to resolve it. All the nova services are running successfully and no error is reported in their logs.

2015-10-09 09:39:38 -0500 received badge  Notable Question (source)
2015-10-09 06:55:48 -0500 asked a question OpenStack Juno: Unable to enable dhcp for network-id

I have installed OpenStack Juno on Ubuntu 14.04 LTS via devstack. When I run rejoin-stack.sh script to see the screen of neutron-dchp(q-dhcp), I see this error there:

ERROR neutron.agent.linux.utils [-]
Command: ['sudo', '/usr/local/bin/neutron-rootwrap', '/etc/neutron/rootwrap.conf', 'kill', '-9', '74012']
Exit code: 99
Stdout: ''
Stderr: '/usr/local/bin/neutron-rootwrap: Unauthorized command: kill -9 74012 (no filter matched)\n'
2015-10-09 16:50:47.730 ERROR neutron.agent.dhcp_agent [-] Unable to enable dhcp for 81d98c1f-748c-4432-849e-672255754f36.

The consequence of this error is that I cannot ping any instance i.e. I have no connectivity to the instances. Note that I have added appropriate rules for allowing ping(ICMP) in the security group. The network id in the "Unable to enable dhcp for "network-id" is that of the network to which the instances are connected.

Please help me resolve the issue.

2015-10-09 00:39:40 -0500 received badge  Popular Question (source)
2015-10-08 00:38:56 -0500 asked a question Can Openstack Kilo be installed on Ubuntu 12.10?

Can Openstack Kilo be installed on Ubuntu 12.10?

2015-10-07 05:37:38 -0500 received badge  Popular Question (source)
2015-10-07 01:08:57 -0500 asked a question Unauthorized command when using neutron-rootwrap for neutron-dhcp

I have installed OpenStack Juno via devstack. I see this error when starting neutron-dhcp:

ERROR neutron.agent.linux.utils [-]
Command: ['sudo', '/usr/local/bin/neutron-rootwrap', '/etc/neutron/rootwrap.conf', 'kill', '-9', '103445']
Exit code: 99
Stdout: ''
Stderr: '/usr/local/bin/neutron-rootwrap: Unauthorized command: kill -9 103445 (no filter matched)\n'
2015-10-07 11:04:22.746 ERROR neutron.agent.dhcp_agent [-] Unable to enable dhcp for 8edf253b-c6a5-4c77-b58d-109e7e52f1e4.

Please help me resolve the issue.

2015-10-06 06:53:06 -0500 asked a question Openstack Juno: Cannot ping instances with IP other than 10.0.0.2

I have installed Openstack Juno. I have created two Cirros instances with private IPs 10.0.0.2 and 10.0.0.4, respectively. Both the instances are connected to a network 10.0.0.0, which is in turn connected to router. The router is then connected to public network(172.24.4.0).

I have created a Security Group in which I have added appropriate rules for allowing ICMP (both ingress and egress). I can successfully ping the instance having IP 10.0.0.2 from the machine on which devstack is installed.

But, I cannot ping the instance having IP 10.0.0.4. I have made sure that both the instances have the same Security Group.

In short, I cannot ping any instance with IP other than 10.0.0.2. What could be the reason for that?

Please help me resolve the problem.

2015-10-06 03:57:43 -0500 received badge  Notable Question (source)
2015-10-06 03:57:43 -0500 received badge  Famous Question (source)