WSGI support is broken on Debian/Ubuntu systems if we change default domain

Bug #1479783 reported by Emilien Macchi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
puppet-keystone
Fix Released
High
Emilien Macchi

Bug Description

Trying to run WSGI beaker tests on Ubuntu Trusty, I see some errors in the catalog.

2015-07-30 10:56:02.056 | Notice: /Stage[main]/Keystone/Keystone_domain[default_domain]/ensure: created
2015-07-30 10:56:02.056 | Info: /Stage[main]/Keystone/Keystone_domain[default_domain]: Scheduling refresh of Exec[restart_keystone]
2015-07-30 10:56:02.175 | Notice: /Stage[main]/Keystone/Exec[restart_keystone]/returns: httpd: unrecognized service
2015-07-30 10:56:02.175 | Error: /Stage[main]/Keystone/Exec[restart_keystone]: Failed to call refresh: service httpd restart returned 1 instead of one of [0]
2015-07-30 10:56:02.176 | Error: /Stage[main]/Keystone/Exec[restart_keystone]: service httpd restart returned 1 instead of one of [0]

Note: We did not see that before because we were running eventlet first so maybe it skipped that part since the Anchor was already created.

Logs:
http://logs.openstack.org/23/207223/1/check/gate-puppet-keystone-puppet-beaker-rspec-dsvm-trusty/dab9a0e/console.html
Patch that detects the failure: https://review.openstack.org/#/c/207223/

Changed in puppet-keystone:
importance: Undecided → High
Changed in puppet-keystone:
assignee: nobody → Emilien Macchi (emilienm)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to puppet-keystone (master)

Fix proposed to branch: master
Review: https://review.openstack.org/207478

Changed in puppet-keystone:
status: New → In Progress
summary: - WSGI support is broken on Debian/Ubuntu systems
+ WSGI support is broken on Debian/Ubuntu systems if we change default
+ domain
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to puppet-keystone (master)

Reviewed: https://review.openstack.org/207478
Committed: https://git.openstack.org/cgit/openstack/puppet-keystone/commit/?id=f654d3cd9b8ce57345823e544047b311856c7fa7
Submitter: Jenkins
Branch: master

commit f654d3cd9b8ce57345823e544047b311856c7fa7
Author: Emilien Macchi <email address hidden>
Date: Thu Jul 30 10:16:30 2015 -0400

    WSGI: use real service name in restart_keystone Exec

    Before, when running the Exec which restart Keystone service, we used
    $service_name but this is wrong because service_name can be keystone,
    openstack-keystone or httpd.
    On Ubuntu/Debian, Apache service name is not httpd but apache2.

    So the service could never be restarted if we were 1/ running
    Ubuntu/Debian 2/ changing the default domain name.

    This patch looks up in puppetlabs-apache the real Apache service name
    when $service_name is httpd (if WSGI is enabled and eventlet disabled).

    That way, we are sure the service name that will be used will the right
    one.
    Also add some unit tests that validate this change.

    Change-Id: I85226d862b63e227867ed43bc35d7fefc9e424cd
    Closes-bug: #1479783

Changed in puppet-keystone:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to puppet-keystone (stable/kilo)

Fix proposed to branch: stable/kilo
Review: https://review.openstack.org/208019

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to puppet-keystone (stable/kilo)

Reviewed: https://review.openstack.org/208019
Committed: https://git.openstack.org/cgit/openstack/puppet-keystone/commit/?id=fb19dec488ee0e9e72d368189c4cba7da17cbb37
Submitter: Jenkins
Branch: stable/kilo

commit fb19dec488ee0e9e72d368189c4cba7da17cbb37
Author: Emilien Macchi <email address hidden>
Date: Thu Jul 30 10:16:30 2015 -0400

    WSGI: use real service name in restart_keystone Exec

    Before, when running the Exec which restart Keystone service, we used
    $service_name but this is wrong because service_name can be keystone,
    openstack-keystone or httpd.
    On Ubuntu/Debian, Apache service name is not httpd but apache2.

    So the service could never be restarted if we were 1/ running
    Ubuntu/Debian 2/ changing the default domain name.

    This patch looks up in puppetlabs-apache the real Apache service name
    when $service_name is httpd (if WSGI is enabled and eventlet disabled).

    That way, we are sure the service name that will be used will the right
    one.
    Also add some unit tests that validate this change.

    Change-Id: I85226d862b63e227867ed43bc35d7fefc9e424cd
    Closes-bug: #1479783
    (cherry picked from commit f654d3cd9b8ce57345823e544047b311856c7fa7)

tags: added: in-stable-kilo
Changed in puppet-keystone:
status: Fix Committed → Fix Released
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.