gnocchi install api runtime error numpy version 0xa 0xb

Bug #1724538 reported by Amin on 2017-10-18
This bug affects 3 people
Affects Status Importance Assigned to Milestone

Bug Description

TASK [os_gnocchi : Perform a Gnocchi DB sync] **********************************
Wednesday 18 October 2017 12:00:30 +0200 (0:00:00.009) 1:03:36.089 *****

fatal: [infra1_gnocchi_container-b43d8c33]: FAILED! => {"changed": false, "cmd": ["/openstack/venvs/gnocchi-15.1.9/bin/gnocchi-upgrade", "--create-legacy-resource-types"], "delta": "0:00:01.382816", "end": "2017-10-18 12:00:31.990877", "failed": true, "rc": 1, "start": "2017-10-18 12:00:30.608061", "stderr": "RuntimeError: module compiled against API version 0xb but this version of numpy is 0xa\nTraceback (most recent call last):\n File \"/openstack/venvs/gnocchi-15.1.9/bin/gnocchi-upgrade\", line 7, in <module>\n from gnocchi.cli import upgrade\n File \"/openstack/venvs/gnocchi-15.1.9/lib/python2.7/site-packages/gnocchi/\", line 36, in <module>\n from gnocchi import service\n File \"/openstack/venvs/gnocchi-15.1.9/lib/python2.7/site-packages/gnocchi/\", line 27, in <module>\n from gnocchi import opts\n File \"/openstack/venvs/gnocchi-15.1.9/lib/python2.7/site-packages/gnocchi/\", line 27, in <module>\n import\n File \"/openstack/venvs/gnocchi-15.1.9/lib/python2.7/site-packages/gnocchi/storage/\", line 22, in <module>\n from import _carbonara\n File \"/openstack/venvs/gnocchi-15.1.9/lib/python2.7/site-packages/gnocchi/storage/\", line 33, in <module>\n from gnocchi import carbonara\n File \"/openstack/venvs/gnocchi-15.1.9/lib/python2.7/site-packages/gnocchi/\", line 32, in <module>\n import pandas\n File \"/openstack/venvs/gnocchi-15.1.9/lib/python2.7/site-packages/pandas/\", line 35, in <module>\n \"the C extensions first.\".format(module))\nImportError: C extension: numpy.core.multiarray failed to import not built. If you want to import pandas from the source directory, you may need to run 'python build_ext --inplace --force' to build the C extensions first.", "stdout": "", "stdout_lines": [], "warnings": []}

Amin (pylot) on 2017-10-18
tags: added: in-stable-ocata
Changed in openstack-ansible:
status: New → Confirmed
importance: Undecided → Medium
Gökhan (skylightcoder) on 2017-10-26
Changed in openstack-ansible:
assignee: nobody → Gökhan (skylightcoder)
Gökhan (skylightcoder) wrote :

The message means the numpy used during pandas compilation is different from the numpy at runtime. This fail is about packaging problem. On Openstack-ansible all the pip packages are mirrored and fetched on the repo_server. so I realized that pandas version 0.21.0rc1 is installed but this version is not stable. it is not compatible with numpy 1.12.0 version. I asked gnocchi channel and they suggested using pandas stable version. So I tried it and it worked.

Submitter: Zuul
Branch: stable/ocata

commit 7fa88e5dec2f2828e3e0f44353932188eb9888ce
Author: gokhan.isik <email address hidden>
Date: Thu Oct 26 14:33:54 2017 +0300

    Constraint Pandas and Numpy for gnocchi

    The repo build is building pandas version 0.21.0rc1,
    incompatible with gnocchi and numpy. This comes because gnocchi
    isn't upper constrained, and the version to be installed is the
    latest one available (due to a >= requirement).

    We should instead constraint both pip packages to make possible
    to install gnocchi.

    Change-Id: If0e2cbebdbdebe7c71851d532b5f8629334b1aaf
    Closes-Bug: #1724538

This issue was fixed in the openstack/openstack-ansible-os_gnocchi 15.1.12 release.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers