Commit 3e777894 authored by Kirill Smelkov's avatar Kirill Smelkov

software/ors-amarisoft: Do not recreate slaptapX-* on every idempotent `slapos node instance` run

To run tapsplit we use plone.recipe.command with both command and
update-command set to `tapsplit ...`. But tapsplit, when run, fully
recreates and reinitializes subtap interfaces, which leads to
interfering with running enb because subtap interfaces, that enb
started to use, are removed. This is not desirable behaviour.

What we need:

1) create subtap interfaces only once and keep them stable
2) until configuration changes which should lead to
   * subtaps recreated, and
   * enb restarted

Carefully reading plone.recipe.command documentation shows:

  command
    Command to run when the buildout part is installed.

  update-command
    Command to run when the buildout part is updated. This happens when
    buildout is run BUT THE CONFIGURATION FOR THIS BUILDOUT PART HAS NOT
    CHANGED.

  (emphasis mine)

So the fix looks to be to make update-command noop - this fulfills
requirement "1". For "2" - I've verified that when configuration
changes, e.g. number of RU changes, buildout reinstalls [vtap] section
from scratch, and it also should restart enb, because generated enb.cfg
changes.

So the fix is fully correct because it satifies all needed requirements.

Amends 49ce8ef5 (software/ors-amarisoft: Provide dedicated TAP interface for each Radio Unit)
/cc @jhuge, @lu.xu, @tomo, @xavier_thompson, @Daetalus
parent b7eefe12
......@@ -56,7 +56,7 @@ config-stats-period = {{ slapparameter_dict.get("enb_stats_fetch_period", 60) }}
recipe = plone.recipe.command
ntap = {{ ntap }}
command = {{ netcapdo }} {{ pythonwitheggs }} {{ ru_tapsplit }} {{ slaplte.tap }} ${:ntap}
update-command = ${:command}
update-command = : # nothing - we create taps only once not to interfere later with enb
stop-on-error = true
{%- if testing %}
# StandaloneSlapOS does not provide slaptap
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment