[Bug 1715024] Re: Cinder-WSGI cannot find api-paste.ini - Ubuntu

James Page james.page at ubuntu.com
Mon Sep 18 08:17:39 UTC 2017


** Changed in: cinder (Ubuntu)
   Importance: Undecided => High

** Changed in: cinder (Ubuntu)
       Status: Confirmed => Triaged

** Changed in: cinder (Ubuntu)
     Assignee: (unassigned) => James Page (james-page)

-- 
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to cinder in Ubuntu.
https://bugs.launchpad.net/bugs/1715024

Title:
  Cinder-WSGI cannot find api-paste.ini - Ubuntu

Status in Cinder:
  Invalid
Status in cinder package in Ubuntu:
  Triaged

Bug description:
  I upgraded Ocata to Pike and am getting error in apache2
  cinder_error.log when trying to list volumes via API or Horizon:

  root at cinder-test:/var/log/apache2# tail -f cinder_error.log
  2017-09-04 15:30:52.587013 mod_wsgi (pid=1847): Target WSGI script '/usr/bin/cinder-wsgi' cannot be loaded as Python module.
  2017-09-04 15:30:52.587099 mod_wsgi (pid=1847): Exception occurred processing WSGI script '/usr/bin/cinder-wsgi'.
  2017-09-04 15:30:52.587126 Traceback (most recent call last):
  2017-09-04 15:30:52.587147   File "/usr/bin/cinder-wsgi", line 51, in <module>
  2017-09-04 15:30:52.587220     application = initialize_application()
  2017-09-04 15:30:52.587235   File "/usr/lib/python2.7/dist-packages/cinder/wsgi/wsgi.py", line 46, in initialize_application
  2017-09-04 15:30:52.588456     return wsgi.Loader(CONF).load_app(name='osapi_volume')
  2017-09-04 15:30:52.588480   File "/usr/lib/python2.7/dist-packages/oslo_service/wsgi.py", line 340, in __init__
  2017-09-04 15:30:52.589984     raise ConfigNotFound(path=config_path)
  2017-09-04 15:30:52.590011 ConfigNotFound: Could not find config at api-paste.ini

  Also did fresh controller install (Pike) on a test machine to see if I
  could replicate, using instructions: https://docs.openstack.org
  /install-guide/openstack-services.html#minimal-deployment

  I get the same error, following docs closely.

  Here is some output of the environment:

  Ubuntu 16.04.3 LTS (GNU/Linux 4.4.0-93-generic x86_64)

  ################# PERMISSIONS  ########################

  root at cinder-test:/etc/cinder# ls -aFl
  total 36
  drwxr-x---   3 root cinder 4096 Sep  4 15:10 ./
  drwxr-xr-x 105 root root   4096 Sep  4 15:30 ../
  -rw-r--r--   1 root cinder 2711 Aug 30 11:07 api-paste.ini
  -rw-r--r--   1 root cinder  812 Sep  4 15:10 cinder.conf
  -rw-r--r--   1 root cinder 1359 Aug 30 13:11 logging.conf
  -rw-r--r--   1 root cinder 7708 Aug 30 11:07 policy.json
  -rw-r--r--   1 root root    991 Aug 30 11:07 rootwrap.conf
  drwxr-xr-x   2 root root   4096 Aug 31 11:49 rootwrap.d/

  ################# API-PASTE.INI  ########################

  #############
  # OpenStack #
  #############

  [composite:osapi_volume]
  use = call:cinder.api:root_app_factory
  /: apiversions
  /v1: openstack_volume_api_v1
  /v2: openstack_volume_api_v2
  /v3: openstack_volume_api_v3

  [composite:openstack_volume_api_v1]
  use = call:cinder.api.middleware.auth:pipeline_factory
  noauth = cors http_proxy_to_wsgi request_id faultwrap sizelimit osprofiler noauth apiv1
  keystone = cors http_proxy_to_wsgi request_id faultwrap sizelimit osprofiler authtoken keystonecontext apiv1
  keystone_nolimit = cors http_proxy_to_wsgi request_id faultwrap sizelimit osprofiler authtoken keystonecontext apiv1

  [composite:openstack_volume_api_v2]
  use = call:cinder.api.middleware.auth:pipeline_factory
  noauth = cors http_proxy_to_wsgi request_id faultwrap sizelimit osprofiler noauth apiv2
  keystone = cors http_proxy_to_wsgi request_id faultwrap sizelimit osprofiler authtoken keystonecontext apiv2
  keystone_nolimit = cors http_proxy_to_wsgi request_id faultwrap sizelimit osprofiler authtoken keystonecontext apiv2

  [composite:openstack_volume_api_v3]
  use = call:cinder.api.middleware.auth:pipeline_factory
  noauth = cors http_proxy_to_wsgi request_id faultwrap sizelimit osprofiler noauth apiv3
  keystone = cors http_proxy_to_wsgi request_id faultwrap sizelimit osprofiler authtoken keystonecontext apiv3
  keystone_nolimit = cors http_proxy_to_wsgi request_id faultwrap sizelimit osprofiler authtoken keystonecontext apiv3

  [filter:request_id]
  paste.filter_factory = oslo_middleware.request_id:RequestId.factory

  [filter:http_proxy_to_wsgi]
  paste.filter_factory = oslo_middleware.http_proxy_to_wsgi:HTTPProxyToWSGI.factory

  [filter:cors]
  paste.filter_factory = oslo_middleware.cors:filter_factory
  oslo_config_project = cinder

  [filter:faultwrap]
  paste.filter_factory = cinder.api.middleware.fault:FaultWrapper.factory

  [filter:osprofiler]
  paste.filter_factory = osprofiler.web:WsgiMiddleware.factory

  [filter:noauth]
  paste.filter_factory = cinder.api.middleware.auth:NoAuthMiddleware.factory

  [filter:sizelimit]
  paste.filter_factory = oslo_middleware.sizelimit:RequestBodySizeLimiter.factory

  [app:apiv1]
  paste.app_factory = cinder.api.v1.router:APIRouter.factory

  [app:apiv2]
  paste.app_factory = cinder.api.v2.router:APIRouter.factory

  [app:apiv3]
  paste.app_factory = cinder.api.v3.router:APIRouter.factory

  [pipeline:apiversions]
  pipeline = cors http_proxy_to_wsgi faultwrap osvolumeversionapp

  [app:osvolumeversionapp]
  paste.app_factory = cinder.api.versions:Versions.factory

  ##########
  # Shared #
  ##########

  [filter:keystonecontext]
  paste.filter_factory = cinder.api.middleware.auth:CinderKeystoneContext.factory

  [filter:authtoken]
  paste.filter_factory = keystonemiddleware.auth_token:filter_factory

  ################# CINDER.CONF  ########################

  [DEFAULT]
  rootwrap_config = /etc/cinder/rootwrap.conf
  api_paste_confg = /etc/cinder/api-paste.ini
  iscsi_helper = tgtadm
  volume_name_template = volume-%s
  volume_group = cinder-volumes
  verbose = True
  auth_strategy = keystone
  state_path = /var/lib/cinder
  lock_path = /var/lock/cinder
  volumes_dir = /var/lib/cinder/volumes
  enabled_backends = lvm
  transport_url = rabbit://openstack:openstack@controller
  my_ip = 10.1.1.22

  [database]
  connection = mysql+pymysql://cinder:openstack@controller/cinder

  [keystone_authtoken]
  auth_uri = http://controller:5000
  auth_url = http://controller:35357
  memcached_servers = controller:11211
  auth_type = password
  project_domain_name = default
  user_domain_name = default
  project_name = service
  username = cinder
  password = openstack

  [oslo_concurrency]
  lock_path = /var/lib/cinder/tmp

  ################# APACHE WSGI  ########################

  Listen 8776
  LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\" %D(us)" cinder_combined

  <VirtualHost *:8776>
      WSGIDaemonProcess cinder-wsgi processes=5 threads=1 user=cinder display-name=%{GROUP}
      WSGIProcessGroup cinder-wsgi
      WSGIScriptAlias / /usr/bin/cinder-wsgi
      WSGIApplicationGroup %{GLOBAL}
      WSGIPassAuthorization On
      <IfVersion >= 2.4>
        ErrorLogFormat "%{cu}t %M"
      </IfVersion>

      ErrorLog /var/log/apache2/cinder_error.log
      CustomLog /var/log/apache2/cinder.log cinder_combined

      <Directory /usr/bin>
  <IfVersion >= 2.4>
              Require all granted
          </IfVersion>
          <IfVersion < 2.4>
              Order allow,deny
              Allow from all
          </IfVersion>
      </Directory>
  </VirtualHost>

To manage notifications about this bug go to:
https://bugs.launchpad.net/cinder/+bug/1715024/+subscriptions



More information about the Ubuntu-openstack-bugs mailing list