[RFE] Handling SIGHUP on Ironic services

Bug #1585595 reported by Lucas Alvares Gomes
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
Wishlist
Ruby Loo

Bug Description

It's a common practice for daemons handle the SIGHUP signal as a trigger for server's reconfiguration, specially reloading configuration files. Currently neither the Ironic conductor or Ironic API server does support it.

The oslo.service library [0] already have implemented support for services to handle this signal, the same for the oslo.config library [1][2] which added support for "mutable" configuration options which are configurations that are meant to be reloaded dynamically. One example of use case would be to operators to enable/disable the debug log without having to restart the services.

This RFE is about adding the signal handlers and only reloading the mutable options already defined in other libraries (such as oslo.log, which defines "debug" as mutable). For Ironic configuration, we can submit further patches later adding mutable where it does make sense.

Note: SIGHUP does not work on Windows*

[0] http://docs.openstack.org/developer/oslo.service/usage.html#signal-handling
[1] https://review.openstack.org/#/c/246404/
[2] http://docs.openstack.org/developer/oslo.config/opts.html?highlight=mutable#option-definitions

Tags: rfe-approved
Changed in ironic:
importance: Undecided → Wishlist
tags: added: rfe
Changed in ironic:
assignee: nobody → Lucas Alvares Gomes (lucasagomes)
Changed in ironic:
status: New → In Progress
Revision history for this message
Dmitry Tantsur (divius) wrote :

Hi! That's a great idea. We've discussed it on the meeting, and there are enough unclear bits to warrant a spec. Please post one, if you don't mind. Thanks!

tags: added: needs-spec
Changed in ironic:
assignee: Lucas Alvares Gomes (lucasagomes) → nobody
Dmitry Tantsur (divius)
Changed in ironic:
status: In Progress → Triaged
status: Triaged → Confirmed
Ruby Loo (rloo)
Changed in ironic:
assignee: nobody → Ruby Loo (rloo)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ironic-specs (master)

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

Changed in ironic:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ironic (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on ironic (master)

Change abandoned by Lucas Alvares Gomes (<email address hidden>) on branch: master
Review: https://review.openstack.org/321111

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ironic-specs (master)

Reviewed: https://review.openstack.org/474309
Committed: https://git.openstack.org/cgit/openstack/ironic-specs/commit/?id=2298f9895fff42c7dbb9f504715e692954db2243
Submitter: Jenkins
Branch: master

commit 2298f9895fff42c7dbb9f504715e692954db2243
Author: Ruby Loo <email address hidden>
Date: Wed Jun 14 14:01:23 2017 -0400

    SIGHUP restarts services with updated configs

    This specification describes changing the ironic services so that
    it is possible for a SIGHUP to cause a service to be restarted
    with changed values for 'mutable' configuration options.

    Change-Id: I59542e7bb4b4cb320c2bcd95e8a28fc677817392
    Partial-Bug: #1585595

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ironic-specs (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ironic-specs (master)

Reviewed: https://review.openstack.org/498595
Committed: https://git.openstack.org/cgit/openstack/ironic-specs/commit/?id=d335bf80517aa21e461af053165279be32e04ca2
Submitter: Jenkins
Branch: master

commit d335bf80517aa21e461af053165279be32e04ca2
Author: Ruby Loo <email address hidden>
Date: Mon Aug 28 16:44:54 2017 -0400

    Update 'SIGHUP on ironic services'

    This updates the spec for SIGHUP support to:
    1. provide a link to the RFE/bug for the work to make most of the
       ironic configuration options mutable
    2. mention that mutable option values cannot be cached forever

    This is a follow up to 2298f9895fff42c7dbb9f504715e692954db2243.

    Change-Id: Ib78310e394ed03c63764080081e9e10cecfda036
    Partial-Bug: #1585595

Ruby Loo (rloo)
tags: added: rfe-approved
removed: needs-spec rfe
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ironic (master)

Reviewed: https://review.openstack.org/474331
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=398462021bd4764145a69cf6e672194f8b9efea9
Submitter: Zuul
Branch: master

commit 398462021bd4764145a69cf6e672194f8b9efea9
Author: Ruby Loo <email address hidden>
Date: Wed Jun 14 15:40:47 2017 -0400

    reloads mutable config values on SIGHUP

    This changes the ironic (ironic-api and ironic-conductor)
    services so that when a SIGHUP signal is issued, the
    service reloads (and uses) the values of mutable configuration
    options.

    The mutable configuration options (set by oslo.config Opts' mutable=True)
    are:
    - [DEFAULT]/pin_release_version
    - [DEFAULT]/debug
    - [DEFAULT]/log_config_append
    and are indicated as such in ironic's sample config
    (https://docs.openstack.org/ironic/latest/configuration/sample-config.html)
    by "# Note: This option can be changed without restarting.".

    Configuration options are mutable if their oslo.config Opt's mutable=True
    is set. This mutable setting is respected when the oslo method
    mutate_config_files is called instead of reload_config_files.
    Icec3e664f3fe72614e373b2938e8dee53cf8bc5e allows services to tell
    oslo.service they want mutate_config_files to be called by specifying the
    'restart_method=mutate' parameter, which this patch does.

    Change-Id: I0df46bb21dda035b25daad17737dbfedb861e868
    Closes-Bug: #1585595

Changed in ironic:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/ironic 11.0.0

This issue was fixed in the openstack/ironic 11.0.0 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.