M->N->O upgrade cinder api returns ERROR: Internal Server Error (HTTP 500)

Bug #1685750 reported by Sofer Athlan-Guyot
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Critical
Sofer Athlan-Guyot

Bug Description

Originally reported there https://bugzilla.redhat.com/show_bug.cgi?id=1444643

When doing a M->N->O upgrade, cinder doesn't work with:

[root@controller-0 heat-admin]# tail -1 /var/log/httpd/cinder_wsgi_error.log
[Sun Apr 23 14:43:30.733678 2017] [:error] [pid 10112] [remote 172.17.1.12:360] ImportError: No module named sizelimit

In /etc/cinder/api-paste.ini:
[filter:sizelimit]
paste.filter_factory = cinder.api.middleware.sizelimit:RequestBodySizeLimiter.factory

Doing:

sed -i s/cinder.api.middleware.sizelimit/oslo_middleware.sizelimit/ /etc/cinder/api-paste.ini

fixes it.

Revision history for this message
Sofer Athlan-Guyot (sofer-athlan-guyot) wrote :

Setting this to critical as it breaks all upgraded ssl environment which have been deployed in Mitaka "by default".

Changed in tripleo:
importance: Undecided → Critical
Revision history for this message
Sofer Athlan-Guyot (sofer-athlan-guyot) wrote :

Hi,

so in stable/mitaka when you enabled ssl you had that code[1] which modifies the /etc/cinder/api-paste.ini file.

From there on the packaging replacement wouldn't take place anymore and we have instead /etc/cinder/api-paste.ini.rpmnew file created.

In stable/newton this mechanism was removed[2] so upgrading from newton to ocata let the packaging system replace the api-paste.ini.

In no-ssl deployment this wouldn't occur as well as the packaging system would kick in and replace that file.

[1] https://github.com/openstack/puppet-tripleo/blob/stable/mitaka/manifests/ssl/cinder_config.pp#L21..L29

[2] https://review.openstack.org/#/c/322078/

Revision history for this message
Sofer Athlan-Guyot (sofer-athlan-guyot) wrote :

Note that this is really a newton only patch.

Changed in tripleo:
assignee: nobody → Sofer Athlan-Guyot (sofer-athlan-guyot)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-heat-templates (stable/newton)

Fix proposed to branch: stable/newton
Review: https://review.openstack.org/459271

Changed in tripleo:
milestone: pike-2 → pike-3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-heat-templates (stable/newton)

Reviewed: https://review.openstack.org/459271
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=016140bc9ebd6a3b9d7616b88ccba54fbc7394a2
Submitter: Jenkins
Branch: stable/newton

commit 016140bc9ebd6a3b9d7616b88ccba54fbc7394a2
Author: Sofer Athlan-Guyot <email address hidden>
Date: Mon Apr 24 14:40:32 2017 +0200

    Cleanup cinder paste configuration for ssl.

    Newton-only.

    Now that wsgi is used[1] we no longer have to configure the ssl in the
    paste-api.conf file.

    We remove it and revert it back to mitaka's values so that the cinder
    package upgrade replace the file with the new version.

    We add a basic check of the expected change to minimize the chance to
    override real user change.

    The sed is necessary to remove the last empty in order for the file's
    md5 is the same as the original[2]

    [1] https://review.openstack.org/#/q/topic:deprecate_cinder_ssl
    [2] nice table of %config tag http://people.ds.cam.ac.uk/jw35/docs/rpm_config.html

    Closes-Bug: #1685750

    Change-Id: I53fee2314830193ecfdd8a1d92508ff855450611

tags: added: in-stable-newton
Revision history for this message
Emilien Macchi (emilienm) wrote :

Sofer, can we close this one now the patch is merged into stable/newton? Please update the bug report, thanks!

Changed in tripleo:
status: Confirmed → Triaged
Revision history for this message
Sofer Athlan-Guyot (sofer-athlan-guyot) wrote :

This is merged and verified (by me), we can close it. Not sure in which release it has been integrated though.

Changed in tripleo:
status: Triaged → Fix Committed
Changed in tripleo:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-heat-templates 5.3.1

This issue was fixed in the openstack/tripleo-heat-templates 5.3.1 release.

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.