Custom Search

Sunday, April 26, 2015

How to OpenContrail neutron enable LBaaS:Load Balancing as a Service extension

1)
How to install OpenStack with Neutron and contrail-neutron-plugin using DevStack
http://fosshelp.blogspot.com/2015/04/how-to-install-openstack-with-neutron.html

2)
Enable LBaaS:Load Balancing as a Service extension

a)
Specify OpenContrail Loadbalancer service Plugin in /ect/neutron/neutron.conf

b)
Specify 'Opencontrail' LBaaS service provider in /ect/neutron/neutron.conf and comment out all other LBaaS providers and restart neutron server

#vim /ect/neutron/neutron.conf

[DEFAULT]
service_plugins = neutron_plugin_contrail.plugins.opencontrail.loadbalancer.plugin.LoadBalancerPlugin

[service_providers]
#'Opencontrail' LBaaS provider
service_provider = LOADBALANCER:Opencontrail:neutron_plugin_contrail.plugins.opencontrail.loadbalancer.driver.OpencontrailLoadbalancerDriver:default

3)
Check whether extension is loaded or not
#neutron ext-list
+-----------------------+-------------------------------+
| alias                 | name                          |
+-----------------------+-------------------------------+
| contrail              | Contrail Extension            |
| port-security         | Port Security                 |
| security-group        | security-group                |
| ipam                  | Network IP Address Management |
| external-net          | Neutron external network      |
| binding               | Port Binding                  |
| quotas                | Quota management support      |
| agent                 | agent                         |
| route-table           | route-table                   |
| policy                | Network Policy                |
| router                | Neutron L3 Router             |
| allowed-address-pairs | Allowed Address Pairs         |
| extra_dhcp_opt        | Neutron Extra DHCP opts       |
| lbaas                 | LoadBalancing service         |
+-----------------------+-------------------------------+






How to install OpenStack with Neutron and contrail-neutron-plugin using DevStack

1)
Install OpenStack with Neutron and  Configure neutron to use Contrail
http://fosshelp.blogspot.in/2015/04/openstack-devstack-opencontrail-localrc.html

2)
Enable OpenContrail Extensions like Ipam, Policy and  Route-table
http://fosshelp.blogspot.in/2015/04/openstack-devstack-opencontrail-enable.html



OpenStack OpenContrail neutron AttributeError: 'LoadBalancerPlugin' object has no attribute 'agent_notifiers'

===How to Fix:===

Specify 'Opencontrail' LBaaS provider in /ect/neutron/neutron.conf and comment out all other LBaaS providers and restart neutron server

#vim /ect/neutron/neutron.conf

[DEFAULT]
service_plugins = neutron_plugin_contrail.plugins.opencontrail.loadbalancer.plugin.LoadBalancerPlugin
[service_providers]
#service_provider=::[:default]
#service_provider=LOADBALANCER:name:lbaas_plugin_driver_path:default


#'Opencontrail' LBaaS provider
service_provider = LOADBALANCER:Opencontrail:neutron_plugin_contrail.plugins.opencontrail.loadbalancer.driver.OpencontrailLoadbalancerDriver:default
#'Haproxy' LBaaS provider
#service_provider=LOADBALANCER:Haproxy:neutron.services.loadbalancer.drivers.haproxy.plugin_driver.HaproxyOnHostPluginDriver:default

#'Radware' LBaaS provider
#service_provider = LOADBALANCER:Radware:neutron.services.loadbalancer.drivers.radware.driver.LoadBalancerDriver:default

#'netscaler' LBaaS provider
#service_provider=LOADBALANCER:NetScaler:neutron.services.loadbalancer.drivers.netscaler.netscaler_driver.NetScalerPluginDriver

#'Embrane' LBaaS provider
#service_provider=LOADBALANCER:Embrane:neutron.services.loadbalancer.drivers.embrane.driver.EmbraneLbaas:default


===Error:===

2014-12-16 23:50:44.209 DEBUG neutron.manager [-] Loading service plugins: ['neutron_plugin_contrail.plugins.opencontrail.loadbalancer.plugin.LoadBa
lancerPlugin'] from (pid=54650) _load_service_plugins /opt/stack/neutron/neutron/manager.py:168
2014-12-16 23:50:44.209 INFO neutron.manager [-] Loading Plugin: neutron_plugin_contrail.plugins.opencontrail.loadbalancer.plugin.LoadBalancerPlugin
2014-12-16 23:50:44.210 DEBUG stevedore.extension [-] found extension EntryPoint.parse('dummy = neutron.tests.unit.dummy_plugin:DummyServicePlugin')
 from (pid=54650) _load_plugins /usr/local/lib/python2.7/dist-packages/stevedore/extension.py:156
2014-12-16 23:50:44.210 DEBUG stevedore.extension [-] found extension EntryPoint.parse('firewall = neutron.services.firewall.fwaas_plugin:FirewallPl
ugin') from (pid=54650) _load_plugins /usr/local/lib/python2.7/dist-packages/stevedore/extension.py:156
2014-12-16 23:50:44.210 DEBUG stevedore.extension [-] found extension EntryPoint.parse('metering = neutron.services.metering.metering_plugin:Meterin
gPlugin') from (pid=54650) _load_plugins /usr/local/lib/python2.7/dist-packages/stevedore/extension.py:156
2014-12-16 23:50:44.210 DEBUG stevedore.extension [-] found extension EntryPoint.parse('router = neutron.services.l3_router.l3_router_plugin:L3Route
rPlugin') from (pid=54650) _load_plugins /usr/local/lib/python2.7/dist-packages/stevedore/extension.py:156
2014-12-16 23:50:44.210 DEBUG stevedore.extension [-] found extension EntryPoint.parse('vpnaas = neutron.services.vpn.plugin:VPNDriverPlugin') from
(pid=54650) _load_plugins /usr/local/lib/python2.7/dist-packages/stevedore/extension.py:156
2014-12-16 23:50:44.210 DEBUG stevedore.extension [-] found extension EntryPoint.parse('lbaas = neutron.services.loadbalancer.plugin:LoadBalancerPlu
gin') from (pid=54650) _load_plugins /usr/local/lib/python2.7/dist-packages/stevedore/extension.py:156
2014-12-16 23:50:44.265 INFO urllib3.connectionpool [-] Starting new HTTP connection (1): 10.140.218.12

2014-12-16 23:50:44.268 DEBUG urllib3.connectionpool [-] Setting read timeout to None from (pid=54650) _make_request /usr/lib/python2.7/dist-package
s/urllib3/connectionpool.py:390
2014-12-16 23:50:44.272 DEBUG urllib3.connectionpool [-] "GET / HTTP/1.1" 200 10104 from (pid=54650) _make_request /usr/lib/python2.7/dist-packages/
urllib3/connectionpool.py:430
2014-12-16 23:50:44.296 WARNING neutron.openstack.common.db.sqlalchemy.session [-] This application has not enabled MySQL traditional mode, which me
ans silent data corruption may occur. Please encourage the application developers to enable this mode.
2014-12-16 23:50:44.419 INFO neutron.openstack.common.rpc.common [-] Connected to AMQP server on 10.140.218.21:5672
2014-12-16 23:50:44.421 DEBUG neutron.openstack.common.lockutils [-] Semaphore / lock released "_create_instance" from (pid=54650) inner /opt/stack/
neutron/neutron/openstack/common/lockutils.py:252
2014-12-16 23:50:44.421 ERROR neutron.service [-] Unrecoverable error: please check log for details.
2014-12-16 23:50:44.421 TRACE neutron.service Traceback (most recent call last):
2014-12-16 23:50:44.421 TRACE neutron.service   File "/opt/stack/neutron/neutron/service.py", line 105, in serve_wsgi
2014-12-16 23:50:44.421 TRACE neutron.service     service.start()
2014-12-16 23:50:44.421 TRACE neutron.service   File "/opt/stack/neutron/neutron/service.py", line 74, in start
2014-12-16 23:50:44.421 TRACE neutron.service     self.wsgi_app = _run_wsgi(self.app_name)
2014-12-16 23:50:44.421 TRACE neutron.service   File "/opt/stack/neutron/neutron/service.py", line 173, in _run_wsgi
2014-12-16 23:50:44.421 TRACE neutron.service     app = config.load_paste_app(app_name)
2014-12-16 23:50:44.421 TRACE neutron.service   File "/opt/stack/neutron/neutron/common/config.py", line 170, in load_paste_app
2014-12-16 23:50:44.421 TRACE neutron.service     app = deploy.loadapp("config:%s" % config_path, name=app_name)
2014-12-16 23:50:44.421 TRACE neutron.service   File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 247, in loadapp
2014-12-16 23:50:44.421 TRACE neutron.service     return loadobj(APP, uri, name=name, **kw)
2014-12-16 23:50:44.421 TRACE neutron.service   File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 272, in loadobj
2014-12-16 23:50:44.421 TRACE neutron.service     return context.create()
2014-12-16 23:50:44.421 TRACE neutron.service   File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 710, in create
2014-12-16 23:50:44.421 TRACE neutron.service     return self.object_type.invoke(self)
2014-12-16 23:50:44.421 TRACE neutron.service   File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 144, in invoke
2014-12-16 23:50:44.421 TRACE neutron.service     **context.local_conf)
2014-12-16 23:50:44.421 TRACE neutron.service   File "/usr/lib/python2.7/dist-packages/paste/deploy/util.py", line 55, in fix_call
2014-12-16 23:50:44.421 TRACE neutron.service     val = callable(*args, **kw)
2014-12-16 23:50:44.421 TRACE neutron.service   File "/usr/lib/python2.7/dist-packages/paste/urlmap.py", line 28, in urlmap_factory
2014-12-16 23:50:44.421 TRACE neutron.service     app = loader.get_app(app_name, global_conf=global_conf)
2014-12-16 23:50:44.421 TRACE neutron.service   File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 350, in get_app
2014-12-16 23:50:44.421 TRACE neutron.service     name=name, global_conf=global_conf).create()
2014-12-16 23:50:44.421 TRACE neutron.service   File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 710, in create
2014-12-16 23:50:44.421 TRACE neutron.service     return self.object_type.invoke(self)
2014-12-16 23:50:44.421 TRACE neutron.service   File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 144, in invoke
2014-12-16 23:50:44.421 TRACE neutron.service     **context.local_conf)
2014-12-16 23:50:44.421 TRACE neutron.service   File "/usr/lib/python2.7/dist-packages/paste/deploy/util.py", line 55, in fix_call
2014-12-16 23:50:44.421 TRACE neutron.service     val = callable(*args, **kw)
2014-12-16 23:50:44.421 TRACE neutron.service   File "/opt/stack/neutron/neutron/auth.py", line 69, in pipeline_factory
2014-12-16 23:50:44.421 TRACE neutron.service     app = loader.get_app(pipeline[-1])
2014-12-16 23:50:44.421 TRACE neutron.service   File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 350, in get_app
2014-12-16 23:50:44.421 TRACE neutron.service     name=name, global_conf=global_conf).create()
2014-12-16 23:50:44.421 TRACE neutron.service   File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 710, in create
2014-12-16 23:50:44.421 TRACE neutron.service     return self.object_type.invoke(self)
2014-12-16 23:50:44.421 TRACE neutron.service   File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 146, in invoke
2014-12-16 23:50:44.421 TRACE neutron.service     return fix_call(context.object, context.global_conf, **context.local_conf)
2014-12-16 23:50:44.421 TRACE neutron.service   File "/usr/lib/python2.7/dist-packages/paste/deploy/util.py", line 55, in fix_call
2014-12-16 23:50:44.421 TRACE neutron.service     val = callable(*args, **kw)
2014-12-16 23:50:44.421 TRACE neutron.service   File "/opt/stack/neutron/neutron/api/v2/router.py", line 72, in factory
2014-12-16 23:50:44.421 TRACE neutron.service     return cls(**local_config)
2014-12-16 23:50:44.421 TRACE neutron.service   File "/opt/stack/neutron/neutron/api/v2/router.py", line 76, in __init__
2014-12-16 23:50:44.421 TRACE neutron.service     plugin = manager.NeutronManager.get_plugin()
2014-12-16 23:50:44.421 TRACE neutron.service   File "/opt/stack/neutron/neutron/manager.py", line 222, in get_plugin
2014-12-16 23:50:44.421 TRACE neutron.service     return weakref.proxy(cls.get_instance().plugin)
2014-12-16 23:50:44.421 TRACE neutron.service   File "/opt/stack/neutron/neutron/manager.py", line 216, in get_instance
2014-12-16 23:50:44.421 TRACE neutron.service     cls._create_instance()
2014-12-16 23:50:44.421 TRACE neutron.service   File "/opt/stack/neutron/neutron/openstack/common/lockutils.py", line 249, in inner
2014-12-16 23:50:44.421 TRACE neutron.service     return f(*args, **kwargs)
2014-12-16 23:50:44.421 TRACE neutron.service   File "/opt/stack/neutron/neutron/manager.py", line 202, in _create_instance

2014-12-16 23:50:44.421 TRACE neutron.service     cls._instance = cls()
2014-12-16 23:50:44.421 TRACE neutron.service   File "/opt/stack/neutron/neutron/manager.py", line 127, in __init__
2014-12-16 23:50:44.421 TRACE neutron.service     self._load_service_plugins()
2014-12-16 23:50:44.421 TRACE neutron.service   File "/opt/stack/neutron/neutron/manager.py", line 175, in _load_service_plugins
2014-12-16 23:50:44.421 TRACE neutron.service     provider)
2014-12-16 23:50:44.421 TRACE neutron.service   File "/opt/stack/neutron/neutron/manager.py", line 142, in _get_plugin_instance
2014-12-16 23:50:44.421 TRACE neutron.service     return plugin_class()
2014-12-16 23:50:44.421 TRACE neutron.service   File "/opt/stack/neutron/neutron_plugin_contrail/plugins/opencontrail/loadbalancer/plugin.py", line
19, in __init__
2014-12-16 23:50:44.421 TRACE neutron.service     self._load_drivers()
2014-12-16 23:50:44.421 TRACE neutron.service   File "/opt/stack/neutron/neutron_plugin_contrail/plugins/opencontrail/loadbalancer/plugin.py", line
25, in _load_drivers
2014-12-16 23:50:44.421 TRACE neutron.service     constants.LOADBALANCER, self)
2014-12-16 23:50:44.421 TRACE neutron.service   File "/opt/stack/neutron/neutron/services/service_base.py", line 81, in load_drivers
2014-12-16 23:50:44.421 TRACE neutron.service     provider['driver'], plugin
2014-12-16 23:50:44.421 TRACE neutron.service   File "/opt/stack/neutron/neutron/openstack/common/importutils.py", line 38, in import_object
2014-12-16 23:50:44.421 TRACE neutron.service     return import_class(import_str)(*args, **kwargs)
2014-12-16 23:50:44.421 TRACE neutron.service   File "/opt/stack/neutron/neutron/services/loadbalancer/drivers/common/agent_driver_base.py", line 33
6, in __init__
2014-12-16 23:50:44.421 TRACE neutron.service     self.plugin.agent_notifiers.update(
2014-12-16 23:50:44.421 TRACE neutron.service AttributeError: 'LoadBalancerPlugin' object has no attribute 'agent_notifiers'
2014-12-16 23:50:44.421 TRACE neutron.service
2014-12-16 23:50:44.424 CRITICAL neutron [-] 'LoadBalancerPlugin' object has no attribute 'agent_notifiers'
2014-12-16 23:50:44.424 TRACE neutron Traceback (most recent call last):
2014-12-16 23:50:44.424 TRACE neutron   File "/usr/local/bin/neutron-server", line 10, in
2014-12-16 23:50:44.424 TRACE neutron     sys.exit(main())
2014-12-16 23:50:44.424 TRACE neutron   File "/opt/stack/neutron/neutron/server/__init__.py", line 48, in main
2014-12-16 23:50:44.424 TRACE neutron     neutron_api = service.serve_wsgi(service.NeutronApiService)
2014-12-16 23:50:44.424 TRACE neutron   File "/opt/stack/neutron/neutron/service.py", line 112, in serve_wsgi
2014-12-16 23:50:44.424 TRACE neutron     LOG.exception(_('Unrecoverable error: please check log '
2014-12-16 23:50:44.424 TRACE neutron   File "/opt/stack/neutron/neutron/openstack/common/excutils.py", line 82, in __exit__
2014-12-16 23:50:44.424 TRACE neutron     six.reraise(self.type_, self.value, self.tb)
2014-12-16 23:50:44.424 TRACE neutron   File "/opt/stack/neutron/neutron/service.py", line 105, in serve_wsgi
2014-12-16 23:50:44.424 TRACE neutron     service.start()
2014-12-16 23:50:44.424 TRACE neutron   File "/opt/stack/neutron/neutron/service.py", line 74, in start

2014-12-16 23:50:44.424 TRACE neutron     self.wsgi_app = _run_wsgi(self.app_name)
2014-12-16 23:50:44.424 TRACE neutron   File "/opt/stack/neutron/neutron/service.py", line 173, in _run_wsgi
2014-12-16 23:50:44.424 TRACE neutron     app = config.load_paste_app(app_name)
2014-12-16 23:50:44.424 TRACE neutron   File "/opt/stack/neutron/neutron/common/config.py", line 170, in load_paste_app
2014-12-16 23:50:44.424 TRACE neutron     app = deploy.loadapp("config:%s" % config_path, name=app_name)
2014-12-16 23:50:44.424 TRACE neutron   File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 247, in loadapp
2014-12-16 23:50:44.424 TRACE neutron     return loadobj(APP, uri, name=name, **kw)
2014-12-16 23:50:44.424 TRACE neutron   File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 272, in loadobj
2014-12-16 23:50:44.424 TRACE neutron     return context.create()
2014-12-16 23:50:44.424 TRACE neutron   File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 710, in create
2014-12-16 23:50:44.424 TRACE neutron     return self.object_type.invoke(self)
2014-12-16 23:50:44.424 TRACE neutron   File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 144, in invoke
2014-12-16 23:50:44.424 TRACE neutron     **context.local_conf)
2014-12-16 23:50:44.424 TRACE neutron   File "/usr/lib/python2.7/dist-packages/paste/deploy/util.py", line 55, in fix_call
2014-12-16 23:50:44.424 TRACE neutron     val = callable(*args, **kw)
2014-12-16 23:50:44.424 TRACE neutron   File "/usr/lib/python2.7/dist-packages/paste/urlmap.py", line 28, in urlmap_factory
2014-12-16 23:50:44.424 TRACE neutron     app = loader.get_app(app_name, global_conf=global_conf)
2014-12-16 23:50:44.424 TRACE neutron   File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 350, in get_app
2014-12-16 23:50:44.424 TRACE neutron     name=name, global_conf=global_conf).create()
2014-12-16 23:50:44.424 TRACE neutron   File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 710, in create
2014-12-16 23:50:44.424 TRACE neutron     return self.object_type.invoke(self)
2014-12-16 23:50:44.424 TRACE neutron   File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 144, in invoke
2014-12-16 23:50:44.424 TRACE neutron     **context.local_conf)
2014-12-16 23:50:44.424 TRACE neutron   File "/usr/lib/python2.7/dist-packages/paste/deploy/util.py", line 55, in fix_call
2014-12-16 23:50:44.424 TRACE neutron     val = callable(*args, **kw)
2014-12-16 23:50:44.424 TRACE neutron   File "/opt/stack/neutron/neutron/auth.py", line 69, in pipeline_factory
2014-12-16 23:50:44.424 TRACE neutron     app = loader.get_app(pipeline[-1])
2014-12-16 23:50:44.424 TRACE neutron   File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 350, in get_app
2014-12-16 23:50:44.424 TRACE neutron     name=name, global_conf=global_conf).create()
2014-12-16 23:50:44.424 TRACE neutron   File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 710, in create
2014-12-16 23:50:44.424 TRACE neutron     return self.object_type.invoke(self)
2014-12-16 23:50:44.424 TRACE neutron   File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 146, in invoke
2014-12-16 23:50:44.424 TRACE neutron     return fix_call(context.object, context.global_conf, **context.local_conf)
2014-12-16 23:50:44.424 TRACE neutron   File "/usr/lib/python2.7/dist-packages/paste/deploy/util.py", line 55, in fix_call
2014-12-16 23:50:44.424 TRACE neutron     val = callable(*args, **kw)

2014-12-16 23:50:44.424 TRACE neutron   File "/opt/stack/neutron/neutron/api/v2/router.py", line 72, in factory
2014-12-16 23:50:44.424 TRACE neutron     return cls(**local_config)
2014-12-16 23:50:44.424 TRACE neutron   File "/opt/stack/neutron/neutron/api/v2/router.py", line 76, in __init__
2014-12-16 23:50:44.424 TRACE neutron     plugin = manager.NeutronManager.get_plugin()
2014-12-16 23:50:44.424 TRACE neutron   File "/opt/stack/neutron/neutron/manager.py", line 222, in get_plugin
2014-12-16 23:50:44.424 TRACE neutron     return weakref.proxy(cls.get_instance().plugin)
2014-12-16 23:50:44.424 TRACE neutron   File "/opt/stack/neutron/neutron/manager.py", line 216, in get_instance
2014-12-16 23:50:44.424 TRACE neutron     cls._create_instance()
2014-12-16 23:50:44.424 TRACE neutron   File "/opt/stack/neutron/neutron/openstack/common/lockutils.py", line 249, in inner
2014-12-16 23:50:44.424 TRACE neutron     return f(*args, **kwargs)
2014-12-16 23:50:44.424 TRACE neutron   File "/opt/stack/neutron/neutron/manager.py", line 202, in _create_instance
2014-12-16 23:50:44.424 TRACE neutron     cls._instance = cls()
2014-12-16 23:50:44.424 TRACE neutron   File "/opt/stack/neutron/neutron/manager.py", line 127, in __init__
2014-12-16 23:50:44.424 TRACE neutron     self._load_service_plugins()
2014-12-16 23:50:44.424 TRACE neutron   File "/opt/stack/neutron/neutron/manager.py", line 175, in _load_service_plugins
2014-12-16 23:50:44.424 TRACE neutron     provider)
2014-12-16 23:50:44.424 TRACE neutron   File "/opt/stack/neutron/neutron/manager.py", line 142, in _get_plugin_instance
2014-12-16 23:50:44.424 TRACE neutron     return plugin_class()
2014-12-16 23:50:44.424 TRACE neutron   File "/opt/stack/neutron/neutron_plugin_contrail/plugins/opencontrail/loadbalancer/plugin.py", line 19, in __init__
2014-12-16 23:50:44.424 TRACE neutron     self._load_drivers()
2014-12-16 23:50:44.424 TRACE neutron   File "/opt/stack/neutron/neutron_plugin_contrail/plugins/opencontrail/loadbalancer/plugin.py", line 25, in _load_drivers
2014-12-16 23:50:44.424 TRACE neutron     constants.LOADBALANCER, self)
2014-12-16 23:50:44.424 TRACE neutron   File "/opt/stack/neutron/neutron/services/service_base.py", line 81, in load_drivers
2014-12-16 23:50:44.424 TRACE neutron     provider['driver'], plugin
2014-12-16 23:50:44.424 TRACE neutron   File "/opt/stack/neutron/neutron/openstack/common/importutils.py", line 38, in import_object
2014-12-16 23:50:44.424 TRACE neutron     return import_class(import_str)(*args, **kwargs)
2014-12-16 23:50:44.424 TRACE neutron   File "/opt/stack/neutron/neutron/services/loadbalancer/drivers/common/agent_driver_base.py", line 336, in __init__
2014-12-16 23:50:44.424 TRACE neutron     self.plugin.agent_notifiers.update(
2014-12-16 23:50:44.424 TRACE neutron AttributeError: 'LoadBalancerPlugin' object has no attribute 'agent_notifiers'
2014-12-16 23:50:44.424 TRACE neutron
q-svc failed to start


OpenStack neutron No providers specified for 'LOADBALANCER' service, exiting

===How to Fix:===




Specify LBass provider in /ect/neutron/neutron.conf
 

[DEFAULT]
service_plugins = neutron_plugin_contrail.plugins.opencontrail.loadbalancer.plugin.LoadBalancerPlugin

[service_providers]
#service_provider=::[:default]
#service_provider=LOADBALANCER:name:lbaas_plugin_driver_path:default


#'Opencontrail' LBaaS provider
service_provider = LOADBALANCER:Opencontrail:neutron_plugin_contrail.plugins.opencontrail.loadbalancer.driver.OpencontrailLoadbalancerDriver:default



===Error:==

2014-12-16 23:46:10.228 DEBUG urllib3.connectionpool [-] Setting read timeout to None from (pid=54393) _make_request /usr/lib/python2.7/dist-packages/urllib3/connectionpool.py:390
2014-12-16 23:46:10.232 DEBUG urllib3.connectionpool [-] "GET / HTTP/1.1" 200 10104 from (pid=54393) _make_request /usr/lib/python2.7/dist-packages/urllib3/connectionpool.py:430
2014-12-16 23:46:10.259 WARNING neutron.openstack.common.db.sqlalchemy.session [-] This application has not enabled MySQL traditional mode, which means silent data corruption may occur. Please encourage the application developers to enable this mode.
2014-12-16 23:46:10.292 ERROR neutron.services.service_base [-] No providers specified for 'LOADBALANCER' service, exiting
2014-12-16 23:46:10.293 DEBUG neutron.openstack.common.lockutils [-] Semaphore / lock released "_create_instance" from (pid=54393) inner /opt/stack/neutron/neutron/openstack/common/lockutils.py:252
No providers specified for 'LOADBALANCER' service, exiting
q-svc failed to start

neutron.manager ImportError: No module named cfgm_common

How to Fox it
http://fosshelp.blogspot.in/2015/04/howto-opencontrail-install-cfgmcommon.html

===Error:===

2014-12-15 03:46:42.777 INFO neutron.manager [-] Loading Plugin: neutron_plugin_contrail.plugins.opencontrail.loadbalancer.plugin.LoadBalancerPlugin
2014-12-15 03:46:42.778 DEBUG stevedore.extension [-] found extension EntryPoint.parse('dummy = neutron.tests.unit.dummy_plugin:DummyServicePlugin')
 from (pid=50813) _load_plugins /usr/local/lib/python2.7/dist-packages/stevedore/extension.py:156
2014-12-15 03:46:42.778 DEBUG stevedore.extension [-] found extension EntryPoint.parse('firewall = neutron.services.firewall.fwaas_plugin:FirewallPl
ugin') from (pid=50813) _load_plugins /usr/local/lib/python2.7/dist-packages/stevedore/extension.py:156
2014-12-15 03:46:42.778 DEBUG stevedore.extension [-] found extension EntryPoint.parse('metering = neutron.services.metering.metering_plugin:Meterin
gPlugin') from (pid=50813) _load_plugins /usr/local/lib/python2.7/dist-packages/stevedore/extension.py:156
2014-12-15 03:46:42.778 DEBUG stevedore.extension [-] found extension EntryPoint.parse('router = neutron.services.l3_router.l3_router_plugin:L3Route
rPlugin') from (pid=50813) _load_plugins /usr/local/lib/python2.7/dist-packages/stevedore/extension.py:156
2014-12-15 03:46:42.778 DEBUG stevedore.extension [-] found extension EntryPoint.parse('vpnaas = neutron.services.vpn.plugin:VPNDriverPlugin') from
(pid=50813) _load_plugins /usr/local/lib/python2.7/dist-packages/stevedore/extension.py:156
2014-12-15 03:46:42.778 DEBUG stevedore.extension [-] found extension EntryPoint.parse('lbaas = neutron.services.loadbalancer.plugin:LoadBalancerPlu
gin') from (pid=50813) _load_plugins /usr/local/lib/python2.7/dist-packages/stevedore/extension.py:156
2014-12-15 03:46:42.779 ERROR neutron.manager [-] Error loading plugin by name, No 'neutron.service_plugins' driver found, looking for 'neutron_plug
in_contrail.plugins.opencontrail.loadbalancer.plugin.LoadBalancerPlugin'
2014-12-15 03:46:42.779 TRACE neutron.manager Traceback (most recent call last):
2014-12-15 03:46:42.779 TRACE neutron.manager   File "/opt/stack/neutron/neutron/manager.py", line 137, in _get_plugin_instance
2014-12-15 03:46:42.779 TRACE neutron.manager     plugin_class = importutils.import_class(plugin_provider)
2014-12-15 03:46:42.779 TRACE neutron.manager   File "/opt/stack/neutron/neutron/openstack/common/importutils.py", line 28, in import_class
2014-12-15 03:46:42.779 TRACE neutron.manager     __import__(mod_str)
2014-12-15 03:46:42.779 TRACE neutron.manager   File "/opt/stack/neutron/neutron_plugin_contrail/plugins/opencontrail/loadbalancer/plugin.py", line
4, in
2014-12-15 03:46:42.779 TRACE neutron.manager     from loadbalancer_db import LoadBalancerPluginDb
2014-12-15 03:46:42.779 TRACE neutron.manager   File "/opt/stack/neutron/neutron_plugin_contrail/plugins/opencontrail/loadbalancer/loadbalancer_db.p
y", line 10, in
2014-12-15 03:46:42.779 TRACE neutron.manager     from cfgm_common import exceptions as vnc_exc
2014-12-15 03:46:42.779 TRACE neutron.manager ImportError: No module named cfgm_common
2014-12-15 03:46:42.779 TRACE neutron.manager
2014-12-15 03:46:42.780 ERROR neutron.manager [-] Error loading plugin by class, No module named cfgm_common
2014-12-15 03:46:42.780 TRACE neutron.manager Traceback (most recent call last):
2014-12-15 03:46:42.780 TRACE neutron.manager   File "/opt/stack/neutron/neutron/manager.py", line 137, in _get_plugin_instance
2014-12-15 03:46:42.780 TRACE neutron.manager     plugin_class = importutils.import_class(plugin_provider)
2014-12-15 03:46:42.780 TRACE neutron.manager   File "/opt/stack/neutron/neutron/openstack/common/importutils.py", line 28, in import_class
2014-12-15 03:46:42.780 TRACE neutron.manager     __import__(mod_str)
2014-12-15 03:46:42.780 TRACE neutron.manager   File "/opt/stack/neutron/neutron_plugin_contrail/plugins/opencontrail/loadbalancer/plugin.py", line 4, in
2014-12-15 03:46:42.780 TRACE neutron.manager     from loadbalancer_db import LoadBalancerPluginDb
2014-12-15 03:46:42.780 TRACE neutron.manager   File "/opt/stack/neutron/neutron_plugin_contrail/plugins/opencontrail/loadbalancer/loadbalancer_db.py", line 10, in
2014-12-15 03:46:42.780 TRACE neutron.manager     from cfgm_common import exceptions as vnc_exc
2014-12-15 03:46:42.780 TRACE neutron.manager ImportError: No module named cfgm_common
2014-12-15 03:46:42.780 TRACE neutron.manager
2014-12-15 03:46:42.780 DEBUG neutron.openstack.common.lockutils [-] Semaphore / lock released "_create_instance" from (pid=50813) inner /opt/stack/neutron/neutron/openstack/common/lockutils.py:252
2014-12-15 03:46:42.781 ERROR neutron.common.config [-] Unable to load neutron from configuration file /etc/neutron/api-paste.ini.
2014-12-15 03:46:42.781 TRACE neutron.common.config Traceback (most recent call last):
2014-12-15 03:46:42.781 TRACE neutron.common.config   File "/opt/stack/neutron/neutron/common/config.py", line 170, in load_paste_app
2014-12-15 03:46:42.781 TRACE neutron.common.config     app = deploy.loadapp("config:%s" % config_path, name=app_name)
2014-12-15 03:46:42.781 TRACE neutron.common.config   File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 247, in loadapp
2014-12-15 03:46:42.781 TRACE neutron.common.config     return loadobj(APP, uri, name=name, **kw)
2014-12-15 03:46:42.781 TRACE neutron.common.config   File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 272, in loadobj
2014-12-15 03:46:42.781 TRACE neutron.common.config     return context.create()
2014-12-15 03:46:42.781 TRACE neutron.common.config   File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 710, in create
2014-12-15 03:46:42.781 TRACE neutron.common.config     return self.object_type.invoke(self)
2014-12-15 03:46:42.781 TRACE neutron.common.config   File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 144, in invoke
2014-12-15 03:46:42.781 TRACE neutron.common.config     **context.local_conf)
2014-12-15 03:46:42.781 TRACE neutron.common.config   File "/usr/lib/python2.7/dist-packages/paste/deploy/util.py", line 55, in fix_call
2014-12-15 03:46:42.781 TRACE neutron.common.config     val = callable(*args, **kw)
2014-12-15 03:46:42.781 TRACE neutron.common.config   File "/usr/lib/python2.7/dist-packages/paste/urlmap.py", line 28, in urlmap_factory
2014-12-15 03:46:42.781 TRACE neutron.common.config     app = loader.get_app(app_name, global_conf=global_conf)
2014-12-15 03:46:42.781 TRACE neutron.common.config   File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 350, in get_app
2014-12-15 03:46:42.781 TRACE neutron.common.config     name=name, global_conf=global_conf).create()
2014-12-15 03:46:42.781 TRACE neutron.common.config   File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 710, in create
2014-12-15 03:46:42.781 TRACE neutron.common.config     return self.object_type.invoke(self)
2014-12-15 03:46:42.781 TRACE neutron.common.config   File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 144, in invoke
2014-12-15 03:46:42.781 TRACE neutron.common.config     **context.local_conf)
2014-12-15 03:46:42.781 TRACE neutron.common.config   File "/usr/lib/python2.7/dist-packages/paste/deploy/util.py", line 55, in fix_call
2014-12-15 03:46:42.781 TRACE neutron.common.config     val = callable(*args, **kw)
2014-12-15 03:46:42.781 TRACE neutron.common.config   File "/opt/stack/neutron/neutron/auth.py", line 69, in pipeline_factory
2014-12-15 03:46:42.781 TRACE neutron.common.config     app = loader.get_app(pipeline[-1])
2014-12-15 03:46:42.781 TRACE neutron.common.config   File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 350, in get_app
2014-12-15 03:46:42.781 TRACE neutron.common.config     name=name, global_conf=global_conf).create()
2014-12-15 03:46:42.781 TRACE neutron.common.config   File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 710, in create
2014-12-15 03:46:42.781 TRACE neutron.common.config     return self.object_type.invoke(self)
2014-12-15 03:46:42.781 TRACE neutron.common.config   File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 146, in invoke
2014-12-15 03:46:42.781 TRACE neutron.common.config     return fix_call(context.object, context.global_conf, **context.local_conf)
2014-12-15 03:46:42.781 TRACE neutron.common.config   File "/usr/lib/python2.7/dist-packages/paste/deploy/util.py", line 55, in fix_call
2014-12-15 03:46:42.781 TRACE neutron.common.config     val = callable(*args, **kw)
2014-12-15 03:46:42.781 TRACE neutron.common.config   File "/opt/stack/neutron/neutron/api/v2/router.py", line 72, in factory
2014-12-15 03:46:42.781 TRACE neutron.common.config     return cls(**local_config)
2014-12-15 03:46:42.781 TRACE neutron.common.config   File "/opt/stack/neutron/neutron/api/v2/router.py", line 76, in __init__
2014-12-15 03:46:42.781 TRACE neutron.common.config     plugin = manager.NeutronManager.get_plugin()
2014-12-15 03:46:42.781 TRACE neutron.common.config   File "/opt/stack/neutron/neutron/manager.py", line 222, in get_plugin
2014-12-15 03:46:42.781 TRACE neutron.common.config     return weakref.proxy(cls.get_instance().plugin)
2014-12-15 03:46:42.781 TRACE neutron.common.config   File "/opt/stack/neutron/neutron/manager.py", line 216, in get_instance
2014-12-15 03:46:42.781 TRACE neutron.common.config     cls._create_instance()
2014-12-15 03:46:42.781 TRACE neutron.common.config   File "/opt/stack/neutron/neutron/openstack/common/lockutils.py", line 249, in inner
2014-12-15 03:46:42.781 TRACE neutron.common.config     return f(*args, **kwargs)
2014-12-15 03:46:42.781 TRACE neutron.common.config   File "/opt/stack/neutron/neutron/manager.py", line 202, in _create_instance
2014-12-15 03:46:42.781 TRACE neutron.common.config     cls._instance = cls()
2014-12-15 03:46:42.781 TRACE neutron.common.config   File "/opt/stack/neutron/neutron/manager.py", line 127, in __init__
2014-12-15 03:46:42.781 TRACE neutron.common.config     self._load_service_plugins()
2014-12-15 03:46:42.781 TRACE neutron.common.config   File "/opt/stack/neutron/neutron/manager.py", line 175, in _load_service_plugins
2014-12-15 03:46:42.781 TRACE neutron.common.config     provider)
2014-12-15 03:46:42.781 TRACE neutron.common.config   File "/opt/stack/neutron/neutron/manager.py", line 141, in _get_plugin_instance
2014-12-15 03:46:42.781 TRACE neutron.common.config     raise ImportError(_("Plugin not found."))
2014-12-15 03:46:42.781 TRACE neutron.common.config ImportError: Plugin not found.
2014-12-15 03:46:42.781 TRACE neutron.common.config
2014-12-15 03:46:42.782 ERROR neutron.service [-] Error occurred: trying old api-paste.ini.
2014-12-15 03:46:42.782 TRACE neutron.service Traceback (most recent call last):
2014-12-15 03:46:42.782 TRACE neutron.service   File "/opt/stack/neutron/neutron/service.py", line 105, in serve_wsgi
2014-12-15 03:46:42.782 TRACE neutron.service     service.start()
2014-12-15 03:46:42.782 TRACE neutron.service   File "/opt/stack/neutron/neutron/service.py", line 74, in start
2014-12-15 03:46:42.782 TRACE neutron.service     self.wsgi_app = _run_wsgi(self.app_name)
2014-12-15 03:46:42.782 TRACE neutron.service   File "/opt/stack/neutron/neutron/service.py", line 173, in _run_wsgi
2014-12-15 03:46:42.782 TRACE neutron.service     app = config.load_paste_app(app_name)
2014-12-15 03:46:42.782 TRACE neutron.service   File "/opt/stack/neutron/neutron/common/config.py", line 177, in load_paste_app
2014-12-15 03:46:42.782 TRACE neutron.service     raise RuntimeError(msg)
2014-12-15 03:46:42.782 TRACE neutron.service RuntimeError: Unable to load neutron from configuration file /etc/neutron/api-paste.ini.
2014-12-15 03:46:42.782 TRACE neutron.service
2014-12-15 03:46:42.783 INFO neutron.common.config [-] Logging enabled!



log_opt_values /usr/local/lib/python2.7/dist-packages/oslo/config/cfg.py:2002
2014-12-15 03:46:42.803 INFO neutron.common.config [-] Config paste file: /etc/neutron/api-paste.ini
2014-12-15 03:46:42.804 ERROR neutron.common.config [-] Unable to load quantum from configuration file /etc/neutron/api-paste.ini.
2014-12-15 03:46:42.804 TRACE neutron.common.config Traceback (most recent call last):
2014-12-15 03:46:42.804 TRACE neutron.common.config   File "/opt/stack/neutron/neutron/common/config.py", line 170, in load_paste_app
2014-12-15 03:46:42.804 TRACE neutron.common.config     app = deploy.loadapp("config:%s" % config_path, name=app_name)
2014-12-15 03:46:42.804 TRACE neutron.common.config   File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 247, in loadapp
2014-12-15 03:46:42.804 TRACE neutron.common.config     return loadobj(APP, uri, name=name, **kw)
2014-12-15 03:46:42.804 TRACE neutron.common.config   File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 271, in loadobj
2014-12-15 03:46:42.804 TRACE neutron.common.config     global_conf=global_conf)
2014-12-15 03:46:42.804 TRACE neutron.common.config   File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 296, in loadcontext
2014-12-15 03:46:42.804 TRACE neutron.common.config     global_conf=global_conf)
2014-12-15 03:46:42.804 TRACE neutron.common.config   File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 320, in _loadconfig
2014-12-15 03:46:42.804 TRACE neutron.common.config     return loader.get_context(object_type, name, global_conf)
2014-12-15 03:46:42.804 TRACE neutron.common.config   File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 408, in get_context
2014-12-15 03:46:42.804 TRACE neutron.common.config     object_type, name=name)
2014-12-15 03:46:42.804 TRACE neutron.common.config   File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 587, in find_config_section
2014-12-15 03:46:42.804 TRACE neutron.common.config     self.filename))
2014-12-15 03:46:42.804 TRACE neutron.common.config LookupError: No section 'quantum' (prefixed by 'app' or 'application' or 'composite' or 'composit' or 'pipeline' or 'filter-app') found in config /etc/neutron/api-paste.ini
2014-12-15 03:46:42.804 TRACE neutron.common.config
2014-12-15 03:46:42.804 ERROR neutron.service [-] Unrecoverable error: please check log for details.
2014-12-15 03:46:42.804 TRACE neutron.service Traceback (most recent call last):
2014-12-15 03:46:42.804 TRACE neutron.service   File "/opt/stack/neutron/neutron/service.py", line 109, in serve_wsgi
2014-12-15 03:46:42.804 TRACE neutron.service     service.start()
2014-12-15 03:46:42.804 TRACE neutron.service   File "/opt/stack/neutron/neutron/service.py", line 74, in start
2014-12-15 03:46:42.804 TRACE neutron.service     self.wsgi_app = _run_wsgi(self.app_name)
2014-12-15 03:46:42.804 TRACE neutron.service   File "/opt/stack/neutron/neutron/service.py", line 173, in _run_wsgi
2014-12-15 03:46:42.804 TRACE neutron.service     app = config.load_paste_app(app_name)
2014-12-15 03:46:42.804 TRACE neutron.service   File "/opt/stack/neutron/neutron/common/config.py", line 177, in load_paste_app
2014-12-15 03:46:42.804 TRACE neutron.service     raise RuntimeError(msg)
2014-12-15 03:46:42.804 TRACE neutron.service RuntimeError: Unable to load quantum from configuration file /etc/neutron/api-paste.ini.
2014-12-15 03:46:42.804 TRACE neutron.service
ERROR: Unable to load quantum from configuration file /etc/neutron/api-paste.ini.
q-svc failed to start


Thursday, April 23, 2015

Install python neutronclient from github.com/Juniper and test OpenContrail Extensions

1)
#git clone https://github.com/Juniper/python-neutronclient.git -b contrail/icehouse

2)
#cd python-neutronclient
#sudo pip install tox
#tox


3)
#vim neutron1

#!/usr/bin/python
# PBR Generated from 'console_scripts'
import sys
from neutronclient.shell import main
if __name__ == "__main__":
    sys.exit(main()
)

4)
#chmod a+x neutron1

5)

#./neutron1 net-list
#./neutron1 ipam-list
#./neutron1 policy-list
#./neutron1 route-table-list


DevStack How to Install stable OpenStack Kilo in Ubuntu

1)
Clone DevStack
#git clone https://github.com/openstack-dev/devstack.git -b stable/kilo



2)
Install OpenStack

#cd devsack
#./stack.sh



OpenStack Neutron API Examples using curl

1)
export OS_USERNAME=admin
export OS_PASSWORD=secret123
export OS_TENANT_NAME=admin
export OS_AUTH_URL=http://127.0.0.1:35357/v2.0


2)
You can find endpoint of neutron service with following command
#keystone service-list
#keystone endpoint-list

3)
List networks

#curl -s -H "X-Auth-Token: $(keystone token-get | awk '/ id / {print $4}')" 192.168.56.102:9696/v2.0/networks | python -mjson.tool

List subnets
#curl -s -H "X-Auth-Token: $(keystone token-get | awk '/ id / {print $4}')" 192.168.56.102:9696/v2.0/subnets | python -mjson.tool

List security-groups
#curl -s -H "X-Auth-Token: $(keystone token-get | awk '/ id / {print $4}')" 192.168.56.102:9696/v2.0/security-groups | python -mjson.tool

List ports
#curl -s -H "X-Auth-Token: $(keystone token-get | awk '/ id / {print $4}')" 192.168.56.102:9696/v2.0/ports | python -mjson.tool

List routers

#curl -s -H "X-Auth-Token: $(keystone token-get | awk '/ id / {print $4}')" 192.168.56.102:9696/v2.0/routers | python -mjson.tool

List extensions

#curl -s -H "X-Auth-Token: $(keystone token-get | awk '/ id / {print $4}')" 192.168.56.102:9696/v2.0/extensions | python -mjson.tool



OpenStack DevStack OpenContrail localrc

1)
First clone devstack from github.com/openstack-dev
#git clone https://github.com/openstack-dev/devstack.git

2)
Then download devstack opencontrail plugin installation script following link and move to clone directory "devstack/lib/neutron_plugins/"
https://github.com/Juniper/contrail-installer/blob/master/devstack/lib/neutron_plugins/opencontrail
or
https://github.com/dsetia/devstack/blob/master/lib/neutron_plugins/contrail

3)
Then add following lines in localrc

#OpenContrail API Server
APISERVER_IP=192.168.56.102
#OpenContrail Plugin
Q_PLUGIN=opencontrail
#OpenContrail nova plugin
NOVA_VIF_DRIVER=nova_contrail_vif.contrailvif.VRouterVIFDriver

4)
Optional Step

Comment/delete following line from stack.sh
create_neutron_initial_network

5)
Example localrc


STACK_DIR=$(cd $(dirname $0) && pwd)

LOG_DIR=$STACK_DIR/log/screens
LOG=True
DEBUG=True
LOGFILE=$STACK_DIR/log/stack.log
LOGDAYS=1
SCREEN_LOGDIR=$LOG_DIR

disable_service n-net
enable_service q-svc
enable_service q-meta
#enable_service neutron

# not used by contrail
disable_service q-agt
disable_service q-dhcp
disable_service q-l3

DATABASE_PASSWORD=contrail123
RABBIT_PASSWORD=contrail123
SERVICE_TOKEN=contrail123
SERVICE_PASSWORD=contrail123
ADMIN_PASSWORD=contrail123
#OpenContrail API Server
APISERVER_IP=192.168.56.102
#OpenContrail Plugin
Q_PLUGIN=opencontrail
PHYSICAL_INTERFACE=eth1

# proto for openstack bits. Use HTTPS if git is firewalled
GIT_BASE=https://git.openstack.org

#OpenContrail nova plugin
NOVA_VIF_DRIVER=nova_contrail_vif.contrailvif.VRouterVIFDriver

6)
Sample localrc files

https://github.com/Juniper/contrail-installer/blob/600d4db0ef99f570b475e5e5241ff3c746987acd/devstack/samples/localrc-all


https://raw.githubusercontent.com/Juniper/contrail-installer/4a29ccdd61c7d19a595a89031ce59601b0fed59a/devstack/samples/localrc-ci


7)
Then run ./stack.sh



Monday, April 20, 2015

[Solved] cannot verify raw.github.com's certificate, issued by

0)
First Delete/rename /etc/ssl/certs

1)
Try to download github file using wget.

ERROR: cannot verify github.com's certificate, issued by ‘/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert SHA2 Extended Validation Server CA’: Unable to locally verify the issuer's authority.

$wget https://raw.githubusercontent.com/sajuptpm/mytools/master/.gitignore
--2015-04-20 17:16:53--  https://raw.githubusercontent.com/sajuptpm/mytools/master/.gitignore
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 199.27.74.133
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|199.27.74.133|:443... connected.
ERROR: cannot verify raw.githubusercontent.com's certificate, issued by ‘/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert SHA2 High Assurance Server CA’:
  Unable to locally verify the issuer's authority.
To connect to raw.githubusercontent.com insecurely, use `--no-check-certificate'.

2)
Download DigiCert Root Certificate "DigiCert High Assurance EV Root CA" from following site.
https://www.digicert.com/digicert-root-certificates.htm

#cd /ets/ssl
#mkdir certs
#cd /etc/ssl/certs
#sudo wget https://www.digicert.com/CACerts/DigiCertHighAssuranceEVRootCA.crt --no-check-certificate

* At this point, Try "Step-1" again and you will get same error.

2)
Unfortunately these are encoded and need to be converted into text.

#cd /etc/ssl/certs
#sudo openssl x509 -inform DES -in DigiCertHighAssuranceEVRootCA.crt -out DigiCertHighAssuranceEVRootCA.crt -text

* At this point, Try "Step-1" again and you will get same error.

3)
Check
#ls -a
.  ..  .0 DigiCertHighAssuranceEVRootCA.crt

* You can see a hidden file named ".0", you can open it in vim editor, that contains a certificate key.
* At this point, Try "Step-1" again and you will get same error.

4)
The final step is running c_rehash within "/etc/ssl/certs" to scan directories and take a hash value of each '.pem' and '.crt' file in the directory. It then creates symbolic links for each of the files named by the hash value. Programs on the system (like curl or wget) expect to find the certificates they require in this c_rehash'ed format.

#sudo c_rehash /etc/ssl/certs
OR
#cd /etc/ssl/certs
#sudo c_rehash .

* At this point, Try "Step-1" again and you will not get any error.

5)
Check
#ls -a
.  ..  .0  244b5494.0  81b9768f.0  DigiCertHighAssuranceEVRootCA.crt

* Now you can see two new files named "244b5494.0" and "81b9768f.0",  you can open it in vim editor, that contains a certificate key.


6)
$ wget https://raw.githubusercontent.com/sajuptpm/mytools/master/.gitignore
--2015-04-20 17:24:47--  https://raw.githubusercontent.com/sajuptpm/mytools/master/.gitignore
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 199.27.75.133
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|199.27.75.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 15 [text/plain]
Saving to: ‘.gitignore.1’

100%[==========================================================================================================>] 15          --.-K/s   in 0s     

2015-04-20 17:24:48 (294 KB/s) - ‘.gitignore.1’ saved [15/15]


7)
Complete script
#!/bin/bash

cd /etc/ssl/certs
sudo wget https://www.digicert.com/CACerts/DigiCertHighAssuranceEVRootCA.crt --no-check-certificate
sudo openssl x509 -inform DES -in DigiCertHighAssuranceEVRootCA.crt -out DigiCertHighAssuranceEVRootCA.crt -text
sudo c_rehash .





Thursday, April 16, 2015

Citrix Receiver 13.1 on Ubuntu 14.04

1. (64-bit only) Alternative install procedure that can be added to a deployment bash script

http://mark911.wordpress.com/2014/06/27/how-to-install-citrix-receiver-icaclient-in-ubuntu-14-04-lts-64-bit-tested-and-working-using-mozilla-firefox/

2. (64-bit only) Enable i386 Multiarch

Even the Citrix Receiver for 64-bit systems has a lot of dependencies on packages from the i386 architecture. If you are using 64-bit Ubuntu and have not already configured i386 multiarch, you must configure it by running:

sudo dpkg --add-architecture i386
sudo apt-get update


3. Download the Citrix Receiver for Linux .deb package

    Go to https://www.citrix.com/downloads/citrix-receiver/linux/receiver-for-linux-131.html
    Near the bottom of the page, select either "For 64-bit Systems" or "For 32-bit Systems" as appropriate.
    Look for "File Type: .deb" under the Download buttons.
    Download the "Receiver for Linux" package.
    Optionally download the "USB Support Package". This package provides support for passing USB devices from your local Ubuntu machine into the remote Windows session (if your Citrix server is configured to allow that).

4. Install the package(s) and dependencies


sudo dpkg -i ~/Downloads/icaclient_*.deb ctxusb_*.deb
sudo apt-get -f install
  # Install dependencies and finish configuring the package(s)

OR

sudo gdebi ~/Downloads/icaclient_*.deb ctxusb_*.deb


5. Add more SSL certificates

By default, Citrix Receiver only trusts a few root CA certificates, which causes connections to many Citrix servers to fail with an SSL error. The 'ca-certificates' package (already installed on most Ubuntu systems) provides additional CA certificates in /usr/share/ca-certificates/mozilla/ that can be conveniently added to Citrix Receiver to avoid these errors:

a)
Goto mozilla's ca-certificates directory and download your certificates. We need to do this before making soft link to /opt/Citrix/ICAClient/keystore/cacerts/ and rehash it.
cd /usr/share/ca-certificates/mozilla/
wget http://mysite.jpp.com/RootCA_base64.cer
wget http://mysite.jpp.com/MYSiteCA_base64.cer


b)
Make soft link to /opt/Citrix/ICAClient/keystore/cacerts/ and rehash it.
sudo ln -s /usr/share/ca-certificates/mozilla/* /opt/Citrix/ICAClient/keystore/cacerts/
sudo c_rehash /opt/Citrix/ICAClient/keystore/cacerts/


6. Configure Citrix Receiver

Run:

/opt/Citrix/ICAClient/util/configmgr &

To map drives (to allow access to files on your local Ubuntu machine via a share drive in the remote Windows session), see the "File Access" tab.

7. (64-bit only) Fix Firefox plugin installation

Run:

sudo rm -f /usr/lib/mozilla/plugins/npwrapper.npica.so /usr/lib/firefox/plugins/npwrapper.npica.so
sudo rm -f /usr/lib/mozilla/plugins/npica.so
sudo ln -s /opt/Citrix/ICAClient/npica.so /usr/lib/mozilla/plugins/npica.so


Starting with Citrix Receiver 13.1, the 64-bit version of Citrix Receiver switched from a 32-bit plugin (using nspluginwrapper to allow it to run within a 64-bit browser) to a native 64-bit plugin. However, the install script still configures the plugin to run within nspluginwrapper, which doesn't work with a 64-bit plugin. The above will reconfigure the plugin to run without nspluginwrapper.

8. Configure Firefox

In Firefox, go to Tools -> Add-ons -> Plugins, and make sure the "Citrix Receiver for Linux" plugin is set to "Always Activate".

Starting in Firefox 32, plugins are set to "Ask to Activate" by default, but for some reason the activation prompt is never displayed for the Citrix Receiver plugin, so the plugin will not work unless it is set to "Always Activate".

9)
Open Firefox and goto your Citrix App and login, Example:https://y4gapps.cpp.com
Then click on "Enterprise-Desktop" icon.

10)
Ref : https://help.ubuntu.com/community/CitrixICAClientHowTo


Tuesday, April 14, 2015

Friday, April 10, 2015

Monday, April 6, 2015

link-local address In computer network

http://en.wikipedia.org/wiki/Link-local_address

https://www.youtube.com/watch?v=WiX0g8IAibM

In a computer network, a link-local address is a network address that is valid only for communications within the network segment (link) or the broadcast domain that the host is connected to. Link-local addresses are usually not guaranteed to be unique beyond a single network segment.

Link-local addresses for IPv4 are defined in the address block 169.254.0.0/16, in CIDR notation.
In IPv6, they are assigned with the fe80::/10 prefix.

169.254.0.0/16 reserved for Link Local [RFC5735]

Special Use IPv4 Addresses
http://tools.ietf.org/html/rfc5735

Dynamic Configuration of IPv4 Link-Local Addresses
http://tools.ietf.org/html/rfc3927

Use following command to see ipv4 and ipv5 address of all network interfaces
#ip a
OR
#ip address
OR
#ip address show

OR
#ifconfig



Thursday, April 2, 2015

How to Check startup services in Ubuntu or Debian

1)
rcconf is a runlevel configuration tool for Debian-based systems.

$ sudo apt-get install rcconf
$ sudo rcconf


2)
sysv-rc-conf is a runlevel configuration tool for Debian-based systems.

$ sudo apt-get install sysv-rc-conf
$ sudo sysv-rc-conf




Wednesday, April 1, 2015

How to Install Skype Ubuntu 15.04 LTS Vivid Vervet

1)
Download skype

http://www.skype.com/en/download-skype/skype-for-computer/

http://download.skype.com/linux/skype-ubuntu-precise_4.3.0.37-1_i386.deb

2)
Update repo
#sudo apt-get update





3)
Install gdebi
#sudo apt-get install gdebi

4)
Install skype
#sudo gdebi skype-ubuntu-precise_4.3.0.37-1_i386.deb


OpenStack find and parse only the ID of all users using CLI and AWK

1)
saju@ubuntu:~$
saju@ubuntu:~$ keystone user-list
+----------------------------------+--------------+---------+---------------------+
|                id                |     name     | enabled |        email        |
+----------------------------------+--------------+---------+---------------------+
| 043e319471b344b38a6a24d487cf4779 |    admin     |   True  |  admin@example.com  |
| c18a866b8bdf459db236e08d15c7da25 |    cinder    |   True  |  cinder@example.com |
| 0cbcb3f31ebe45859dcb454151474196 |     demo     |   True  |   demo@example.com  |
| 2a2c57a8ea6349d1a482de8d5845414d |    glance    |   True  |  glance@example.com |
| ad22bdb11ddd42f59fe688bceba8d648 |     heat     |   True  |   heat@example.com  |
| 93901c78f88d457b9c691acc77380aea |   neutron    |   True  | neutron@example.com |
| 10b6f5dead814142ae7da19c9f9a1f41 |     nova     |   True  |   nova@example.com  |
| fc18cb1bed564edfb95c58d3fcdfb9d6 |   testuser   |   True  |                     |
| e730974265b14001b9f0537eeab186bd |  testuser2   |   True  |                     |
| 03168425d56e4e8fa1b86e252955cbfd |     use3     |   True  |                     |
| d70696f95a7b45309e553a59d0d3949c |    user1     |   True  |                     |
| 094abd49a60b4cfca5152a51c6809b18 | vpc-1ca5e3f6 |   True  |                     |
| fde39ee3fabb4c689a3e5213e80d0f0f | vpc-3e1bdd7b |   True  |                     |
| 97f3af264d834d3d83e23adc3a6f0441 | vpc-4ea2a886 |   True  |                     |
| 1b476671f97b4b7d864b7b67012514be | vpc-6bb138ff |   True  |                     |
| d11ade17c09e47689e16bd9ed077975a | vpc-d737f234 |   True  |                     |
| 83d17e75c4c84777bd0718c176082df4 | vpc-d8e1949c |   True  |                     |
+----------------------------------+--------------+---------+---------------------+
saju@ubuntu:~$
saju@ubuntu:~$



2)
saju@ubuntu:~$ keystone user-list | awk '{print $2}'

id

043e319471b344b38a6a24d487cf4779
c18a866b8bdf459db236e08d15c7da25
0cbcb3f31ebe45859dcb454151474196
2a2c57a8ea6349d1a482de8d5845414d
ad22bdb11ddd42f59fe688bceba8d648
93901c78f88d457b9c691acc77380aea
10b6f5dead814142ae7da19c9f9a1f41
fc18cb1bed564edfb95c58d3fcdfb9d6
e730974265b14001b9f0537eeab186bd
03168425d56e4e8fa1b86e252955cbfd
d70696f95a7b45309e553a59d0d3949c
094abd49a60b4cfca5152a51c6809b18
fde39ee3fabb4c689a3e5213e80d0f0f
97f3af264d834d3d83e23adc3a6f0441
1b476671f97b4b7d864b7b67012514be
d11ade17c09e47689e16bd9ed077975a
83d17e75c4c84777bd0718c176082df4

saju@ubuntu:~$
saju@ubuntu:~$

3)
Remove "id" and space from the output
saju@ubuntu:~$
saju@ubuntu:~$ keystone user-list | awk '{if($2!="id" && $2!="") print $2}'
043e319471b344b38a6a24d487cf4779
c18a866b8bdf459db236e08d15c7da25
0cbcb3f31ebe45859dcb454151474196
2a2c57a8ea6349d1a482de8d5845414d
ad22bdb11ddd42f59fe688bceba8d648
93901c78f88d457b9c691acc77380aea
10b6f5dead814142ae7da19c9f9a1f41
fc18cb1bed564edfb95c58d3fcdfb9d6
e730974265b14001b9f0537eeab186bd
03168425d56e4e8fa1b86e252955cbfd
d70696f95a7b45309e553a59d0d3949c
094abd49a60b4cfca5152a51c6809b18
fde39ee3fabb4c689a3e5213e80d0f0f
97f3af264d834d3d83e23adc3a6f0441
1b476671f97b4b7d864b7b67012514be
d11ade17c09e47689e16bd9ed077975a
83d17e75c4c84777bd0718c176082df4
saju@ubuntu:~$
saju@ubuntu:~$

4)
saju@ubuntu:~$
saju@ubuntu:~$ user_ids=$(keystone user-list | awk '{if($2!="id" && $2!="") print $2}')
saju@ubuntu:~$
saju@ubuntu:~$

5)
saju@ubuntu:~$
saju@ubuntu:~$ for user in $user_ids
> do
> echo $user
> done

043e319471b344b38a6a24d487cf4779
c18a866b8bdf459db236e08d15c7da25
0cbcb3f31ebe45859dcb454151474196
2a2c57a8ea6349d1a482de8d5845414d
ad22bdb11ddd42f59fe688bceba8d648
93901c78f88d457b9c691acc77380aea
10b6f5dead814142ae7da19c9f9a1f41
fc18cb1bed564edfb95c58d3fcdfb9d6
e730974265b14001b9f0537eeab186bd
03168425d56e4e8fa1b86e252955cbfd
d70696f95a7b45309e553a59d0d3949c
094abd49a60b4cfca5152a51c6809b18
fde39ee3fabb4c689a3e5213e80d0f0f
97f3af264d834d3d83e23adc3a6f0441
1b476671f97b4b7d864b7b67012514be
d11ade17c09e47689e16bd9ed077975a
83d17e75c4c84777bd0718c176082df4
saju@ubuntu:~$
saju@ubuntu:~$
saju@ubuntu:~$