Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates for designs/neutron/* #250

Merged
merged 5 commits into from
Sep 4, 2014
Merged

Conversation

eugeneia
Copy link
Member

@eugeneia eugeneia commented Sep 2, 2014

Amended neutron2snabb to handle updated Neutron CSV dump format. Includes support for L2TPv3 configuration from the Neutron side.

This adds lib.json:decode for parsing JSON strings. Credit is due to Craig Mason-Jones' JSON4Lua.

Also adds a smoketest for neutron2snabb to designs/neutron/selfest.sh.

More:

  • Fixes a bug mentioned below ("only create configurations for local host").
  • Implements atomic update-only-when-changed for neutron-sync-agent.
  • Removes some obsolete configuration keys from neutron2snabb and lib.nfv.config (see nd_light for why remote_mac they became obsolete).

@eugeneia
Copy link
Member Author

eugeneia commented Sep 2, 2014

This will probably conflict with neutron2snabb egress filters, please merge that PR first then I will resolve the eventual conflicts.

else
error("Failed to create " .. output_path)
local binding = port_bindings[port.id]
if binding.driver == "snabb" then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should do additional filtering somewhere here:
The database configuration includes records for every compute host (potentially hundreds) but we only want to generate config files for the local traffic processes on our node.

So we should have a check along the lines of:

if vif_details.zone_host == myhostname then
   ...
end

where myhostname is the unix host name of the machine.

@lukego
Copy link
Member

lukego commented Sep 3, 2014

There is a related feature that we should add, but I suspect it belongs in neutron-sync-agent and not directly in neutron2snabb:

The new configuration file for a traffic process should be created:

  • Only if the configuration has changed. i.e. if the new file and the old file are the same then we should not bother the traffic process with an update.
  • Atomically, so that the traffic process will never try to load a partly-written file.

I suspect both could be handled by updating the neutron-sync-agent script to generate files into a temporary location, then diff to see if there are changes compared with the running configuration, and if so do an atomic update with mv.

@eugeneia eugeneia force-pushed the neutron2snabb_update branch 2 times, most recently from d4a5290 to 4bcb7c8 Compare September 3, 2014 16:03
current Neutron CSV dump format. Also includes support for
L2TPv3 configuration from the Neutron side.

This adds lib/json.jua containing a `decode' function for JSON
strings. Credit is due to Craig Mason-Jones' JSON4Lua.
SNABB_DIR and ensure consistency by using the atomic mv(1).
@eugeneia eugeneia changed the title Update neutron2snabb to handle updated Neutron CSV dump format Updates for designs/neutron/* Sep 3, 2014
@eugeneia eugeneia changed the title Updates for designs/neutron/* Updates for designs/neutron/* Sep 3, 2014
@lukego lukego merged commit 4bcb7c8 into snabbco:master Sep 4, 2014
@eugeneia eugeneia deleted the neutron2snabb_update branch May 20, 2015 12:52
mwiget pushed a commit to mwiget/snabb that referenced this pull request Feb 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants