nova-consoleauth service started twice on systemd machines

Bug #1693629 reported by Jorge Niedbalski
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Nova Cloud Controller Charm
Fix Released
Medium
Jorge Niedbalski

Bug Description

[Environment]

Xenial 16.04
OpenStack >= kilo.

[Description]

When using the nova-cloud-controller charm in HA with the config option single-nova-consoleauth
set to true, its expected for the nova-consoleauth service to be run in just a single unit at the time. The service management (start/stop) is performed by pacemaker in accordance with the cluster health using the OCF resource agent[0], so its required for the service to be disabled by default on upstart (trusty) or systemd (>=xenial).

This works on Trusty machines because is currently creating a manual override file for the service but isn't working properly for Xenial machines.

As an example, I deployed 3 units of NCC + hacluster and the service was started twice

nova 5555 1 2 20:55 ? 00:00:04 /usr/bin/python /usr/bin/nova-consoleauth --config-file=/etc/nova/nova.conf --log-file=/var/log/nova/nova-consoleauth.log
nova 24269 1 0 20:44 ? 00:00:04 /usr/bin/python /usr/bin/nova-consoleauth --config-file=/etc/nova/nova.conf

-- Unit nova-consoleauth.service has begun shutting down.
May 25 20:43:53 juju-c0d788-xenial-newton-22 systemd[1]: Stopped OpenStack Compute Console.
-- Subject: Unit nova-consoleauth.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit nova-consoleauth.service has finished shutting down.
May 25 20:55:34 juju-c0d788-xenial-newton-22 systemd[1]: Starting OpenStack Compute Console...
-- Subject: Unit nova-consoleauth.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit nova-consoleauth.service has begun starting up.
May 25 20:55:34 juju-c0d788-xenial-newton-22 systemd[1]: Started OpenStack Compute Console.
-- Subject: Unit nova-consoleauth.service has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit nova-consoleauth.service has finished starting up.

root@juju-c0d788-xenial-newton-22:/home/ubuntu# ps -xao pid,ppid,sid,comm | grep console
 5555 1 5555 nova-consoleauth
24269 1 24268 nova-consoleauth

[0]https://github.com/openstack/openstack-resource-agents/blob/master/ocf/nova-consoleauth

Tags: sts
Changed in charm-nova-cloud-controller:
importance: Undecided → Medium
assignee: nobody → Jorge Niedbalski (niedbalski)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-nova-cloud-controller (master)

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

Changed in charm-nova-cloud-controller:
status: New → In Progress
tags: added: sts
Revision history for this message
Jorge Niedbalski (niedbalski) wrote :

For the record,

This is a general check performed after running the proposed
change, http://pastebin.ubuntu.com/24706891/

The service is running in a single unit on a single service instance.

Changed in charm-nova-cloud-controller:
milestone: none → 17.08
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-nova-cloud-controller (master)

Reviewed: https://review.openstack.org/468955
Committed: https://git.openstack.org/cgit/openstack/charm-nova-cloud-controller/commit/?id=0d28006e1cd7db2f37a6faaeea266fed04c57ec7
Submitter: Jenkins
Branch: master

commit 0d28006e1cd7db2f37a6faaeea266fed04c57ec7
Author: Jorge Niedbalski <email address hidden>
Date: Mon May 29 13:52:31 2017 -0400

    Disable the nova-consoleauth service on HA.

    When using the nova-cloud-controller charm in HA with the config
    option single-nova-consoleauth set to true, its expected for the
    nova-consoleauth service to be run in just a single unit at the time.

    The service management (start/stop) is performed by pacemaker in
    accordance with the cluster health using the OCF resource agent[0].

    Its required for the service to be disabled by default on upstart (trusty)
    or systemd (>=xenial).

    This change disables the service by using the service_pause
    charmhelpers call which considers both cases (upstart/systemd) when
    the ha relation is present and the single-nova-consoleauth option is
    used.

    Also, this change fixes LP: #1660244 (Services not running that should be:
    nova-consoleauth) by removing it from the resource_map when
    ha + single-nova-consoleauth is used.

    [0] https://github.com/openstack/openstack-resource-agents/blob/master/ocf/nova-consoleauth

    Closes-Bug: #1693629
    Closes-Bug: #1660244

    Change-Id: Iaffe0456cceb42ee124cb8881d3379d78cac0f3a
    Signed-off-by: Jorge Niedbalski <email address hidden>

Changed in charm-nova-cloud-controller:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-nova-cloud-controller (stable/17.02)

Fix proposed to branch: stable/17.02
Review: https://review.openstack.org/469555

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-nova-cloud-controller (stable/17.02)

Reviewed: https://review.openstack.org/469555
Committed: https://git.openstack.org/cgit/openstack/charm-nova-cloud-controller/commit/?id=0723811cb448903583e208c4925af825e3667176
Submitter: Jenkins
Branch: stable/17.02

commit 0723811cb448903583e208c4925af825e3667176
Author: Jorge Niedbalski <email address hidden>
Date: Mon May 29 13:52:31 2017 -0400

    Disable the nova-consoleauth service on HA.

    When using the nova-cloud-controller charm in HA with the config
    option single-nova-consoleauth set to true, its expected for the
    nova-consoleauth service to be run in just a single unit at the time.

    The service management (start/stop) is performed by pacemaker in
    accordance with the cluster health using the OCF resource agent[0].

    Its required for the service to be disabled by default on upstart (trusty)
    or systemd (>=xenial).

    This change disables the service by using the service_pause
    charmhelpers call which considers both cases (upstart/systemd) when
    the ha relation is present and the single-nova-consoleauth option is
    used.

    Also, this change fixes LP: #1660244 (Services not running that should be:
    nova-consoleauth) by removing it from the resource_map when
    ha + single-nova-consoleauth is used.

    [0] https://github.com/openstack/openstack-resource-agents/blob/master/ocf/nova-consoleauth

    Closes-Bug: #1693629
    Closes-Bug: #1660244
    Depends-On: I9a4245e764e268327466bc0fbe8b5383303ad07f

    Change-Id: Ib012d81e0a1573f6ccf74a7a59f75329c751d7a0
    Signed-off-by: Jorge Niedbalski <email address hidden>

James Page (james-page)
Changed in charm-nova-cloud-controller:
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.