← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1825943] [NEW] [RFE] Implement "stop agent" hook script support in Neutron

 

Public bug reported:

Dear all,

Following a quick thread on the openstack-discuss ML[1], I would like to request a new feature:
Hook script support for Neutron agents.

The Why:
Neutron doesn't know about containers, and just kills processes whenever it doesn't need them, keeping dangling containers.
This can lead to some issues, among them:
- disk space usage
- "failed" containers (exit-code 137 instead of a clean 0)
- issues when validating container state in CI[2]
- possible issue starting a new container due to name already used (not yet seen, but might occur)

The What:
Currently, launching an agent already supports a so-called "wrapper" (script). The current use in TripleO is to start a new container with the right options.
Adding such a feature for the "stop" part would allow to do more than just kill the process:
- clean up the configuration (in bare-metal use)
- clean up temporary files (in bare-metal use)
- clean up the container(s) instead of keeping them in failed state

The How:
Apparently, it might be possible to take advantage of the "get_stop_command" parameter for the "external_process.ProcessMonitor"[3].

Thank you!

Cheers,

C.


[1] http://lists.openstack.org/pipermail/openstack-discuss/2019-April/005258.html
[2] https://github.com/openstack/tripleo-quickstart-extras/blob/master/roles/validate-services/tasks/containers.yaml#L18-L36
[3] https://github.com/openstack/neutron/blob/master/neutron/agent/linux/external_process.py#L98

** Affects: neutron
     Importance: Medium
         Status: New


** Tags: containers neutron

** Project changed: tripleo => neutron

** Changed in: neutron
    Milestone: train-1 => None

** Changed in: neutron
       Status: Triaged => New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1825943

Title:
  [RFE] Implement "stop agent" hook script support in Neutron

Status in neutron:
  New

Bug description:
  Dear all,

  Following a quick thread on the openstack-discuss ML[1], I would like to request a new feature:
  Hook script support for Neutron agents.

  The Why:
  Neutron doesn't know about containers, and just kills processes whenever it doesn't need them, keeping dangling containers.
  This can lead to some issues, among them:
  - disk space usage
  - "failed" containers (exit-code 137 instead of a clean 0)
  - issues when validating container state in CI[2]
  - possible issue starting a new container due to name already used (not yet seen, but might occur)

  The What:
  Currently, launching an agent already supports a so-called "wrapper" (script). The current use in TripleO is to start a new container with the right options.
  Adding such a feature for the "stop" part would allow to do more than just kill the process:
  - clean up the configuration (in bare-metal use)
  - clean up temporary files (in bare-metal use)
  - clean up the container(s) instead of keeping them in failed state

  The How:
  Apparently, it might be possible to take advantage of the "get_stop_command" parameter for the "external_process.ProcessMonitor"[3].

  Thank you!

  Cheers,

  C.

  
  [1] http://lists.openstack.org/pipermail/openstack-discuss/2019-April/005258.html
  [2] https://github.com/openstack/tripleo-quickstart-extras/blob/master/roles/validate-services/tasks/containers.yaml#L18-L36
  [3] https://github.com/openstack/neutron/blob/master/neutron/agent/linux/external_process.py#L98

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1825943/+subscriptions


Follow ups