Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

i found the workaround to make this all work, first error is

2016-12-08 14:41:42.642 10537 ERROR cinder.cmd.volume CappedVersionUnknown: Unrecoverable Error: Versioned Objects in DB are capped to unknown version 1.11.

vim /usr/lib/python2.7/dist-packages/cinder/objects/base.py

# Hacked by messeiry error in version 1.11, this will add version 1.11 to the supported versions, the code on Githib is uch uipdated than this one, 
OBJ_VERSIONS.add('1.11', {'GroupSnapshot': '1.0', 'GroupSnapshotList': '1.0','Group': '1.1'})

after that i recieve the following errors and i edited those files to work around it, it's basically an issue with the version i have installed for cinder-volume and schedukler, but also a problem in the oslo-messaging.these should be update on the openstack documentation for newton. otherwise such installations will fail. i will try at some other time to replicate the issue with different installation p[ackages or just deploy directly from source on github.

the following error appeared

2016-12-09 11:50:31.349 94962 INFO oslo_service.service [req-da18d2d1-4048-4f26-9288-bc88061822b8 - - - - -] Child 109572 exited with status 1
2016-12-09 11:50:31.358 109601 INFO cinder.service [-] Starting cinder-volume node (version 8.1.1)
2016-12-09 11:50:31.360 109601 INFO cinder.volume.manager [req-f861837a-c0a8-47b4-9264-93dfc3d76d65 - - - - -] Starting volume driver LVMVolumeDriver (3.0.0)
2016-12-09 11:50:32.241 109601 ERROR oslo_service.service [req-f861837a-c0a8-47b4-9264-93dfc3d76d65 - - - - -] Error starting thread.
2016-12-09 11:50:32.241 109601 ERROR oslo_service.service Traceback (most recent call last):
2016-12-09 11:50:32.241 109601 ERROR oslo_service.service   File "/usr/lib/python2.7/dist-packages/oslo_service/service.py", line 680, in run_service
2016-12-09 11:50:32.241 109601 ERROR oslo_service.service     service.start()
2016-12-09 11:50:32.241 109601 ERROR oslo_service.service   File "/usr/lib/python2.7/dist-packages/cinder/service.py", line 166, in start
2016-12-09 11:50:32.241 109601 ERROR oslo_service.service     self.manager.init_host()
2016-12-09 11:50:32.241 109601 ERROR oslo_service.service   File "/usr/lib/python2.7/dist-packages/cinder/volume/manager.py", line 513, in init_host
2016-12-09 11:50:32.241 109601 ERROR oslo_service.service     self.publish_service_capabilities(ctxt)
2016-12-09 11:50:32.241 109601 ERROR oslo_service.service   File "/usr/lib/python2.7/dist-packages/cinder/volume/manager.py", line 2047, in publish_service_capabilities
2016-12-09 11:50:32.241 109601 ERROR oslo_service.service     self._publish_service_capabilities(context)
2016-12-09 11:50:32.241 109601 ERROR oslo_service.service   File "/usr/lib/python2.7/dist-packages/cinder/manager.py", line 173, in _publish_service_capabilities
2016-12-09 11:50:32.241 109601 ERROR oslo_service.service     self.last_capabilities)
2016-12-09 11:50:32.241 109601 ERROR oslo_service.service   File "/usr/lib/python2.7/dist-packages/cinder/scheduler/rpcapi.py", line 165, in update_service_capabilities
2016-12-09 11:50:32.241 109601 ERROR oslo_service.service     capabilities=capabilities)
2016-12-09 11:50:32.241 109601 ERROR oslo_service.service   File "/usr/lib/python2.7/dist-packages/oslo_messaging/rpc/client.py", line 135, in cast
2016-12-09 11:50:32.241 109601 ERROR oslo_service.service     if self.version_cap:
2016-12-09 11:50:32.241 109601 ERROR oslo_service.service   File "/usr/lib/python2.7/dist-packages/oslo_messaging/rpc/client.py", line 120, in _check_version_cap
2016-12-09 11:50:32.241 109601 ERROR oslo_service.service     def can_send_version(self, version=_marker):
2016-12-09 11:50:32.241 109601 ERROR oslo_service.service RPCVersionCapError: Messeiry is debugging ------>1.0and the version_cap3.0
2016-12-09 11:50:32.241 109601 ERROR oslo_service.service Requested message version, 3.0 is incompatible.  It needs to be equal in major version and less than or equal in minor version as the specified version cap 3.0.
2016-12-09 11:50:32.241 109601 ERROR oslo_service.service

edit the following file

vim /usr/lib/python2.7/dist-packages/oslo_messaging/rpc/client.py

navigate and change one line as below

def cast(self, ctxt, method, **kwargs):
        """Invoke a method and return immediately. See RPCClient.cast()."""
        msg = self._make_message(ctxt, method, kwargs)
        ctxt = self.serializer.serialize_context(ctxt)
        # Hacked by Messeiry: this is to force the application to state same versions, by this we should fix error 
        # ERROR  oslo_service.service Requested message version, 3.0 is incompatible
        self.version = 3.0
        self.version_cap = 3.0

        if self.version_cap:
            self._check_version_cap(msg.get('version'))
        try:
            self.transport._send(self.target, ctxt, msg, retry=self.retry)
        except driver_base.TransportDriverError as ex:
            raise ClientSendError(self.target, ex)

another error appeared

2016-12-09 11:53:14.523 114955 INFO cinder.service [-] Starting cinder-volume node (version 8.1.1)
2016-12-09 11:53:14.525 114955 INFO cinder.volume.manager [req-8bc4355d-a4f2-41f7-8c60-83a1c0c46e18 - - - - -] Starting volume driver LVMVolumeDriver (3.0.0)
2016-12-09 11:53:15.366 114955 ERROR oslo_service.service [req-8bc4355d-a4f2-41f7-8c60-83a1c0c46e18 - - - - -] Error starting thread.
2016-12-09 11:53:15.366 114955 ERROR oslo_service.service Traceback (most recent call last):
2016-12-09 11:53:15.366 114955 ERROR oslo_service.service   File "/usr/lib/python2.7/dist-packages/oslo_service/service.py", line 680, in run_service
2016-12-09 11:53:15.366 114955 ERROR oslo_service.service     service.start()
2016-12-09 11:53:15.366 114955 ERROR oslo_service.service   File "/usr/lib/python2.7/dist-packages/cinder/service.py", line 166, in start
2016-12-09 11:53:15.366 114955 ERROR oslo_service.service     self.manager.init_host()
2016-12-09 11:53:15.366 114955 ERROR oslo_service.service   File "/usr/lib/python2.7/dist-packages/cinder/volume/manager.py", line 513, in init_host
2016-12-09 11:53:15.366 114955 ERROR oslo_service.service     self.publish_service_capabilities(ctxt)
2016-12-09 11:53:15.366 114955 ERROR oslo_service.service   File "/usr/lib/python2.7/dist-packages/cinder/volume/manager.py", line 2047, in publish_service_capabilities
2016-12-09 11:53:15.366 114955 ERROR oslo_service.service     self._publish_service_capabilities(context)
2016-12-09 11:53:15.366 114955 ERROR oslo_service.service   File "/usr/lib/python2.7/dist-packages/cinder/manager.py", line 173, in _publish_service_capabilities
2016-12-09 11:53:15.366 114955 ERROR oslo_service.service     self.last_capabilities)
2016-12-09 11:53:15.366 114955 ERROR oslo_service.service   File "/usr/lib/python2.7/dist-packages/cinder/scheduler/rpcapi.py", line 165, in update_service_capabilities
2016-12-09 11:53:15.366 114955 ERROR oslo_service.service     capabilities=capabilities)
2016-12-09 11:53:15.366 114955 ERROR oslo_service.service   File "/usr/lib/python2.7/dist-packages/oslo_messaging/rpc/client.py", line 136, in cast
2016-12-09 11:53:15.366 114955 ERROR oslo_service.service     self._check_version_cap(msg.get('version'))
2016-12-09 11:53:15.366 114955 ERROR oslo_service.service   File "/usr/lib/python2.7/dist-packages/oslo_messaging/rpc/client.py", line 116, in _check_version_cap
2016-12-09 11:53:15.366 114955 ERROR oslo_service.service     if not utils.version_is_compatible(self.version_cap, version):
2016-12-09 11:53:15.366 114955 ERROR oslo_service.service   File "/usr/lib/python2.7/dist-packages/oslo_messaging/_utils.py", line 26, in version_is_compatible
2016-12-09 11:53:15.366 114955 ERROR oslo_service.service     imp_version_parts = imp_version.split('.')
2016-12-09 11:53:15.366 114955 ERROR oslo_service.service AttributeError: 'float' object has no attribute 'split'

edit this file

vi /usr/lib/python2.7/dist-packages/oslo_messaging/_utils.py

change these line accordingly

def version_is_compatible(imp_version, version):
    """Determine whether versions are compatible.

    :param imp_version: The version implemented
    :param version: The version requested by an incoming message.
    """
    # Hacked by Messeiry as temp fix, the log was showing an error that version dont have a function called split probably a data tytpe error
    # i return True to hack the function not to check for version compatability, this should have been happening in the function the initialize the cinder-volume in the installation stage not here, so something is wrong with the repos.
    # i would recommend to sudo apt-get update first befoe installation on all servers. also to do the openstack deployment at the same time not with gapes, 
    return True
    version_parts = version.split('.')
    imp_version_parts = imp_version.split('.')
    try:
        rev = version_parts[2]
    except IndexError:
        rev = 0
    try:
        imp_rev = imp_version_parts[2]
    except IndexError:
        imp_rev = 0

    if int(version_parts[0]) != int(imp_version_parts[0]):  # Major
        return False
    if int(version_parts[1]) > int(imp_version_parts[1]):  # Minor
        return False
    if (int(version_parts[1]) == int(imp_version_parts[1]) and
            int(rev) > int(imp_rev)):  # Revision
        return False
    return True

now try to restart the services

its started correctly

2016-12-09 11:53:22.858 115137 INFO cinder.rpc [req-3aa35524-674d-4614-b03e-fa59547ea91f - - - - -] Automatically selected cinder-scheduler objects version 1.11 as minimum service version.
2016-12-09 11:53:22.864 115137 INFO cinder.rpc [req-3aa35524-674d-4614-b03e-fa59547ea91f - - - - -] Automatically selected cinder-scheduler RPC version 3.0 as minimum service version.
2016-12-09 11:53:22.915 115137 INFO cinder.volume.manager [req-3aa35524-674d-4614-b03e-fa59547ea91f - - - - -] Determined volume DB was empty at startup.
2016-12-09 11:53:22.930 115137 INFO cinder.volume.manager [req-3aa35524-674d-4614-b03e-fa59547ea91f - - - - -] Image-volume cache disabled for host cinder@cinder.
2016-12-09 11:53:22.932 115137 INFO oslo_service.service [req-3aa35524-674d-4614-b03e-fa59547ea91f - - - - -] Starting 1 workers
2016-12-09 11:53:22.947 115151 INFO cinder.service [-] Starting cinder-volume node (version 8.1.1)
2016-12-09 11:53:22.949 115151 INFO cinder.volume.manager [req-91d17980-06ea-4844-bfa6-99c17df20839 - - - - -] Starting volume driver LVMVolumeDriver (3.0.0)
2016-12-09 11:53:23.822 115151 INFO cinder.volume.manager [req-91d17980-06ea-4844-bfa6-99c17df20839 - - - - -] Driver initialization completed successfully.
2016-12-09 11:53:23.870 115151 INFO cinder.volume.manager [req-91d17980-06ea-4844-bfa6-99c17df20839 - - - - -] Initializing RPC dependent components of volume driver LVMVolumeDriver (3.0.0)

also checking the services of cinder-manager

root@controller:/home/messeiry# cinder-manage service list 
Option "verbose" from group "DEFAULT" is deprecated for removal.  Its value may be silently ignored in the future.
Binary           Host                                 Zone             Status     State Updated At           RPC Version  Object Version  Cluster                             
cinder-scheduler controller                           nova             enabled    :-)   2016-12-09 19:54:21  3.0          1.11                                                
cinder-volume    cinder@cinder                        nova             enabled    :-)   2016-12-09 19:54:24  2.0          1.3

try to create a volume from the horizon dash and check lvmdisplay

2016-12-09 11:57:26.741 115151 INFO cinder.volume.flows.manager.create_volume [req-2db2033b-255e-451d-bc14-d0c4131387b4 82417961bc49405dac0488e88ea97c4e 40ac102db6b044bc942e46e6ce54ceaf - default default] Volume eb7fd35c-22b1-4735-a987-d60afcd844ca: being created as raw with specification: {'status': u'creating', 'volume_size': 1, 'volume_name': 'volume-eb7fd35c-22b1-4735-a987-d60afcd844ca'}
2016-12-09 11:57:27.279 115151 INFO cinder.volume.flows.manager.create_volume [req-2db2033b-255e-451d-bc14-d0c4131387b4 82417961bc49405dac0488e88ea97c4e 40ac102db6b044bc942e46e6ce54ceaf - default default] Volume volume-eb7fd35c-22b1-4735-a987-d60afcd844ca (eb7fd35c-22b1-4735-a987-d60afcd844ca): created successfully
2016-12-09 11:57:27.284 115151 INFO cinder.volume.manager [req-2db2033b-255e-451d-bc14-d0c4131387b4 82417961bc49405dac0488e88ea97c4e 40ac102db6b044bc942e46e6ce54ceaf - default default] Created volume successfully.

now the volume is created :) finally i can work

root@cinder:/home/messeiry# lvdisplay 
  --- Logical volume ---
  LV Path                /dev/cinder-volumes/volume-eb7fd35c-22b1-4735-a987-d60afcd844ca
  LV Name                volume-eb7fd35c-22b1-4735-a987-d60afcd844ca
  VG Name                cinder-volumes
  LV UUID                mwKDdl-LUy7-FyRn-OsC0-ZJe2-Edtz-IGQrF0
  LV Write Access        read/write
  LV Creation host, time cinder, 2016-12-09 11:57:26 -0800
  LV Status              available
  # open                 0
  LV Size                1.00 GiB
  Current LE             256
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           252:0