cinder-volume AttributeError

asked 2017-01-05 03:40:23 -0600

bertly gravatar image

updated 2017-01-06 04:34:10 -0600

Hi, just upgraded from Mitaka to Newton and Ubuntu 16.04 and now getting a python error for cinder-volume.

# /etc/init.d/cinder-volume systemd-start
Traceback (most recent call last):
  File "/usr/bin/cinder-volume", line 6, in <module>
    from cinder.cmd.volume import main
  File "/usr/lib/python2.7/dist-packages/cinder/cmd/volume.py", line 39, in <module>
    from oslo_privsep import priv_context
  File "/usr/lib/python2.7/dist-packages/oslo_privsep/priv_context.py", line 27, in <module>
    from oslo_privsep import daemon
  File "/usr/lib/python2.7/dist-packages/oslo_privsep/daemon.py", line 213, in <module>
    def _fd_logger(level=logging.WARN):
AttributeError: 'module' object has no attribute 'WARN'

Any idea why this is happening?

Thanks

bert

UPDATE:

# dpkg -l cinder-volume
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                                                                      Version                                   Architecture                              Description
+++-=========================================================================-=========================================-=========================================-========================================================================================================================================================
ii  cinder-volume                                                             2:9.0.0-0ubuntu1~cloud0                   all                                       Cinder storage service - Volume server

/etc/cinder/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
state_path = /var/lib/cinder
lock_path = /var/lock/cinder
volumes_dir = /var/lib/cinder/volumes
auth_strategy = keystone
my_ip = 10.10.102.6
enabled_backends = ceph
glance_api_servers = http://controller:9292
transport_url = rabbit://openstack:SECRETPW@controller

[database]
connection = mysql+pymysql://cinder:SECRETPW@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 = SECRETPW

[ceph]
volume_driver = cinder.volume.drivers.rbd.RBDDriver
rbd_pool = volumes
rbd_ceph_conf = /etc/ceph/ceph.conf
rbd_flatten_volume_from_snapshot = false
rbd_max_clone_depth = 5
rbd_store_chunk_size = 4
rados_connect_timeout = -1
glance_api_version = 2
rbd_user = cinder
rbd_secret_uuid = 41d2271d-fb04-416b-8844-90929b45d783
volume_backend_name = ceph

Do you see something suspicious? Unfortunately I dont have any other log, which is a little bit weird I think (or its the systemd way...)

UPDATE2:

removed all cinder and python packages for oslo. Now I am getting this:

Setting up cinder-common (2:9.0.0-0ubuntu1~cloud0) ...
Traceback (most recent call last):
  File "/usr/bin/cinder-manage", line 6, in <module>
    from cinder.cmd.manage import main
  File "/usr/lib/python2.7/dist-packages/cinder/cmd/manage.py", line 76, in <module>
    from cinder import context
  File "/usr/lib/python2.7/dist-packages/cinder/context.py", line 29, in <module>
    from cinder import policy
  File "/usr/lib/python2.7/dist-packages/cinder/policy.py", line 21, in <module>
    from oslo_policy import policy
  File "/usr/local/lib/python2.7/dist-packages/oslo_policy/policy.py", line 215, in <module>
    from oslo_policy.openstack.common import fileutils
  File "/usr/local/lib/python2.7/dist-packages/oslo_policy/openstack/common/fileutils.py", line 23, in <module>
    from oslo.utils import excutils
ImportError: No module named utils
dpkg: error processing package cinder-common (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of cinder-volume:
 cinder-volume depends on cinder-common (= 2:9.0.0-0ubuntu1~cloud0); however:
  Package cinder-common is not configured yet.

dpkg: error processing package cinder-volume (--configure):
 dependency problems - leaving unconfigured
Processing triggers for libc-bin (2.23-0ubuntu5) ...
No apport report written because the error message indicates its a ...
(more)
edit retag flag offensive close merge delete

Comments

Have you updated all packages in the node or just cinder?

Eduardo Gonzalez gravatar imageEduardo Gonzalez ( 2017-01-05 04:27:58 -0600 )edit

updated all packages (dist-upgrade) and upgraded the openstack packages to newton

bertly gravatar imagebertly ( 2017-01-05 05:03:47 -0600 )edit

AFIK, this can be an issue with an oslo_log or oslo_privsep libraries.A quick look at the code, seems that libraries are correctly imported and used. Another issue may be a malformed option into cinder config files, check log_levels or debug

Eduardo Gonzalez gravatar imageEduardo Gonzalez ( 2017-01-05 05:23:12 -0600 )edit

In the past, cinder packages had issues that config into /usr/share/cinder had precedence over options in /etc/cinder. Maybe the issue can come from there. Or an issue with the upgrade process. Upgraded python version?

Eduardo Gonzalez gravatar imageEduardo Gonzalez ( 2017-01-05 05:24:51 -0600 )edit

Do you have other logs but systemd logs, the ones in /var/log/cinder? Also configuration files would be helpful if there is an error, or missed change something after upgrade. egrep ^[^#] /etc/cinder/<file>

Eduardo Gonzalez gravatar imageEduardo Gonzalez ( 2017-01-05 05:56:05 -0600 )edit