when enabling ssl need to restart backend service before apache

Bug #1477137 reported by Edward Hope-Morley
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
OpenStack Glance Charm
Expired
High
Unassigned
glance (Juju Charms Collection)
Invalid
High
Unassigned
keystone (Juju Charms Collection)
Invalid
High
Unassigned

Bug Description

If i deploy keystone in http mode (use-https=no, https-service-endpoints=False) then I enable https, i get an error [1] in the leader unit because the charm wants to connect to keystone on port 35337 yet keystone is still listening on 35347 because it was not restarted after its conf file was changed. Result is that apache wants to claim port 35347 and forward to keystone on 35337 but keystone was not properly restarted when its admin_port was changed so apache fails to start. This is resolved by simply restarting keystone then apache and in that order.

[1] http://paste.ubuntu.com/11919790/

Changed in keystone (Juju Charms Collection):
milestone: none → 15.07
importance: Undecided → High
James Page (james-page)
Changed in keystone (Juju Charms Collection):
milestone: 15.07 → 15.10
James Page (james-page)
Changed in keystone (Juju Charms Collection):
status: New → Triaged
tags: added: canonical-bootstack
Changed in keystone (Juju Charms Collection):
milestone: 15.10 → 16.01
Revision history for this message
Edward Hope-Morley (hopem) wrote :

I am now also seeing this happen with the Glance charm but to be honest this is an issue that all our SSL-enabled charms will be prone to until they implement strictly ordered restarts i.e. stop(apache2, haproxy, <service>) then start(<service> -> haproxy -> apache2)

Changed in glance (Juju Charms Collection):
status: New → Triaged
importance: Undecided → High
milestone: none → 16.01
tags: added: openstack sts
Changed in glance (Juju Charms Collection):
assignee: nobody → Edward Hope-Morley (hopem)
Changed in keystone (Juju Charms Collection):
assignee: nobody → Edward Hope-Morley (hopem)
Changed in glance (Juju Charms Collection):
status: Triaged → In Progress
Changed in keystone (Juju Charms Collection):
status: Triaged → In Progress
Revision history for this message
James Page (james-page) wrote : Re: [Bug 1477137] Re: when enabling ssl need to restart keystone before apache

use of stopstart=true should fix this up

On Wed, Dec 2, 2015 at 11:13 AM, Edward Hope-Morley <
<email address hidden>> wrote:

> ** Changed in: glance (Juju Charms Collection)
> Assignee: (unassigned) => Edward Hope-Morley (hopem)
>
> ** Changed in: keystone (Juju Charms Collection)
> Assignee: (unassigned) => Edward Hope-Morley (hopem)
>
> ** Changed in: glance (Juju Charms Collection)
> Status: Triaged => In Progress
>
> ** Changed in: keystone (Juju Charms Collection)
> Status: Triaged => In Progress
>
> --
> You received this bug notification because you are a member of OpenStack
> Charmers, which is subscribed to glance in Juju Charms Collection.
> https://bugs.launchpad.net/bugs/1477137
>
> Title:
> when enabling ssl need to restart keystone before apache
>
> Status in glance package in Juju Charms Collection:
> In Progress
> Status in keystone package in Juju Charms Collection:
> In Progress
>
> Bug description:
> If i deploy keystone in http mode (use-https=no, https-service-
> endpoints=False) then I enable https, i get an error [1] in the leader
> unit because the charm wants to connect to keystone on port 35337 yet
> keystone is still listening on 35347 because it was not restarted
> after its conf file was changed. Result is that apache wants to claim
> port 35347 and forward to keystone on 35337 but keystone was not
> properly restarted when its admin_port was changed so apache fails to
> start. This is resolved by simply restarting keystone then apache and
> in that order.
>
> [1] http://paste.ubuntu.com/11919790/
>
> To manage notifications about this bug go to:
>
> https://bugs.launchpad.net/charms/+source/glance/+bug/1477137/+subscriptions
>

James Page (james-page)
Changed in keystone (Juju Charms Collection):
milestone: 16.01 → 16.04
Changed in glance (Juju Charms Collection):
milestone: 16.01 → 16.04
summary: - when enabling ssl need to restart keystone before apache
+ when enabling ssl need to restart backend service before apache
Changed in glance (Juju Charms Collection):
status: In Progress → Confirmed
Changed in keystone (Juju Charms Collection):
status: In Progress → Confirmed
Changed in glance (Juju Charms Collection):
assignee: Edward Hope-Morley (hopem) → nobody
Changed in keystone (Juju Charms Collection):
assignee: Edward Hope-Morley (hopem) → nobody
James Page (james-page)
Changed in keystone (Juju Charms Collection):
milestone: 16.04 → 16.07
Changed in glance (Juju Charms Collection):
milestone: 16.04 → 16.07
Liam Young (gnuoy)
Changed in keystone (Juju Charms Collection):
milestone: 16.07 → 16.10
Changed in glance (Juju Charms Collection):
milestone: 16.07 → 16.10
James Page (james-page)
Changed in keystone (Juju Charms Collection):
milestone: 16.10 → 17.01
Changed in glance (Juju Charms Collection):
milestone: 16.10 → 17.01
Liam Young (gnuoy)
Changed in keystone (Juju Charms Collection):
status: Confirmed → Invalid
Revision history for this message
Liam Young (gnuoy) wrote :

Marking as invalid for keystone as keystone now runs through mod_wsgi. However, it still looks to be an issue for glance. I don't think stopstart=true would fix this issue either. There seems to be a misconception that stopstart=true triggers all services to be stopped and then all started but it doesn't. Each service in turn is stopped and then immediately started (rather than restarted) meaning that ordering is still an issue

James Page (james-page)
Changed in charm-glance:
importance: Undecided → High
status: New → Confirmed
Changed in glance (Juju Charms Collection):
status: Confirmed → Invalid
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to charm-glance (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/587481

Revision history for this message
Nicolas Pochet (npochet) wrote :

Yesterday, I tested the following:
- Deploy a minimal test environment with Bionic and OpenStack Queens with HTTP only (see https://github.com/openstack/charm-glance/blob/1cc162e5e5c93b8e230a9586872c37a703bba9a7/tests/basic_deployment.py#L67-L89)
- Check that I can create/delete an image
- Change the configuration to HTTPS (ssl_cert, ssl_ca and ssl_key)
- Check that I can create/delete an image with the new HTTPS endpoint
- Create WIP test that automates that (see https://review.openstack.org/#/c/587481/)

And I could never observe what you described in this bug.
Could you tell if you encounter those symptoms again or if by chance that bug was already fixed?

Revision history for this message
Chris MacNaughton (chris.macnaughton) wrote :

Given Nicolas' comment, I'm marking this as incomplete pending an update where this is still being experienced.

Changed in charm-glance:
status: Confirmed → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for OpenStack glance charm because there has been no activity for 60 days.]

Changed in charm-glance:
status: Incomplete → Expired
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on charm-glance (master)

Change abandoned by Sean McGinnis (<email address hidden>) on branch: master
Review: https://review.opendev.org/587481
Reason: I don't believe this is needed now. Feel free to restore and update if it is.

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.