Giter Site home page Giter Site logo

openr's Introduction

OpenR: Open Routing

Support Ukraine Build Status Documentation Status

Open Routing, OpenR, is Facebook's internally designed and developed Interior Routing Protocol/Platform. OpenR was originally designed and built for performing routing on the Terragraph mesh network. OpenR's flexible design has led to its adoption in other networks, including Facebook's new WAN network, Express Backbone.

Documentation


Please refer to our extensive Documentation to get started with OpenR.

Library Examples


Please refer to the examples directory to see some useful ways to leverage the libraries to build software to run with OpenR.

Resources


Contribute


Take a look at Developer Guide and CONTRIBUTING.md to get started contributing. The Developer Guide outlines best practices for code contribution and testing. Any single change should be well tested for regressions and version compatibility.

Code of Conduct


The code of conduct is described in CODE_OF_CONDUCT.md

Requirements


We have tried OpenR on Ubuntu-16.04, Ubuntu-18.04 and CentOS 7/8. OpenR should work on all Linux based platforms.

  • Compiler supporting C++17 or higher

Build


Repo Directory Structure

At the top level of this repo are the build and openr directories. Under the former is a tool, gen, that contains scripts for building the project. The openr directory contains the source for the project.

Dependencies

OpenR requires these dependencies for your system and follows the traditional cmake build steps below.

  • cmake
  • gflags
  • gtest
  • libsodium
  • zstd
  • folly
  • fbthrift
  • re2-devel

One Step Build - Ubuntu

We've provided a script, build/build_openr.sh, tested on Ubuntu LTS releases. It uses gendeps.py to install all necessary dependencies, compile OpenR and install C++ binaries as well as python tools. Please modify the script as needed for your platform. Also, note that some library dependencies require a newer version than provided by the default package manager on the system and hence we are compiling them from source instead of installing via the package manager. Please see the script for those instances and the required versions.

Build Steps

# Install dependencies and build openr
bash ./build/build_openr.sh

# To Run tests (some tests requires sudo privileges)
python3 build/fbcode_builder/getdeps.py test \
  --src-dir=. \
  --project-install-prefix openr:/opt/facebook \
  openr

If you make any changes you can run cmake ../openr and make from the build directory to build openr with your changes.

Installing

openr builds both static and dynamic libraries and the install step installs libraries and all header files to /opt/facebook/openr/lib and /opt/facebook/openr/include/ along with python modules in your Python's site-packages directory. Note: the build_openr.sh script will run this step for you

  • Manually you can drive getdeps.py to install elsewhere
    • refer to build_openr.sh

Installing Python Libraries + CLI

You will need python pip or setuptools to build and install python modules. All library dependencies will be automatically installed except the fbthrift-python module which you will need to install manually using steps similar to those described below. This will install breeze, a cli tool to interact with OpenR.

  • Python install requires a fbthrift / thrift1 compiler to be installed and in PATH
cd openr/openr/py
python setup.py build
sudo python setup.py install

Docker Building / Usage

OpenR now has a Dockerfile. It uses gendeps.py to build all dependencies + OpenR.

docker build --network host .

Running

You can specify a config file by bind mount a directory with a openr.cfg file in /config

docker run --name openr --network host openr_ubuntu
  • To use a custom config bind mount /config into the container
    • OpenR binary will look for /config/openr.conf

License

OpenR is MIT licensed.

openr's People

Contributors

ahornby avatar ammubhave avatar ashutoshgrewal avatar chadaustin avatar cooperlees avatar derrreks avatar dgrnbrg-meta avatar fanzeyi avatar focus913 avatar huxintong avatar ilyacodes avatar jstrizich avatar lnicco avatar lukaspiatkowski avatar mizuchi avatar nedabz avatar pkhordoc avatar r-barnes avatar saifhhasan avatar shih-hao-tseng avatar shri-khare avatar simpkins avatar snarkmaster avatar vitaut avatar wez avatar xavierd avatar xiangxu1121 avatar yfeldblum avatar yi-xian avatar yunhongxu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openr's Issues

Link error shown(libsecurity.so) during compilation in Ubuntu 16.04

Please use this template for reporting suspected bugs or requests for help.

Issue Description

Compile Error

Just clone a Open/R code from github, and execute "sudo bash ./build_openr.sh", one compile issue about "/usr/local/lib/libsecurity.so: undefined reference to `error_message(long)" is shown.

Deleted dir linux_monitor/tests to bypass the issue, build_openr.sh can finish, but when "make install" this same issue will show again when link platform_linux.

Environment

  • tag or commit hash on which this occured
  • OS version: <e.g. ubuntu-16.04>
    ...
    A new installed Ubuntu 16.04 on VirtualBox

Minimal test code / Steps to reproduce the issue

What's the actual result?

...........

  • install_openr
  • pushd .
    /tmp/openr/openr-master/build/deps /tmp/openr/openr-master/build/deps
  • cd /tmp/openr/openr-master/build
  • cmake -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTS=ON -DADD_ROOT_TESTS=ON -DCMAKE_CXX_FLAGS=-Wno-unused-parameter ../openr/
    -- The C compiler identification is GNU 5.4.0
    -- The CXX compiler identification is GNU 5.4.0
    -- Check for working C compiler: /usr/bin/cc
    -- Check for working C compiler: /usr/bin/cc -- works
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Detecting C compile features
    -- Detecting C compile features - done
    -- Check for working CXX compiler: /usr/bin/c++
    -- Check for working CXX compiler: /usr/bin/c++ -- works
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    Thrift will create the Object file : LinuxPlatform-cpp2-obj
    Thrift will create the Object file : PersistentStore-cpp2-obj
    Thrift will create the Object file : KvStore-cpp2-obj
    Thrift will create the Object file : Lsdb-cpp2-obj
    Thrift will create the Object file : IpPrefix-cpp2-obj
    Thrift will create the Object file : Fib-cpp2-obj
    Thrift will create the Object file : KnownKeys-cpp2-obj
    Thrift will create the Object file : HealthChecker-cpp2-obj
    Thrift will create the Object file : LinkMonitor-cpp2-obj
    Thrift will create the Object file : Platform-cpp2-obj
    Thrift will create the Object file : Spark-cpp2-obj
    Thrift will create the Object file : AllocPrefix-cpp2-obj
    Thrift will create the Object file : PrefixManager-cpp2-obj
    Thrift will create the Object file : Decision-cpp2-obj
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /tmp/openr/openr-master/build
  • make
    Scanning dependencies of target Spark-cpp2-target
    [ 1%] Generating Spark files. Output: /tmp/openr/openr-master/build/thrift-out/openr/if
    [ 1%] Built target Spark-cpp2-target
    Scanning dependencies of target IpPrefix-cpp2-target
    [ 2%] Generating IpPrefix files. Output: /tmp/openr/openr-master/build/thrift-out/openr/if
    [ 2%] Built target IpPrefix-cpp2-target
    Scanning dependencies of target IpPrefix-cpp2-obj
    [ 3%] Building CXX object CMakeFiles/IpPrefix-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/IpPrefix_constants.cpp.o
    [ 3%] Building CXX object CMakeFiles/IpPrefix-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/IpPrefix_data.cpp.o
    [ 4%] Building CXX object CMakeFiles/IpPrefix-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/IpPrefix_types.cpp.o
    [ 5%] Built target IpPrefix-cpp2-obj
    Scanning dependencies of target Platform-cpp2-target
    [ 6%] Generating Platform files. Output: /tmp/openr/openr-master/build/thrift-out/openr/if
    [ 6%] Built target Platform-cpp2-target
    Scanning dependencies of target Platform-cpp2-obj
    [ 7%] Building CXX object CMakeFiles/Platform-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/Platform_constants.cpp.o
    [ 7%] Building CXX object CMakeFiles/Platform-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/Platform_data.cpp.o
    [ 8%] Building CXX object CMakeFiles/Platform-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/Platform_types.cpp.o
    [ 9%] Building CXX object CMakeFiles/Platform-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/FibService.cpp.o
    [ 9%] Building CXX object CMakeFiles/Platform-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/FibService_client.cpp.o
    [ 10%] Building CXX object CMakeFiles/Platform-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/SystemService.cpp.o
    [ 10%] Building CXX object CMakeFiles/Platform-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/SystemService_client.cpp.o
    [ 11%] Built target Platform-cpp2-obj
    Scanning dependencies of target AllocPrefix-cpp2-target
    [ 12%] Generating AllocPrefix files. Output: /tmp/openr/openr-master/build/thrift-out/openr/if
    [ 12%] Built target AllocPrefix-cpp2-target
    Scanning dependencies of target AllocPrefix-cpp2-obj
    [ 13%] Building CXX object CMakeFiles/AllocPrefix-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/AllocPrefix_constants.cpp.o
    [ 13%] Building CXX object CMakeFiles/AllocPrefix-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/AllocPrefix_data.cpp.o
    [ 14%] Building CXX object CMakeFiles/AllocPrefix-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/AllocPrefix_types.cpp.o
    [ 14%] Built target AllocPrefix-cpp2-obj
    Scanning dependencies of target Lsdb-cpp2-target
    [ 15%] Generating Lsdb files. Output: /tmp/openr/openr-master/build/thrift-out/openr/if
    [ 15%] Built target Lsdb-cpp2-target
    Scanning dependencies of target Lsdb-cpp2-obj
    [ 16%] Building CXX object CMakeFiles/Lsdb-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/Lsdb_constants.cpp.o
    [ 17%] Building CXX object CMakeFiles/Lsdb-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/Lsdb_data.cpp.o
    [ 17%] Building CXX object CMakeFiles/Lsdb-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/Lsdb_types.cpp.o
    [ 17%] Built target Lsdb-cpp2-obj
    Scanning dependencies of target LinkMonitor-cpp2-target
    [ 17%] Generating LinkMonitor files. Output: /tmp/openr/openr-master/build/thrift-out/openr/if
    [ 17%] Built target LinkMonitor-cpp2-target
    Scanning dependencies of target Spark-cpp2-obj
    [ 18%] Building CXX object CMakeFiles/Spark-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/Spark_constants.cpp.o
    [ 18%] Building CXX object CMakeFiles/Spark-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/Spark_data.cpp.o
    [ 19%] Building CXX object CMakeFiles/Spark-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/Spark_types.cpp.o
    [ 20%] Built target Spark-cpp2-obj
    Scanning dependencies of target LinkMonitor-cpp2-obj
    [ 20%] Building CXX object CMakeFiles/LinkMonitor-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/LinkMonitor_constants.cpp.o
    [ 21%] Building CXX object CMakeFiles/LinkMonitor-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/LinkMonitor_data.cpp.o
    [ 22%] Building CXX object CMakeFiles/LinkMonitor-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/LinkMonitor_types.cpp.o
    [ 23%] Built target LinkMonitor-cpp2-obj
    Scanning dependencies of target KnownKeys-cpp2-target
    [ 24%] Generating KnownKeys files. Output: /tmp/openr/openr-master/build/thrift-out/openr/if
    [ 24%] Built target KnownKeys-cpp2-target
    Scanning dependencies of target KnownKeys-cpp2-obj
    [ 25%] Building CXX object CMakeFiles/KnownKeys-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/KnownKeys_constants.cpp.o
    [ 26%] Building CXX object CMakeFiles/KnownKeys-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/KnownKeys_data.cpp.o
    [ 26%] Building CXX object CMakeFiles/KnownKeys-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/KnownKeys_types.cpp.o
    [ 26%] Built target KnownKeys-cpp2-obj
    Scanning dependencies of target HealthChecker-cpp2-target
    [ 26%] Generating HealthChecker files. Output: /tmp/openr/openr-master/build/thrift-out/openr/if
    [ 26%] Built target HealthChecker-cpp2-target
    Scanning dependencies of target HealthChecker-cpp2-obj
    [ 26%] Building CXX object CMakeFiles/HealthChecker-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/HealthChecker_constants.cpp.o
    [ 27%] Building CXX object CMakeFiles/HealthChecker-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/HealthChecker_data.cpp.o
    [ 28%] Building CXX object CMakeFiles/HealthChecker-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/HealthChecker_types.cpp.o
    [ 29%] Built target HealthChecker-cpp2-obj
    Scanning dependencies of target Fib-cpp2-target
    [ 29%] Generating Fib files. Output: /tmp/openr/openr-master/build/thrift-out/openr/if
    [ 29%] Built target Fib-cpp2-target
    Scanning dependencies of target Fib-cpp2-obj
    [ 29%] Building CXX object CMakeFiles/Fib-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/Fib_constants.cpp.o
    [ 30%] Building CXX object CMakeFiles/Fib-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/Fib_data.cpp.o
    [ 31%] Building CXX object CMakeFiles/Fib-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/Fib_types.cpp.o
    [ 32%] Built target Fib-cpp2-obj
    Scanning dependencies of target KvStore-cpp2-target
    [ 33%] Generating KvStore files. Output: /tmp/openr/openr-master/build/thrift-out/openr/if
    [ 33%] Built target KvStore-cpp2-target
    Scanning dependencies of target KvStore-cpp2-obj
    [ 33%] Building CXX object CMakeFiles/KvStore-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/KvStore_constants.cpp.o
    [ 34%] Building CXX object CMakeFiles/KvStore-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/KvStore_data.cpp.o
    [ 34%] Building CXX object CMakeFiles/KvStore-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/KvStore_types.cpp.o
    [ 35%] Built target KvStore-cpp2-obj
    Scanning dependencies of target PersistentStore-cpp2-target
    [ 35%] Generating PersistentStore files. Output: /tmp/openr/openr-master/build/thrift-out/openr/if
    [ 35%] Built target PersistentStore-cpp2-target
    Scanning dependencies of target PersistentStore-cpp2-obj
    [ 35%] Building CXX object CMakeFiles/PersistentStore-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/PersistentStore_constants.cpp.o
    [ 36%] Building CXX object CMakeFiles/PersistentStore-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/PersistentStore_data.cpp.o
    [ 37%] Building CXX object CMakeFiles/PersistentStore-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/PersistentStore_types.cpp.o
    [ 38%] Built target PersistentStore-cpp2-obj
    Scanning dependencies of target LinuxPlatform-cpp2-target
    [ 39%] Generating LinuxPlatform files. Output: /tmp/openr/openr-master/build/thrift-out/openr/if
    [ 39%] Built target LinuxPlatform-cpp2-target
    Scanning dependencies of target LinuxPlatform-cpp2-obj
    [ 40%] Building CXX object CMakeFiles/LinuxPlatform-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/LinuxPlatform_constants.cpp.o
    [ 40%] Building CXX object CMakeFiles/LinuxPlatform-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/LinuxPlatform_data.cpp.o
    [ 41%] Building CXX object CMakeFiles/LinuxPlatform-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/LinuxPlatform_types.cpp.o
    [ 42%] Building CXX object CMakeFiles/LinuxPlatform-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/LinuxFibService.cpp.o
    [ 42%] Building CXX object CMakeFiles/LinuxPlatform-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/LinuxFibService_client.cpp.o
    [ 43%] Built target LinuxPlatform-cpp2-obj
    Scanning dependencies of target PrefixManager-cpp2-target
    [ 43%] Generating PrefixManager files. Output: /tmp/openr/openr-master/build/thrift-out/openr/if
    [ 43%] Built target PrefixManager-cpp2-target
    Scanning dependencies of target PrefixManager-cpp2-obj
    [ 43%] Building CXX object CMakeFiles/PrefixManager-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/PrefixManager_constants.cpp.o
    [ 44%] Building CXX object CMakeFiles/PrefixManager-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/PrefixManager_data.cpp.o
    [ 45%] Building CXX object CMakeFiles/PrefixManager-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/PrefixManager_types.cpp.o
    [ 46%] Built target PrefixManager-cpp2-obj
    Scanning dependencies of target Decision-cpp2-target
    [ 47%] Generating Decision files. Output: /tmp/openr/openr-master/build/thrift-out/openr/if
    [ 47%] Built target Decision-cpp2-target
    Scanning dependencies of target Decision-cpp2-obj
    [ 48%] Building CXX object CMakeFiles/Decision-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/Decision_constants.cpp.o
    [ 49%] Building CXX object CMakeFiles/Decision-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/Decision_data.cpp.o
    [ 49%] Building CXX object CMakeFiles/Decision-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/Decision_types.cpp.o
    [ 49%] Built target Decision-cpp2-obj
    Scanning dependencies of target openrlib
    [ 50%] Building CXX object CMakeFiles/openrlib.dir/allocators/PrefixAllocator.cpp.o
    [ 51%] Building CXX object CMakeFiles/openrlib.dir/common/BuildInfo.cpp.o
    [ 51%] Building CXX object CMakeFiles/openrlib.dir/common/KnownKeysStore.cpp.o
    [ 52%] Building CXX object CMakeFiles/openrlib.dir/common/ExponentialBackoff.cpp.o
    [ 53%] Building CXX object CMakeFiles/openrlib.dir/common/Util.cpp.o
    [ 53%] Building CXX object CMakeFiles/openrlib.dir/common/Constants.cpp.o
    [ 54%] Building CXX object CMakeFiles/openrlib.dir/config-store/PersistentStore.cpp.o
    [ 55%] Building CXX object CMakeFiles/openrlib.dir/config-store/PersistentStoreClient.cpp.o
    [ 55%] Building CXX object CMakeFiles/openrlib.dir/decision/Decision.cpp.o
    [ 56%] Building CXX object CMakeFiles/openrlib.dir/fib/Fib.cpp.o
    [ 57%] Building CXX object CMakeFiles/openrlib.dir/health-checker/HealthChecker.cpp.o
    [ 57%] Building CXX object CMakeFiles/openrlib.dir/kvstore/KvStoreClient.cpp.o
    [ 58%] Building CXX object CMakeFiles/openrlib.dir/kvstore/KvStore.cpp.o
    [ 58%] Building CXX object CMakeFiles/openrlib.dir/kvstore/KvStoreWrapper.cpp.o
    [ 59%] Building CXX object CMakeFiles/openrlib.dir/link-monitor/LinkMonitor.cpp.o
    [ 60%] Building CXX object CMakeFiles/openrlib.dir/nl/NetlinkRouteSocket.cpp.o
    [ 60%] Building CXX object CMakeFiles/openrlib.dir/nl/NetlinkSubscriber.cpp.o
    [ 61%] Building CXX object CMakeFiles/openrlib.dir/platform/NetlinkFibHandler.cpp.o
    [ 62%] Building CXX object CMakeFiles/openrlib.dir/platform/NetlinkSystemHandler.cpp.o
    [ 62%] Building CXX object CMakeFiles/openrlib.dir/platform/PlatformPublisher.cpp.o
    [ 63%] Building CXX object CMakeFiles/openrlib.dir/prefix-manager/PrefixManager.cpp.o
    [ 64%] Building CXX object CMakeFiles/openrlib.dir/prefix-manager/PrefixManagerClient.cpp.o
    [ 64%] Building CXX object CMakeFiles/openrlib.dir/spark/IoProvider.cpp.o
    [ 65%] Building CXX object CMakeFiles/openrlib.dir/spark/SparkWrapper.cpp.o
    [ 66%] Building CXX object CMakeFiles/openrlib.dir/spark/Spark.cpp.o
    [ 66%] Building CXX object CMakeFiles/openrlib.dir/watchdog/Watchdog.cpp.o
    [ 67%] Linking CXX static library libopenrlib.a
    [ 67%] Built target openrlib
    Scanning dependencies of target decision_test
    [ 67%] Building CXX object CMakeFiles/decision_test.dir/decision/tests/DecisionTest.cpp.o
    [ 68%] Linking CXX executable decision_test
    [ 68%] Built target decision_test
    Scanning dependencies of target netlink_route_socket_test
    [ 68%] Building CXX object CMakeFiles/netlink_route_socket_test.dir/nl/tests/NetlinkRouteSocketTest.cpp.o
    [ 69%] Linking CXX executable netlink_route_socket_test
    [ 69%] Built target netlink_route_socket_test
    Scanning dependencies of target health_checker_test
    [ 70%] Building CXX object CMakeFiles/health_checker_test.dir/health-checker/tests/HealthCheckerTest.cpp.o
    [ 71%] Linking CXX executable health_checker_test
    [ 71%] Built target health_checker_test
    Scanning dependencies of target link_monitor_test
    [ 71%] Building CXX object CMakeFiles/link_monitor_test.dir/link-monitor/tests/LinkMonitorTest.cpp.o
    [ 72%] Building CXX object CMakeFiles/link_monitor_test.dir/link-monitor/tests/MockNetlinkSystemHandler.cpp.o
    [ 72%] Linking CXX executable link_monitor_test
    /usr/local/lib/libsecurity.so: undefined reference to `error_message(long)'
    collect2: error: ld returned 1 exit status
    CMakeFiles/link_monitor_test.dir/build.make:143: recipe for target 'link_monitor_test' failed
    make[2]: *** [link_monitor_test] Error 1
    CMakeFiles/Makefile2:554: recipe for target 'CMakeFiles/link_monitor_test.dir/all' failed
    make[1]: *** [CMakeFiles/link_monitor_test.dir/all] Error 2
    Makefile:138: recipe for target 'all' failed
    make: *** [all] Error 2
    abc@abc-VirtualBox:/tmp/openr/openr-master/build$

What's the expected result?

Compile Successfully

compile error on ubuntu 14.04

Please use this template for reporting suspected bugs or requests for help.

Issue Description

./../folly/FBVector.h:1463:49: error: parameter packs not expanded with '...':
M_construct(start, std::forward(args)...);
^
./../folly/FBVector.h:1463:49: note: 'args'
In file included from ./../folly/compression/Utils.h:21:0,
from compression/Compression.cpp:56:
./../folly/io/Cursor.h: In member function 'size_t folly::io::detail::CursorBase<Derived, BufType>::cloneAtMost(std::unique_ptrfolly::IOBuf&, size_t)':
./../folly/io/Cursor.h:507:13: error: 'make_unique' is not a member of 'std'
buf = std::make_uniquefolly::IOBuf();
^
./../folly/io/Cursor.h:507:13: note: suggested alternative:
In file included from compression/Compression.cpp:52:0:
./../folly/Memory.h:108:1: note: 'folly::make_unique'
make_unique(Args&&...) = delete;
^
In file included from ./../folly/compression/Utils.h:21:0,
from compression/Compression.cpp:56:
./../folly/io/Cursor.h:507:42: error: expected primary-expression before '>' token
buf = std::make_uniquefolly::IOBuf();
^
./../folly/io/Cursor.h:507:44: error: expected primary-expression before ')' token
buf = std::make_uniquefolly::IOBuf();
^
compression/Compression.cpp: In static member function 'static std::unique_ptrfolly::io::Codec folly::io::{anonymous}::NoCompressionCodec::create(int, folly::io::CodecType)':
compression/Compression.cpp:457:10: error: 'make_unique' is not a member of 'std'
return std::make_unique(level, type);
^
compression/Compression.cpp:457:10: note: suggested alternative:
In file included from compression/Compression.cpp:52:0:
./../folly/Memory.h:108:1: note: 'folly::make_unique'
make_unique(Args&&...) = delete;
^
compression/Compression.cpp:457:45: error: expected primary-expression before '>' token
return std::make_unique(level, type);
^
compression/Compression.cpp: In static member function 'static std::unique_ptrfolly::io::Codec folly::io::{anonymous}::LZ4Codec::create(int, folly::io::CodecType)':
compression/Compression.cpp:551:10: error: 'make_unique' is not a member of 'std'
return std::make_unique(level, type);
^
compression/Compression.cpp:551:10: note: suggested alternative:
In file included from compression/Compression.cpp:52:0:
./../folly/Memory.h:108:1: note: 'folly::make_unique'
make_unique(Args&&...) = delete;
^
compression/Compression.cpp:551:35: error: expected primary-expression before '>' token
return std::make_unique(level, type);
^
compression/Compression.cpp: In static member function 'static std::unique_ptrfolly::io::Codec folly::io::{anonymous}::SnappyCodec::create(int, folly::io::CodecType)':
compression/Compression.cpp:909:10: error: 'make_unique' is not a member of 'std'
return std::make_unique(level, type);
^
compression/Compression.cpp:909:10: note: suggested alternative:
In file included from compression/Compression.cpp:52:0:
./../folly/Memory.h:108:1: note: 'folly::make_unique'
make_unique(Args&&...) = delete;
^
compression/Compression.cpp:909:38: error: expected primary-expression before '>' token
return std::make_unique(level, type);
^
compression/Compression.cpp: In static member function 'static std::unique_ptrfolly::io::Codec folly::io::{anonymous}::AutomaticCodec::create(std::vector<std::unique_ptrfolly::io::Codec >, std::unique_ptrfolly::io::Codec)':
compression/Compression.cpp:1906:10: error: 'make_unique' is not a member of 'std'
return std::make_unique(
^
compression/Compression.cpp:1906:10: note: suggested alternative:
In file included from compression/Compression.cpp:52:0:
./../folly/Memory.h:108:1: note: 'folly::make_unique'
make_unique(Args&&...) = delete;
^
compression/Compression.cpp:1906:41: error: expected primary-expression before '>' token
return std::make_unique(
^
make[2]: *** [compression/Compression.lo] Error 1
make[2]: Leaving directory /root/Downloads/openr-master/build/deps/folly/folly' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory /root/Downloads/openr-master/build/deps/folly/folly'
make: *** [all] Error 2
root@greenvm-d13450v1:/Downloads/openr-master/build#
root@greenvm-d13450v1:
/Downloads/openr-master/build#
root@greenvm-d13450v1:/Downloads/openr-master/build# gcc --version
gcc (Ubuntu 4.8.4-2ubuntu1
14.04.3) 4.8.4
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Environment

ubuntu-14.04

Minimal test code / Steps to reproduce the issue

What's the actual result?

What's the expected result?

Docker Build Scripts not working OOB

Supplied build instructions/script via Docker do not work out of the box on Ubuntu 16.04.

remcampb@drew-dev1:~/openr$ ls -al
total 44
drwxrwxr-x  6 remcampb remcampb 4096 Nov 16 14:24 .
drwxr-xr-x 17 remcampb remcampb 4096 Nov 16 14:29 ..
drwxrwxr-x  4 remcampb remcampb 4096 Nov 16 14:06 build
-rw-rw-r--  1 remcampb remcampb 1662 Nov 16 14:06 CONTRIBUTING.md
drwxrwxr-x  2 remcampb remcampb 4096 Nov 16 14:06 examples
drwxrwxr-x  8 remcampb remcampb 4096 Nov 16 14:17 .git
-rw-rw-r--  1 remcampb remcampb 1080 Nov 16 14:06 LICENSE
-rw-rw-r--  1 remcampb remcampb  650 Nov 16 14:06 LICENSE-examples
drwxrwxr-x 19 remcampb remcampb 4096 Nov 16 14:06 openr
-rw-rw-r--  1 remcampb remcampb 3836 Nov 16 14:06 README.md
-rw-rw-r--  1 remcampb remcampb  695 Nov 16 14:06 .travis.yml
remcampb@drew-dev1:~/openr$ ./build/fbcode_builder/travis_docker_build.sh
./build/fbcode_builder/travis_docker_build.sh: line 5: os_image: Must be set by Travis
remcampb@drew-dev1:~/openr$ travis show
no build yet for facebook/openr
remcampb@drew-dev1:~/openr$

Initially Travis was not installed, installed the Travis gem thinking it might be the issue - but did not remedy the problem. As someone without much Travis experience, some build clarification would be incredibly helpful.
Are there extra configuration steps required before script execution?

Build commands in the fbcode_builder do work, however.

Still have same issue as link error shown(libsecurity.so) during compilation in Ubuntu 16.04

Please use this template for reporting suspected bugs or requests for help.

Issue Description

Still have same issue as link error shown(libsecurity.so) during compilation in Ubuntu 16.04
after try on 6/10 version

Environment

  • tag or commit hash on which this occured
  • OS version: <e.g. ubuntu-16.04>
    ...
    Ubuntu-16.04 on VitrualBox

Minimal test code / Steps to reproduce the issue

sudo bash build_openr.sh

What's the actual result?

[ 69%] Linking CXX executable netlink_route_socket_test [ 69%] Built target netlink_route_socket_test Scanning dependencies of target health_checker_test [ 70%] Building CXX object CMakeFiles/health_checker_test.dir/health-checker/tests/HealthCheckerTest.cpp.o [ 71%] Linking CXX executable health_checker_test [ 71%] Built target health_checker_test Scanning dependencies of target link_monitor_test [ 71%] Building CXX object CMakeFiles/link_monitor_test.dir/link-monitor/tests/LinkMonitorTest.cpp.o [ 72%] Building CXX object CMakeFiles/link_monitor_test.dir/link-monitor/tests/MockNetlinkSystemHandler.cpp.o [ 72%] Linking CXX executable link_monitor_test /usr/local/lib/libsecurity.so: undefined reference to `error_message(long)' collect2: error: ld returned 1 exit status CMakeFiles/link_monitor_test.dir/build.make:143: recipe for target 'link_monitor_test' failed make[2]: *** [link_monitor_test] Error 1 CMakeFiles/Makefile2:554: recipe for target 'CMakeFiles/link_monitor_test.dir/all' failed make[1]: *** [CMakeFiles/link_monitor_test.dir/all] Error 2 Makefile:138: recipe for target 'all' failed make: *** [all] Error 2

What's the expected result?

Compile Successfully

svsvfsfs

Please use this template for reporting suspected bugs or requests for help.

Issue Description

Environment

  • tag or commit hash on which this occured
  • OS version: <e.g. ubuntu-16.04>
    ...

Minimal test code / Steps to reproduce the issue

What's the actual result?

What's the expected result?

Output of breeze kvstore nodes is broken

Issue Description

Breeze CLI returns nodes information in KvStore, but the output is pretty much broken.

Environment

  • latest commit 54566cc
  • OS version: ubuntu-16.04

Minimal test code / Steps to reproduce the issue

  1. Follow build instruction and install OpenR.
  2. Configure and run OpenR.
    sudo run_openr.sh
  3. Execute command.
    breeze kvstore nodes

What's the actual result?

                                                                                                                                                                                                                                                                                                                                                                                                                 Node    V6-Loopback    V4-Loopback
---------------  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  ------  -------------  -------------
* ubuntu-opnr-1  P   r   e   f   i   x                                               T   y   p   e       -   -   -   -   -   -   -   -   -   -   -   -   -   -   -           -   -   -   -   -   -   -   -        1   0  .    0  .    0  .    1  /    3   2                          L   O   O   P   B   A   C   K        2   0   0   1  :   d   b    8  :   :    1  /    1   2   8          L   O   O   P   B   A       C              K
> ubuntu-opnr-2  P   r   e   f   i   x                                               T   y   p   e       -   -   -   -   -   -   -   -   -   -   -   -   -   -   -           -   -   -   -   -   -   -   -        1   0  .    0  .    0  .    2  /    3   2                          L   O   O   P   B   A   C   K        2   0   0   1  :   d   b    8  :   :    2  /    1   2   8          L   O   O   P   B   A       C              K
> ubuntu-opnr-3  P   r   e   f   i   x                                               T   y   p   e       -   -   -   -   -   -   -   -   -   -   -   -   -   -   -           -   -   -   -   -   -   -   -        1   0  .    0  .    0  .    3  /    3   2                          L   O   O   P   B   A   C   K        2   0   0   1  :   d   b    8  :   :    3  /    1   2   8          L   O   O   P   B   A       C              K

What's the expected result?

Node             V6-Loopback      V4-Loopback
---------------  ---------------  -------------
* ubuntu-opnr-1  2001:db8::1/128  10.0.0.1/32
> ubuntu-opnr-2  2001:db8::2/128  10.0.0.2/32
> ubuntu-opnr-3  2001:db8::3/128  10.0.0.3/32

Solution suggested

Pull request #12

Cryptic 'Channel is !good()' error when ipv6 is disabled

Please use this template for reporting suspected bugs or requests for help.

Issue Description

When ipv6 is disabled, running openr fails with a cryptic error message

Environment

  • tag or commit hash on which this occured
    465c0a3
  • OS version: <e.g. ubuntu-16.04>
    CentOs 7

Minimal test code / Steps to reproduce the issue

Disable ipv6 and run openr:

[:docker-]$ cat /proc/sys/net/ipv6/conf/all/disable_ipv6
0
[:docker-]$ sudo bash -c ' echo "1" > /proc/sys/net/ipv6/conf/all/disable_ipv6'
[:docker-]$ 
[:docker-]$ 
[:docker-]$ cat /proc/sys/net/ipv6/conf/all/disable_ipv6
1
[:docker-]$ openr
openr[156]: Starting OpenR daemon.
E0426 20:49:58.210268   156 KnownKeysStore.cpp:24] Failed reading known keys, file might be missing
E0426 20:49:58.319881   171 LinkMonitor.cpp:1077] Failed to sync LinkDb from NetlinkSystemHandler. Error: N6apache6thrift9transport19TTransportExceptionE: Channel is !good()
E0426 20:49:58.319939   171 LinkMonitor.cpp:476] InterfaceDb Sync failed, apply exponential backoff and retry in 63 ms
E0426 20:49:58.384980   171 LinkMonitor.cpp:1077] Failed to sync LinkDb from NetlinkSystemHandler. Error: N6apache6thrift9transport19TTransportExceptionE: Channel is !good()
E0426 20:49:58.385143   171 LinkMonitor.cpp:476] InterfaceDb Sync failed, apply exponential backoff and retry in 127 ms
E0426 20:49:58.514339   171 LinkMonitor.cpp:1077] Failed to sync LinkDb from NetlinkSystemHandler. Error: N6apache6thrift9transport19TTransportExceptionE: Channel is !good()
E0426 20:49:58.514488   171 LinkMonitor.cpp:476] InterfaceDb Sync failed, apply exponential backoff and retry in 255 ms
E0426 20:49:58.771777   171 LinkMonitor.cpp:1077] Failed to sync LinkDb from NetlinkSystemHandler. Error: N6apache6thrift9transport19TTransportExceptionE: Channel is !good()
E0426 20:49:58.771900   171 LinkMonitor.cpp:476] InterfaceDb Sync failed, apply exponential backoff and retry in 511 ms
E0426 20:49:59.284234   171 LinkMonitor.cpp:1077] Failed to sync LinkDb from NetlinkSystemHandler. Error: N6apache6thrift9transport19TTransportExceptionE: Channel is !good()
E0426 20:49:59.284271   171 LinkMonitor.cpp:476] InterfaceDb Sync failed, apply exponential backoff and retry in 1023 ms
^Copenr[156]: Stopping OpenR daemon.
[:docker-]$ 

Then if you enable ipv6 it works:

[:docker-]$  sudo bash -c ' echo "0" > /proc/sys/net/ipv6/conf/all/disable_ipv6'  
[:docker-]$ 
[:docker-]$ 
[:docker-]$ openr
openr[185]: Starting OpenR daemon.
E0426 20:50:18.453419   185 KnownKeysStore.cpp:24] Failed reading known keys, file might be missing

What's the actual result?

With ipv6 disabled, the NetlinkSystem listens on port 60099 in ipv4.

└─⊳ netstat -anp | grep 60099
tcp        0      0 0.0.0.0:60099           0.0.0.0:*               LISTEN      7079/openr          

However the LinkMonitor is trying to connect to this port in ipv6,
resulting in the Channel is !good() error.

What's the expected result?

A better error message indicating OpenR requires ipv6 (as I lost a lot of time debugging this).

Breeze crashed at runtime on invocation

Please use this template for reporting suspected bugs or requests for help.

Issue Description

vijayendra@vijayendra-VirtualBox:~/openr/build$ breeze
Traceback (most recent call last):
File "/usr/local/bin/breeze", line 9, in
load_entry_point('py-openr==1.0', 'console_scripts', 'breeze')()
File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 542, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 2569, in load_entry_point
return ep.load()
File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 2229, in load
return self.resolve()
File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 2235, in resolve
module = import(self.module_name, fromlist=['name'], level=0)
File "build/bdist.linux-x86_64/egg/openr/cli/breeze.py", line 22, in
File "build/bdist.linux-x86_64/egg/openr/cli/clis/config.py", line 14, in
File "/usr/local/lib/python2.7/dist-packages/py_openr-1.0-py2.7.egg/openr/cli/commands/config.py", line 23
def _run(self, client: OpenrCtrl.Client):
^
SyntaxError: invalid syntax

Environment

Ubuntu Desktop-16.04

  • tag or commit hash on which this occured

  • OS version: <e.g. ubuntu-16.04>
    Ubuntu Desktop-16.04

Minimal test code / Steps to reproduce the issue

vijayendra@vijayendra-VirtualBox:~/openr/build$ breeze

What's the actual result?

breeze crashed at runtime

What's the expected result?

Usage: breeze [OPTIONS] COMMAND [ARGS]...

Command line tools for OpenR.
Options:
-H, --host TEXT Host to connect to (default = localhost)
-t, --timeout INTEGER Timeout for socket communication in ms
-f, --ports-config-file TEXT JSON file for ports config
--color / --no-color Enable coloring display
--help Show this message and exit.

Commands:
config CLI tool to peek into Config Store module.
decision CLI tool to peek into Decision module.
fib CLI tool to peek into Fib module.
healthchecker CLI tool to peek into Health Checker module.
kvstore CLI tool to peek into KvStore module.
lm CLI tool to peek into Link Monitor module.
monitor CLI tool to peek into Monitor module.
perf CLI tool to view latest perf log of each...
prefixmgr CLI tool to peek into Prefix Manager module.```

Spark Error (lxd)

Getting an error:
cannot find interface for ifIndex: 5
This is running in an LXD container ubuntu 17.04

Environment

  • latest
  • ubuntu-17.04
    ...

Privileged LXD Container, doesn't seem to have this error in my Debian 8 bare metal machine.

originally thought it may have been down to not being privileged but it turns out I already set it up privileged.

What's the actual result?

Nov 27 22:05:38 vrf-zerotier openr[21313]: E1127 22:05:38.952653 21347 Spark.cpp:791] Cannot find interface for ifIndex: 5
Nov 27 22:05:41 vrf-zerotier openr[21313]: E1127 22:05:41.591500 21347 Spark.cpp:791] Cannot find interface for ifIndex: 5
Nov 27 22:05:44 vrf-zerotier openr[21313]: E1127 22:05:44.714031 21347 Spark.cpp:791] Cannot find interface for ifIndex: 5
Nov 27 22:05:45 vrf-zerotier openr[21313]: I1127 22:05:45.090761 21313 NetlinkSystemHandler.cpp:178] Re-syncing Netlink DB
Nov 27 22:05:45 vrf-zerotier openr[21313]: I1127 22:05:45.091567 21313 NetlinkSystemHandler.cpp:180] Completed re-syncing Netlink DB from Netlink Subscriber
Nov 27 22:05:45 vrf-zerotier openr[21313]: I1127 22:05:45.983922 21348 LinkMonitor.cpp:472] InterfaceDb Sync is successful
Nov 27 22:05:47 vrf-zerotier openr[21313]: E1127 22:05:47.765833 21347 Spark.cpp:791] Cannot find interface for ifIndex: 5
Nov 27 22:05:50 vrf-zerotier openr[21313]: E1127 22:05:50.468478 21347 Spark.cpp:791] Cannot find interface for ifIndex: 5
Nov 27 22:05:53 vrf-zerotier openr[21313]: E1127 22:05:53.111532 21347 Spark.cpp:791] Cannot find interface for ifIndex: 5
Nov 27 22:05:55 vrf-zerotier openr[21313]: I1127 22:05:55.988886 21348 LinkMonitor.cpp:472] InterfaceDb Sync is successful
Nov 27 22:05:56 vrf-zerotier openr[21313]: E1127 22:05:56.203078 21347 Spark.cpp:791] Cannot find interface for ifIndex: 5
Nov 27 22:05:59 vrf-zerotier openr[21313]: E1127 22:05:59.222036 21347 Spark.cpp:791] Cannot find interface for ifIndex: 5
Nov 27 22:06:02 vrf-zerotier openr[21313]: E1127 22:06:02.518582 21347 Spark.cpp:791] Cannot find interface for ifIndex: 5
Nov 27 22:06:05 vrf-zerotier openr[21313]: I1127 22:06:05.097883 21313 NetlinkSystemHandler.cpp:178] Re-syncing Netlink DB
Nov 27 22:06:05 vrf-zerotier openr[21313]: I1127 22:06:05.098803 21313 NetlinkSystemHandler.cpp:180] Completed re-syncing Netlink DB from Netlink Subscriber
Nov 27 22:06:05 vrf-zerotier openr[21313]: E1127 22:06:05.650622 21347 Spark.cpp:791] Cannot find interface for ifIndex: 5
Nov 27 22:06:05 vrf-zerotier openr[21313]: I1127 22:06:05.991883 21348 LinkMonitor.cpp:472] InterfaceDb Sync is successful
Nov 27 22:06:09 vrf-zerotier openr[21313]: E1127 22:06:09.238982 21347 Spark.cpp:791] Cannot find interface for ifIndex: 5
Nov 27 22:06:12 vrf-zerotier openr[21313]: E1127 22:06:12.597512 21347 Spark.cpp:791] Cannot find interface for ifIndex: 5
Nov 27 22:06:15 vrf-zerotier openr[21313]: E1127 22:06:15.663316 21347 Spark.cpp:791] Cannot find interface for ifIndex: 5
Nov 27 22:06:15 vrf-zerotier openr[21313]: I1127 22:06:15.996842 21348 LinkMonitor.cpp:472] InterfaceDb Sync is successful
Nov 27 22:06:18 vrf-zerotier openr[21313]: E1127 22:06:18.240803 21347 Spark.cpp:791] Cannot find interface for ifIndex: 5
Nov 27 22:06:20 vrf-zerotier openr[21313]: E1127 22:06:20.769973 21347 Spark.cpp:791] Cannot find interface for ifIndex: 5
Nov 27 22:06:23 vrf-zerotier openr[21313]: E1127 22:06:23.798859 21347 Spark.cpp:791] Cannot find interface for ifIndex: 5
Nov 27 22:06:25 vrf-zerotier openr[21313]: I1127 22:06:25.052012 21343 ThreadManager.tcc:374] ThreadManager::add called with numa == true, but not a NumaThreadManager
Nov 27 22:06:25 vrf-zerotier openr[21313]: I1127 22:06:25.106479 21313 NetlinkSystemHandler.cpp:178] Re-syncing Netlink DB
Nov 27 22:06:25 vrf-zerotier openr[21313]: I1127 22:06:25.107245 21313 NetlinkSystemHandler.cpp:180] Completed re-syncing Netlink DB from Netlink Subscriber
Nov 27 22:06:25 vrf-zerotier openr[21313]: I1127 22:06:25.999750 21348 LinkMonitor.cpp:472] InterfaceDb Sync is successful
Nov 27 22:06:26 vrf-zerotier openr[21313]: E1127 22:06:26.494338 21347 Spark.cpp:791] Cannot find interface for ifIndex: 5
Nov 27 22:06:29 vrf-zerotier openr[21313]: E1127 22:06:29.581921 21347 Spark.cpp:791] Cannot find interface for ifIndex: 5
Nov 27 22:06:32 vrf-zerotier openr[21313]: E1127 22:06:32.383736 21347 Spark.cpp:791] Cannot find interface for ifIndex: 5
Nov 27 22:06:35 vrf-zerotier openr[21313]: E1127 22:06:35.601126 21347 Spark.cpp:791] Cannot find interface for ifIndex: 5
Nov 27 22:06:36 vrf-zerotier openr[21313]: I1127 22:06:36.003907 21348 LinkMonitor.cpp:472] InterfaceDb Sync is successful
Nov 27 22:06:38 vrf-zerotier openr[21313]: E1127 22:06:38.084923 21347 Spark.cpp:791] Cannot find interface for ifIndex: 5
Nov 27 22:06:41 vrf-zerotier openr[21313]: E1127 22:06:41.501282 21347 Spark.cpp:791] Cannot find interface for ifIndex: 5
Nov 27 22:06:44 vrf-zerotier openr[21313]: E1127 22:06:44.955479 21347 Spark.cpp:791] Cannot find interface for ifIndex: 5
Nov 27 22:06:45 vrf-zerotier openr[21313]: I1127 22:06:45.110173 21313 NetlinkSystemHandler.cpp:178] Re-syncing Netlink DB
Nov 27 22:06:45 vrf-zerotier openr[21313]: I1127 22:06:45.111088 21313 NetlinkSystemHandler.cpp:180] Completed re-syncing Netlink DB from Netlink Subscriber
Nov 27 22:06:46 vrf-zerotier openr[21313]: I1127 22:06:46.007829 21348 LinkMonitor.cpp:472] InterfaceDb Sync is successful
Nov 27 22:06:47 vrf-zerotier openr[21313]: E1127 22:06:47.754106 21347 Spark.cpp:791] Cannot find interface for ifIndex: 5
Nov 27 22:06:50 vrf-zerotier openr[21313]: E1127 22:06:50.328872 21347 Spark.cpp:791] Cannot find interface for ifIndex: 5
Nov 27 22:06:53 vrf-zerotier openr[21313]: E1127 22:06:53.622691 21347 Spark.cpp:791] Cannot find interface for ifIndex: 5
Nov 27 22:06:56 vrf-zerotier openr[21313]: I1127 22:06:56.012415 21348 LinkMonitor.cpp:472] InterfaceDb Sync is successful
Nov 27 22:06:56 vrf-zerotier openr[21313]: E1127 22:06:56.818434 21347 Spark.cpp:791] Cannot find interface for ifIndex: 5
Nov 27 22:06:59 vrf-zerotier openr[21313]: E1127 22:06:59.702836 21347 Spark.cpp:791] Cannot find interface for ifIndex: 5

Can't compile on CentOS 7

Issue Description

I am having trouble compiling open/r on my Centos 7 system.
I'm probably doing something wrong, but I can't figure out what the correct steps are.

Environment

  • tag or commit hash on which this occured
    master
  • OS version: <e.g. ubuntu-16.04>
    CentOs 7

Minimal test code / Steps to reproduce the issue

  1. Create docker image (using the command described in make_docker_context.py)

This immediately fails

tmp/openr/build/fbcode_builder (master=) > cd $(./make_docker_context.py) && docker build . 2>&1 | tee log
INFO: Docker ccache not enabled
Traceback (most recent call last):
  File "./make_docker_context.py", line 173, in <module>
    config['github_project'],
  File "./make_docker_context.py", line 154, in make_docker_context
    dockerfile = builder.render(get_steps_fn(builder))
  File "/tmp/openr/build/fbcode_builder/fbcode_builder.py", line 136, in render
    .format(unused_options)
RuntimeError: Unused options: set([u'prefix', u'make_parallelism', u'projects_dir']) -- please check if you made a typo in any of them. Those that are truly not useful should be not be set so that this typo detection can be useful.
unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /home/jeroend/Dockerfile: no such file or directory
~ > 
  1. I then removed the unused_options check from fbcode_builder.py, and tried again. Now the image compiles
/tmp/openr/build/fbcode_builder (master %=) > git diff
diff --git a/build/fbcode_builder/fbcode_builder.py b/build/fbcode_builder/fbcode_builder.py
index 1a6993a..739154f 100644
--- a/build/fbcode_builder/fbcode_builder.py
+++ b/build/fbcode_builder/fbcode_builder.py
@@ -128,13 +128,6 @@ class FBCodeBuilder(object):
         # been used.
         unused_options = set(self._options_do_not_access)
         unused_options -= self.options_used
-        if unused_options:
-            raise RuntimeError(
-                'Unused options: {0} -- please check if you made a typo '
-                'in any of them. Those that are truly not useful should '
-                'be not be set so that this typo detection can be useful.'
-                .format(unused_options)
-            )
         return res
 
     def build(self, steps):
/tmp/openr/build/fbcode_builder (master *%=) > 
/tmp/openr/build/fbcode_builder (master *%=) > cd $(./make_docker_context.py) && docker build . 2>&1 | tee log
<sinp lots of output>
Successfully built 079a3c8040c3
  1. Try compiling the code using ./docker_build_with_ccache.sh

It fails if I use the ccache

/tmp/docker-context-mvFCnz > /tmp/openr/build/fbcode_builder/docker_build_with_ccache.sh /tmp/cache
+ set -o pipefail
+ build_timeout=
+ [[ 1 -gt 0 ]]
+ case "$1" in
+ break
+ [[ 1 != 1 ]]
+ save_ccache_to_dir=/tmp/cache
+ [[ /tmp/cache != '' ]]
+ mkdir -p /tmp/cache
++ rand_guid
+++ date +%s
++ echo 1521478565_9956_27894_5146_26603
+ id=fbcode_builder_image_id=1521478565_9956_27894_5146_26603
++ mktemp
+ logfile=/tmp/tmp.KgXTEGC6zv
+ echo '


Running build with timeout '\'''\'', label fbcode_builder_image_id=1521478565_9956_27894_5146_26603, and log in /tmp/tmp.KgXTEGC6zv


'



Running build with timeout '', label fbcode_builder_image_id=1521478565_9956_27894_5146_26603, and log in /tmp/tmp.KgXTEGC6zv



+ [[ '' != '' ]]
+ build_exit_code=0
+ docker build --label=fbcode_builder_image_id=1521478565_9956_27894_5146_26603 .
+ tee /tmp/tmp.KgXTEGC6zv
Sending build context to Docker daemon   5.12kB
Step 1/12 : FROM debian:8.6
 ---> 19134a8202e7
Step 2/12 : SHELL ["/bin/bash", "-c"]
 ---> Using cache
 ---> 37507f1aa58c
Step 3/12 : RUN apt-get update && apt-get install -yq autoconf-archive bison build-essential cmake curl flex git gperf joe libboost-all-dev libcap-dev libdouble-conversion-dev libevent-dev libgflags-dev libgoogle-glog-dev libkrb5-dev libnuma-dev libsasl2-dev libsnappy-dev libsqlite3-dev libssl-dev libtool netcat-openbsd pkg-config sudo unzip wget
 ---> Using cache
 ---> cac66493e924
Step 4/12 : RUN apt-get install -yq gcc-'4.9' g++-'4.9'
 ---> Using cache
 ---> 1d00ce6dac00
Step 5/12 : RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-'4.9' 40 --slave /usr/bin/g++ g++ /usr/bin/g++-'4.9'
 ---> Using cache
 ---> c21c887a8245
Step 6/12 : RUN update-alternatives --config gcc
 ---> Using cache
 ---> bec46e10c6f0
Step 7/12 : RUN echo deb http://ftp.debian.org/debian jessie-backports main >> /etc/apt/sources.list.d/jessie-backports.list && apt-get update && apt-get -yq -t jessie-backports install cmake
 ---> Using cache
 ---> 9f2f2100381b
Step 8/12 : USER 'nobody'
 ---> Using cache
 ---> 24b9a03e380e
Step 9/12 : RUN hostname
 ---> Using cache
 ---> 7962ada47660
Step 10/12 : RUN cat /etc/issue
 ---> Using cache
 ---> 0be48d3d1843
Step 11/12 : RUN g++ --version || echo g++ not installed
 ---> Using cache
 ---> 079a3c8040c3
Step 12/12 : LABEL "fbcode_builder_image_id"='1521478565_9956_27894_5146_26603'
 ---> Running in cacf18843e07
Removing intermediate container cacf18843e07
 ---> dab0c279a05f
Successfully built dab0c279a05f
+ echo '
FBCODE_BUILDER_EXIT'
+ [[ /tmp/cache == '' ]]
++ docker images --filter label=fbcode_builder_image_id=1521478565_9956_27894_5146_26603 -a -q
+ img=dab0c279a05f
+ [[ dab0c279a05f == '' ]]
++ echo dab0c279a05f
++ wc -l
+ [[ 1 != 1 ]]
++ rand_guid
+++ date +%s
++ echo 1521478571_9922_10392_11253_31447
+ container_name=fbcode_builder_container_1521478571_9922_10392_11253_31447
+ echo 'Starting fbcode_builder_container_1521478571_9922_10392_11253_31447 from latest image of the build with fbcode_builder_image_id=1521478565_9956_27894_5146_26603 --'
Starting fbcode_builder_container_1521478571_9922_10392_11253_31447 from latest image of the build with fbcode_builder_image_id=1521478565_9956_27894_5146_26603 --
+ echo dab0c279a05f
dab0c279a05f
+ export DOCKER_CONTENT_TRUST=
+ DOCKER_CONTENT_TRUST=
+ docker run --user root --name fbcode_builder_container_1521478571_9922_10392_11253_31447 dab0c279a05f /bin/bash -c '
    build_exit_code=0

    # Might be useful if debugging whether max cache size is too small?
    grep " Cleaning up cache directory " /tmp/ccache.log

    export CCACHE_DIR=/ccache
    ccache -s

    echo "Total bytes in /ccache:";
    total_bytes=$(du -sb /ccache | awk "{print \$1}")
    echo "$total_bytes"

    echo "Used bytes in /ccache:";
    used_bytes=$(
      du -sb $(find /ccache -type f -newermt @$(
        cat /FBCODE_BUILDER_CCACHE_START_TIME
      )) | awk "{t += \$1} END {print t}"
    )
    echo "$used_bytes"

    # Goal: set the max cache to 750MB over 125% of the usage of a
    # successful build.  If this is too small, it takes too long to get a
    # cache fully warmed up.  Plus, ccache cleans 100-200MB before reaching
    # the max cache size, so a large margin is essential to prevent misses.
    desired_mb=$(( 750 + used_bytes / 800000 )) # 125% in decimal MB: 1e6/1.25
    if [[ "$build_exit_code" != "0" ]] ; then
      # For a bad build, disallow shrinking the max cache size. Instead of
      # the max cache size, we use on-disk size, which ccache keeps at least
      # 150MB under the actual max size, hence the 400MB safety margin.
      cur_max_mb=$(( 400 + total_bytes / 1000000 ))  # ccache uses decimal MB
      if [[ "$desired_mb" -le "$cur_max_mb" ]] ; then
        desired_mb=""
      fi
    fi

    if [[ "$desired_mb" != "" ]] ; then
      echo "Updating cache size to $desired_mb MB"
      ccache -M "${desired_mb}M"
      ccache -s
    fi

    # Subshell because `time` the binary may not be installed.
    if (time tar czf /ccache.tgz /ccache) ; then
      ls -l /ccache.tgz
    else
      # This `else` ensures we never overwrite the current cache with
      # partial data in case of error, even if somebody adds code below.
      rm /ccache.tgz
      exit 1
    fi
    '
grep: /tmp/ccache.log: No such file or directory
/bin/bash: line 7: ccache: command not found
Total bytes in /ccache:
du: cannot access '/ccache': No such file or directory

Used bytes in /ccache:
cat: /FBCODE_BUILDER_CCACHE_START_TIME: No such file or directory
find: I cannot figure out how to interpret `@' as a date or time
du: cannot access './proc/13/task/13/fd/3': No such file or directory
du: cannot access './proc/13/task/13/fdinfo/3': No such file or directory
du: cannot access './proc/13/fd/4': No such file or directory
du: cannot access './proc/13/fdinfo/4': No such file or directory
2071708200
Updating cache size to 3339 MB
/bin/bash: line 38: ccache: command not found
/bin/bash: line 39: ccache: command not found
tar: Removing leading `/' from member names
tar: /ccache: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors

real	0m0.002s
user	0m0.000s
sys	0m0.002s

It does pass if I disable the ccache:

/tmp/docker-context-mvFCnz > /tmp/openr/build/fbcode_builder/docker_build_with_ccache.sh ""
+ set -o pipefail
+ build_timeout=
+ [[ 1 -gt 0 ]]
+ case "$1" in
+ break
+ [[ 1 != 1 ]]
+ save_ccache_to_dir=
+ [[ '' != '' ]]
+ echo 'WARNING: Will not save /ccache from inside the Docker container'
WARNING: Will not save /ccache from inside the Docker container
++ rand_guid
+++ date +%s
++ echo 1521478610_27076_28927_5321_15199
+ id=fbcode_builder_image_id=1521478610_27076_28927_5321_15199
++ mktemp
+ logfile=/tmp/tmp.5xmlGKikgz
+ echo '


Running build with timeout '\'''\'', label fbcode_builder_image_id=1521478610_27076_28927_5321_15199, and log in /tmp/tmp.5xmlGKikgz


'



Running build with timeout '', label fbcode_builder_image_id=1521478610_27076_28927_5321_15199, and log in /tmp/tmp.5xmlGKikgz



+ [[ '' != '' ]]
+ build_exit_code=0
+ docker build --label=fbcode_builder_image_id=1521478610_27076_28927_5321_15199 .
+ tee /tmp/tmp.5xmlGKikgz
Sending build context to Docker daemon   5.12kB
Step 1/12 : FROM debian:8.6
 ---> 19134a8202e7
Step 2/12 : SHELL ["/bin/bash", "-c"]
 ---> Using cache
 ---> 37507f1aa58c
Step 3/12 : RUN apt-get update && apt-get install -yq autoconf-archive bison build-essential cmake curl flex git gperf joe libboost-all-dev libcap-dev libdouble-conversion-dev libevent-dev libgflags-dev libgoogle-glog-dev libkrb5-dev libnuma-dev libsasl2-dev libsnappy-dev libsqlite3-dev libssl-dev libtool netcat-openbsd pkg-config sudo unzip wget
 ---> Using cache
 ---> cac66493e924
Step 4/12 : RUN apt-get install -yq gcc-'4.9' g++-'4.9'
 ---> Using cache
 ---> 1d00ce6dac00
Step 5/12 : RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-'4.9' 40 --slave /usr/bin/g++ g++ /usr/bin/g++-'4.9'
 ---> Using cache
 ---> c21c887a8245
Step 6/12 : RUN update-alternatives --config gcc
 ---> Using cache
 ---> bec46e10c6f0
Step 7/12 : RUN echo deb http://ftp.debian.org/debian jessie-backports main >> /etc/apt/sources.list.d/jessie-backports.list && apt-get update && apt-get -yq -t jessie-backports install cmake
 ---> Using cache
 ---> 9f2f2100381b
Step 8/12 : USER 'nobody'
 ---> Using cache
 ---> 24b9a03e380e
Step 9/12 : RUN hostname
 ---> Using cache
 ---> 7962ada47660
Step 10/12 : RUN cat /etc/issue
 ---> Using cache
 ---> 0be48d3d1843
Step 11/12 : RUN g++ --version || echo g++ not installed
 ---> Using cache
 ---> 079a3c8040c3
Step 12/12 : LABEL "fbcode_builder_image_id"='1521478610_27076_28927_5321_15199'
 ---> Running in e9c316ce087f
Removing intermediate container e9c316ce087f
 ---> f6f291c9c678
Successfully built f6f291c9c678
+ echo '
FBCODE_BUILDER_EXIT'
+ [[ '' == '' ]]
+ echo 'Not inspecting Docker build, since saving the ccache wasn'\''t requested.'
Not inspecting Docker build, since saving the ccache wasn't requested.
+ exit 0
/tmp/docker-context-mvFCnz >

At this point, I'm not sure what to do next.

  1. I then tried to simply launch the docker image, and build from there.

This fails to compile gflags:

docker run -ti -v /tmp:/tmp -u root  f6f291c9c678 bash
root@12235d10cf61:/# cd /tmp/openr/build


/tmp/openr/build/fbcode_builder (master *%=) > docker run -ti -v /tmp:/tmp -u root  fbcode_builder_image_id bash
root@6295adfdc0c5:/tmp# cd /tmp/openr/build/
root@12235d10cf61:/tmp/openr/build# ./build_openr.sh 
+++ dirname ./build_openr.sh
++ readlink -f .
+ BUILD_DIR=/tmp/openr/build
+ export DESTDIR=
+ DESTDIR=
+ mkdir -p /tmp/openr/build/deps
+ cd /tmp/openr/build/deps
+ sudo apt-get update
Ign http://deb.debian.org jessie InRelease                       
<snip lots of updates of packages>
ging_unittest.o `test -f 'src/logging_unittest.cc' || echo './'`src/logging_unittest.cc
src/logging_unittest.cc:64:17: error: 'GFLAGS_NAMESPACE' is not a namespace-name
 using namespace GFLAGS_NAMESPACE;
                 ^
src/logging_unittest.cc:64:33: error: expected namespace-name before ';' token
 using namespace GFLAGS_NAMESPACE;
                                 ^
Makefile:1275: recipe for target 'src/logging_unittest-logging_unittest.o' failed
make: *** [src/logging_unittest-logging_unittest.o] Error 1
root@6295adfdc0c5:/tmp/openr/build# 

What's the actual result?

See errors in steps-to-reproduce.

What's the expected result?

Being able to compile and use open/r.

I'm fine with either compiling natively on CentOS 7, or in the docker image.

Thanks for the help,

Jeroen

breeze kvstore topology does not work

Issue Description

The breeze kvstore topology does not work because matplotlib was not installed at build_openr.sh script.

Environment

  • Latest commit 54566cc
  • OS version: ubuntu-16.04

Minimal test code / Steps to reproduce the issue

  1. Install openr using one step build script build_openr.sh.
  2. Run openr.
  3. Execute following command.
$ breeze kvstore topology

What's the actual result?

$ breeze kvstore topology
matplotlib and networkx needed for drawing. Skipping

What's the expected result?

The command generates png file to /tmp/

solution I guess

  • add following lines to kvstore.py in openr/py/openr/cli/commands:
import matplotlib
matplotlib.use('Agg')
  • execute pip install matplotlib
  • Then, try build_openr.sh

open/R build fails while running build_openr.sh

Please use this template for reporting suspected bugs or requests for help.

Issue Description

Open/R build fails while running build_openr.sh.

Environment

OS version: ubuntu-16.04

Minimal test code / Steps to reproduce the issue

openr-master/build$ sudo bash ./build_openr.sh

What's the actual result?

[ 85%] Linking CXX executable openr
/usr/bin/ld: /usr/local/lib/libfbzmq.a(ResourceMonitor.cpp.o): undefined reference to symbol '_ZN5boost10filesystem6detail6statusERKNS0_4pathEPNS_6system10error_codeE'
//usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.58.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
CMakeFiles/openr.dir/build.make:132: recipe for target 'openr' failed
make[2]: *** [openr] Error 1
CMakeFiles/Makefile2:1385: recipe for target 'CMakeFiles/openr.dir/all' failed
make[1]: *** [CMakeFiles/openr.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2

What's the expected result?

OpenR built and installed successfully

Link to documentation is invalid

Please use this template for reporting suspected bugs or requests for help.

Issue Description

The link (https://openr.readthedocs.io/en/latest/) of documentation is invalid.

Environment

  • tag or commit hash on which this occured: 8081841
  • OS version: <e.g. ubuntu-16.04>: Any
    ...

Minimal test code / Steps to reproduce the issue

Click link in Documentation of README file.

What's the actual result?


        \          SORRY            /
         \                         /
          \    This page does     /
           ]   not exist yet.    [    ,'|
           ]                     [   /  |
           ]___               ___[ ,'   |
           ]  ]\             /[  [ |:   |
           ]  ] \           / [  [ |:   |
           ]  ]  ]         [  [  [ |:   |
           ]  ]  ]__     __[  [  [ |:   |
           ]  ]  ] ]\ _ /[ [  [  [ |:   |
           ]  ]  ] ] (#) [ [  [  [ :===='
           ]  ]  ]_].nHn.[_[  [  [
           ]  ]  ]  HHHHH. [  [  [
           ]  ] /   `HH("N  \ [  [
           ]__]/     HHH  "  \[__[
           ]         NNN         [
           ]         N/"         [
           ]         N H         [
          /          N            \
         /           q,            \
        /                           \

What's the expected result?

Documentation of OpenR

No Error/ Warning when IPv6 is disabled

Issue Description

Routes are not synchronized. Logs show Openr Waiting for FibService to come upandOpen/R health check: FAIL. Expiring routes!`

OpenR doesn't log a Warning/ Error when IPv6 is disabled. The log looks like this:

Log:

Log file created at: 2019/04/16 19:14:16
Running on machine: mininet-vm
Log line format: [IWEF]mmdd hh:mm:ss.uuuuuu threadid file:line] msg
I0416 19:14:16.618747 32586 Main.cpp:164]
I0416 19:14:16.629637 32591 Main.cpp:249] Starting Watchdog thread ...
I0416 19:14:16.630815 32586 NetlinkMessage.cpp:113] Netlink socket created.45
I0416 19:14:16.644130 32594 Main.cpp:284] Starting NetlinkEvl thread ...
I0416 19:14:16.653046 32598 Main.cpp:352] Starting main event loop...
I0416 19:14:16.654060 32597 Main.cpp:334] Starting NetlinkSystem server...
I0416 19:14:16.654331 32596 Main.cpp:310] Starting NetlinkFib server...
I0416 19:14:16.655228 32597 ThriftServer.cpp:226] libevent 2.0.21-stable method epoll
I0416 19:14:16.655591 32597 ThriftServer.cpp:297] Using 0 SSL handshake threads
I0416 19:14:16.656297 32596 ThriftServer.cpp:226] libevent 2.0.21-stable method epoll
I0416 19:14:16.656374 32596 ThriftServer.cpp:297] Using 0 SSL handshake threads
I0416 19:14:17.655398 32586 Main.cpp:92] Waiting for FibService to come up...
I0416 19:14:18.685287 32586 Main.cpp:92] Waiting for FibService to come up...
I0416 19:14:19.691310 32586 Main.cpp:92] Waiting for FibService to come up...
[...]
I0416 19:14:45.831463 32586 Main.cpp:92] Waiting for FibService to come up...
W0416 19:14:46.683989 32594 NetlinkFibHandler.cpp:73] Open/R health check: FAIL. Expiring routes!
I0416 19:14:46.684650 32594 NetlinkFibHandler.cpp:343] Syncing FIB with provided routes. Client: UNKNOWN(id=0)
I0416 19:14:46.685017 32594 NetlinkSocket.cpp:843] Syncing 0 routes
I0416 19:14:46.685214 32594 NetlinkSocket.cpp:868] Sync: number of routes to delete: 0
I0416 19:14:46.685264 32594 NetlinkSocket.cpp:879] Sync: number of routes to add: 0
I0416 19:14:46.685312 32594 NetlinkSocket.cpp:846] Sync done.
W0416 19:14:46.685636 32594 NetlinkFibHandler.cpp:77] Expired routes on health check failure!
I0416 19:14:46.837117 32586 Main.cpp:92] Waiting for FibService to come up...
[...]

Environment

  • b887c28, d706183
  • OS version: ubuntu-16.04 (daeomons isolated in network namespaces)
    ...

Minimal test code / Steps to reproduce the issue

I'm running 3 daemons in a network with following options:

--alloc_prefix_len=128 --assume_drained=False --config_store_filepath=/tmp/aq_persistent_config_store.bin --decision_debounce_max_ms=250 --decision_debounce_min_ms=10 --decision_rep_port=60004 --domain=openr --dryrun=False --enable_subnet_validation=True --enable_fib_sync=False --enable_health_checker=False --enable_legacy_flooding=True --enable_lfa=False --enable_netlink_fib_handler=True --enable_netlink_system_handler=True --enable_perf_measurement=True --enable_prefix_alloc=False --enable_rtt_metric=True --enable_secure_thrift_server=False --enable_segment_routing=False --enable_spark=True --enable_v4=False --enable_watchdog=True --fib_handler_port=60100 --fib_rep_port=60009 --health_checker_ping_interval_s=3 --health_checker_rep_port=60012 --ifname_prefix=r --iface_regex_exclude= --iface_regex_include=r.* --ip_tos=192 --key_prefix_filters= --kvstore_flood_msg_per_sec=0 --kvstore_flood_msg_burst_size=0 --kvstore_flood_msg_per_sec=0 --kvstore_ttl_decrement_ms=1 --kvstore_zmq_hwm=65536 --link_flap_initial_backoff_ms=1000 --link_flap_max_backoff_ms=60000 --link_monitor_cmd_port=60006 --loopback_iface=lo --memory_limit_mb=300 --minloglevel=0 --node_name=r1 --override_loopback_addr=False --prefix_manager_cmd_port=60011 --prefixes= --redistribute_ifaces=lo1 --seed_prefix= --set_leaf_node=False --set_loopback_address=False --spark_fastinit_keepalive_time_ms=100 --spark_hold_time_s=30 --spark_keepalive_time_s=3 --static_prefix_alloc=False --tls_acceptable_peers= --tls_ecc_curve_name=prime256v1 --tls_ticket_seed_path= --x509_ca_path= --x509_cert_path= --x509_key_path= --logbufsecs=0 --log_dir=/var/log --max_log_size=1 --v=1

What's the actual result?

OpenR waits for the FibService to come up.

What's the expected result?

OpenR should warn you that IPv6 is disabled.

docker: build fails

Description

Openr does not build with docker.

Environment

  • 54a7021
  • OS version: Docker
  • Host version: CentOS 7

Minimal test code / Steps to reproduce the issue

Build docker config file:

python fbcode_builder/make_docker_context.py

Build:

sudo docker build -t openr-build . | tee log

What's the actual result?

Step 65/186 : RUN CXXFLAGS="$CXXFLAGS -fPIC -isystem "'/home/install'"/include" CFLAGS="$CFLAGS -fPIC -isystem "'/home/install'"/include" cmake -D'CMAKE_INSTALL_PREFIX'='/home/install' -D'BUILD_SHARED_LIBS'='ON' -D'BUILD_TESTS'='ON' '..'
 ---> Running in c0a64b62f155
-- The CXX compiler identification is GNU 5.4.0
-- The C compiler identification is GNU 5.4.0
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
CMake Error at /usr/share/cmake-3.5/Modules/CMakeFindDependencyMacro.cmake:45 (message):
  Invalid arguments to find_dependency
Call Stack (most recent call first):
  /home/install/lib/cmake/folly/folly-config.cmake:58 (find_dependency)
  CMakeLists.txt:36 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/fizz/fizz/build/CMakeFiles/CMakeOutput.log".
The command '/bin/bash -c CXXFLAGS="$CXXFLAGS -fPIC -isystem "'/home/install'"/include" CFLAGS="$CFLAGS -fPIC -isystem "'/home/install'"/include" cmake -D'CMAKE_INSTALL_PREFIX'='/home/install' -D'BUILD_SHARED_LIBS'='ON' -D'BUILD_TESTS'='ON' '..'' returned a non-zero code: 1

What's the expected result?

Should build openr.

Test in Python 2 + Python 3 with Travis/GitHub Action

Issue Description

  • Can we please have travis test Python aspects of OpenR in both Python 2 and Python 3.

Environment

In you Ubuntu travis environment should be enough

Minimal test code / Steps to reproduce the issue

  • No repro, just want to see things tested in both Python versions.

What's the actual result?

Travis showing that Python aspects pass in both versions or only Python 3 (as far as I am concerned 👍)

What's the expected result?

Python 3 first.

About:run_openr.sh

Please use this template for reporting suspected bugs or requests for help.

Issue Description

/etc/sysconfig/openr No files or folders

Environment

  • OS version: <e.g. ubuntu-16.04>
    ...

Minimal test code / Steps to reproduce the issue

Run OpenR

$ run_openr.sh

You can also pass in a custom configuration file and override/add openr flags:

$ run_openr.sh --help
USAGE: run_openr.sh [config_file_path] [openr_flags]
If config_file_path is not provided, we will source the one at /etc/sysconfig/openr
If openr_flags are provided, they will be passed along to openr and override any passed by this script

What's the actual result?

zy@zy-pc:~/openr/openr/scripts$ ./run_openr.sh
./run_openr.sh: line 77: /etc/sysconfig/openr: 没有那个文件或目录
Configuration not found at /etc/sysconfig/openr. Using default configuration
openr[25418]: Starting OpenR daemon.
I1221 18:27:36.451370 25421 Main.cpp:366] Starting Watchdog thread ...
I1221 18:27:36.452584 25418 FunctionScheduler.cpp:324] Starting FunctionScheduler with 0 functions.
I1221 18:27:36.453409 25423 NetlinkSystemHandler.cpp:114] Initializng Netlink from server thread
I1221 18:27:36.453805 25423 Main.cpp:409] Starting NetlinkSystem server...
I1221 18:27:36.454073 25423 ThriftServer.cpp:261] libevent 2.0.21-stable method epoll
I1221 18:27:36.458585 25424 Main.cpp:433] Starting ConfigStore thread...
I1221 18:27:36.464072 25425 Main.cpp:453] Starting ZmqMonitor thread...
I1221 18:27:36.472856 25426 Main.cpp:478] Starting KvStore thread...
I1221 18:27:36.475240 25418 PrefixManager.cpp:68] Successfully loaded prefixes from disk
I1221 18:27:36.475607 25418 PrefixManager.cpp:105] writing my prefix to KvStore prefix:zy-pc
I1221 18:27:36.480376 25428 Main.cpp:502] Starting the PrefixManager thread...
E1221 18:27:36.480763 25418 KnownKeysStore.cpp:24] Failed reading known keys, file might be missing
I1221 18:27:36.487848 25429 Main.cpp:569] Starting the spark thread...
I1221 18:27:36.489207 25418 LinkMonitor.cpp:149] Loading link-monitor config
I1221 18:27:36.491371 25429 Spark.cpp:425] Constructing Spark server for node zy-pc
I1221 18:27:36.493424 25435 PosixThreadFactory.cpp:194] setpriority failed (are you root?) with error 13: Permission denied
I1221 18:27:36.493664 25434 PosixThreadFactory.cpp:194] setpriority failed (are you root?) with error 13: Permission denied
I1221 18:27:36.493795 25433 PosixThreadFactory.cpp:194] setpriority failed (are you root?) with error 13: Permission denied
I1221 18:27:36.493713 25429 Spark.cpp:548] Spark thread attaching socket/events callbacks...
I1221 18:27:36.494040 25430 PosixThreadFactory.cpp:194] setpriority failed (are you root?) with error 13: Permission denied
I1221 18:27:36.497334 25432 PosixThreadFactory.cpp:194] setpriority failed (are you root?) with error 13: Permission denied
I1221 18:27:36.500648 25423 ThriftServer.cpp:393] Using 0 SSL handshake threads
I1221 18:27:36.501008 25418 LinkMonitor.cpp:259] Connect to Spark for neighbor events
I1221 18:27:36.502368 25431 PosixThreadFactory.cpp:194] setpriority failed (are you root?) with error 13: Permission denied
I1221 18:27:36.504649 25439 ThreadManager.tcc:374] ThreadManager::add called with numa == true, but not a NumaThreadManager
I1221 18:27:37.515449 25439 Cpp2Connection.cpp:151] Task killed due to channel close: [::1]:52316
E1221 18:27:37.515528 25418 LinkMonitor.cpp:1057] Failed to sync LinkDb from NetlinkSystemHandler. Error: apache::thrift::transport::TTransportException: Timed Out
I1221 18:27:37.515786 25441 Main.cpp:673] Starting LinkMonitor thread...
I1221 18:27:37.518009 25441 LinkMonitor.cpp:160] Loaded link-monitor config from disk.
I1221 18:27:37.518066 25441 LinkMonitor.cpp:54] LinkMonitor config ....
I1221 18:27:37.518082 25441 LinkMonitor.cpp:55] nodeLabel: 1
I1221 18:27:37.518116 25441 LinkMonitor.cpp:56] isOverloaded: false
I1221 18:27:37.520366 25442 Main.cpp:703] Starting Decision thread...
I1221 18:27:37.522626 25418 Fib.cpp:123] Fib thread attaching socket/timeout callbacks...
I1221 18:27:37.524865 25443 Main.cpp:728] Starting FIB thread ...
I1221 18:27:37.524992 25418 Main.cpp:764] Starting main event loop...
I1221 18:27:37.531600 25441 LinkMonitor.cpp:474] InterfaceDb Sync is successful
I1221 18:27:38.522945 25443 AsyncSocket.cpp:2178] AsyncSocket::handleConnect(this=0x7f867c001040, fd=133 host=[::1]:60100) exception: AsyncSocketException: connect failed, type = Socket not open, errno = 111 (Connection refused)
E1221 18:27:38.523689 25443 Fib.cpp:68] Failed to make thrift call to Switch Agent. Error: apache::thrift::transport::TTransportException: AsyncSocketException: connect failed, type = Socket not open, errno = 111 (Connection refused): Connection refused
I1221 18:27:39.523697 25443 AsyncSocket.cpp:2178] AsyncSocket::handleConnect(this=0x7f867c001040, fd=133 host=[::1]:60100) exception: AsyncSocketException: connect failed, type = Socket not open, errno = 111 (Connection refused)
E1221 18:27:39.524235 25443 Fib.cpp:68] Failed to make thrift call to Switch Agent. Error: apache::thrift::transport::TTransportException: AsyncSocketException: connect failed, type = Socket not open, errno = 111 (Connection refused): Connection refused
^CI1221 18:27:39.969753 25418 AsyncSignalHandler.cpp:43] AsyncSignalHandler: Received signal 2
I1221 18:27:39.969815 25418 StopEventLoopSignalHandler.h:29] Received signal: 2. Stopping event loop ...
I1221 18:27:39.969877 25418 Main.cpp:766] Main event loop got stopped
I1221 18:27:39.969970 25442 Main.cpp:706] Decision thread got stopped.
I1221 18:27:39.970103 25441 Main.cpp:676] LinkMonitor thread got stopped.
I1221 18:27:39.970140 25429 Main.cpp:572] Spark thread got stopped.
I1221 18:27:39.970183 25443 Main.cpp:731] FIB thread got stopped.
I1221 18:27:39.970232 25428 Main.cpp:505] PrefixManager thread got stopped.
I1221 18:27:39.970453 25426 Main.cpp:481] KvStore thread got stopped.
I1221 18:27:39.970551 25425 Main.cpp:456] ZmqMonitor thread got stopped.
I1221 18:27:39.970655 25424 Main.cpp:436] ConfigStore thread got stopped.
I1221 18:27:39.970696 25421 Main.cpp:369] Watchdog thread got stopped.
I1221 18:27:39.972223 25439 Acceptor.cpp:451] Dropping all connections from Acceptor=0x7f8684009a90 in thread 0x7f8654000b00
I1221 18:27:39.973006 25423 Main.cpp:411] NetlinkSystem server got stopped.
openr[25418]: Stopping OpenR daemon.

What's the expected result?

-:)
Thanks!

Unused options error in make_docker_context.py

Issue Description

When running make_docker_context.py, it fails with an Unused options error

Environment

  • tag or commit hash on which this occured
    master
  • OS version: <e.g. ubuntu-16.04>
    CentOS 7
    ...

Minimal test code / Steps to reproduce the issue

Just run ./make_docker_context.py in build/fbcode_builder

What's the actual result?

/tmp/openr/build/fbcode_builder (master %=) > ./make_docker_context.py 
INFO: Docker ccache not enabled
Traceback (most recent call last):
  File "./make_docker_context.py", line 173, in <module>
    config['github_project'],
  File "./make_docker_context.py", line 154, in make_docker_context
    dockerfile = builder.render(get_steps_fn(builder))
  File "/tmp/openr/build/fbcode_builder/fbcode_builder.py", line 136, in render
    .format(unused_options)
RuntimeError: Unused options: set([u'prefix', u'make_parallelism', u'projects_dir']) -- please check if you made a typo in any of them. Those that are truly not useful should be not be set so that this typo detection can be useful.

What's the expected result?

No error and the Dockerfile is generated.

Note: If I simply remove that unused options check the Dockerfile is generated (but I think it then ignores those 3 options).

Can't compile in ubuntu docker images

Issue Description

I'm trying to compile open/r using the docker images, but it fails for both the Ubuntu 14 and 16 images

Environment

  • tag or commit hash on which this occured
    master
  • OS version: <e.g. ubuntu-16.04>
    host: CentOS 7
    docker: Ubuntu-16.04 and Ubuntu-14.04

Minimal test code / Steps to reproduce the issue

For Ubuntu-16.04:

    ./make_docker_context.py --prefix /tmp/openr-output --projects-dir /tmp/openr-output --make-parallelism 5 --os-image ubuntu:16.04 --docker-context-dir /tmp/openr-docker --gcc-version 5
    cd /tmp/openr-docker
    docker build .
    docker run -ti -v /tmp:/tmp -u root <image-id> bash
    cd /tmp/openr/build/
    ./build_openr.sh

For Ubuntu-14.04:

    ./make_docker_context.py --prefix /tmp/openr-output --projects-dir /tmp/openr-output --make-parallelism 5 --os-image ubuntu:14.04 --docker-context-dir /tmp/openr-docker
    cd /tmp/openr-docker
    docker build .
    docker run -ti -v /tmp:/tmp -u root <image-id> bash
    cd /tmp/openr/build/
    ./build_openr.sh

What's the actual result?

For Ubuntu-16.04:

root@8a4eee82e97b:/tmp/openr/build# ./build_openr.sh 
+++ dirname ./build_openr.sh
++ readlink -f .
+ BUILD_DIR=/tmp/openr/build
+ export DESTDIR=
+ DESTDIR=
+ mkdir -p /tmp/openr/build/deps
+ cd /tmp/openr/build/deps
+ sudo apt-get update
<snip lots of updates>
checking if g++ supports C++1y features with -std=gnu++1y... yes
checking whether -Wunknown-warning-option is supported... no
checking whether -Wshadow-local and -Wshadow-compatible-local are supported... no
checking for main in -lgflags... yes
checking for gflags viability... no
configure: error: "gflags invalid, see config.log for details"

And in the ./deps/folly/folly/config.log I see this:

configure:17189: checking for main in -lgflags
configure:17208: g++ -o conftest -std=gnu++1y -g -O2   conftest.cpp -lgflags  -lpthread >&5
configure:17208: $? = 0
configure:17217: result: yes
configure:17231: checking for gflags viability
configure:17253: g++ -o conftest -std=gnu++1y -g -O2   conftest.cpp -lgflags -lpthread >&5
/tmp/ccA8lQpH.o: In function `__static_initialization_and_destruction_0':
/tmp/openr/build/deps/folly/folly/conftest.cpp:27: undefined reference to `google::FlagRegisterer::FlagRegisterer<bool>(char const*, char const*, char const*, bool*, bool*)'
/tmp/openr/build/deps/folly/folly/conftest.cpp:28: undefined reference to `google::FlagRegisterer::FlagRegisterer<bool>(char const*, char const*, char const*, bool*, bool*)'
collect2: error: ld returned 1 exit status
configure:17253: $? = 1
configure: program exited with status 1

For Ubuntu-14.04:

root@e05e6f736ee9:/tmp/openr/build# sudo ./build_openr.sh 
+++ dirname ./build_openr.sh
++ readlink -f .
+ BUILD_DIR=/tmp/openr/build
+ export DESTDIR=
+ DESTDIR=
+ mkdir -p /tmp/openr/build/deps
+ cd /tmp/openr/build/deps
+ sudo apt-get update
<snip lots of updates>
libtool: link: (cd ".libs" && rm -f "libglog.so.0" && ln -s "libglog.so.0.0.0" "libglog.so.0")
libtool: link: (cd ".libs" && rm -f "libglog.so" && ln -s "libglog.so.0.0.0" "libglog.so")
libtool: link: ar cru .libs/libglog.a  src/libglog_la-logging.o src/libglog_la-raw_logging.o src/libglog_la-vlog_is_on.o src/libglog_la-utilities.o src/libglog_la-demangle.o src/libglog_la-symbolize.o src/libglog_la-signalhandler.o
libtool: link: ranlib .libs/libglog.a
libtool: link: ( cd ".libs" && rm -f "libglog.la" && ln -s "../libglog.la" "libglog.la" )
g++ -DHAVE_CONFIG_H -I. -I./src  -I./src  -pthread     -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare  -DNO_FRAME_POINTER  -g -O2 -MT src/logging_unittest-logging_unittest.o -MD -MP -MF src/.deps/logging_unittest-logging_unittest.Tpo -c -o src/logging_unittest-logging_unittest.o `test -f 'src/logging_unittest.cc' || echo './'`src/logging_unittest.cc
src/logging_unittest.cc:64:17: error: 'GFLAGS_NAMESPACE' is not a namespace-name
 using namespace GFLAGS_NAMESPACE;
                 ^
src/logging_unittest.cc:64:33: error: expected namespace-name before ';' token
 using namespace GFLAGS_NAMESPACE;
                                 ^
make: *** [src/logging_unittest-logging_unittest.o] Error 1

What's the expected result?

Being able to build open/r

glog flags like --logtostderr are missing on a clean build

Please use this template for reporting suspected bugs or requests for help.

Issue Description

If you run the build_openr.sh script on a clean system where OpenR has not been compiled before,
the glog flags are missing from the openr binary (so you do not see them in the help, and trying to use them complains about these flags being missing).

The reason for this is that build_openr.sh builds glog before gflags:

#
# install other dependencies from source
#
install_glog
install_gflags

Which means the glog installation can't find gflags, so it doesn't include those.

This can be seen for example in the logging.h file.

On the first compile:

└─⊳ grep -1 gflags\.h deps/glog/src/glog/logging.h
#if 0
#include <gflags/gflags.h>
#endif

On the second compile:

└─⊳ grep -1 gflags\.h deps/glog/src/glog/logging.h
#if 1
#include <gflags/gflags.h>
#endif

The fix is to simply reorder those lines so gflags is always created before glog

Environment

  • tag or commit hash on which this occured
  • OS version: <e.g. ubuntu-16.04>
    I used 439a9cd890e37749de4a1c94aa5091c61ef79090, but the issue is still present on master

Minimal test code / Steps to reproduce the issue

  1. do a clean compilation of openr

What's the actual result?

openr --logtostderr
openr[5961]: Starting OpenR daemon.
ERROR: unknown command line flag 'logtostderr'

What's the expected result?

openr --logtostderr
openr[6010]: Starting OpenR daemon.
I0524 18:05:40.330364  6013 Main.cpp:419] Starting Watchdog thread ...
I0524 18:05:40.340278  6017 NetlinkSystemHandler.cpp:114] Initializng Netlink from server thread
I0524 18:05:40.340450  6017 Main.cpp:480] Starting NetlinkSystem server...
I0524 18:05:40.340917  6018 Main.cpp:504] Starting ConfigStore thread...
I0524 18:05:40.341977  6020 Main.cpp:524] Starting ZmqMonitor thread...
I0524 18:05:40.343966  6022 Main.cpp:549] Starting KvStore thread...
<snip>

make error when use docker

Please use this template for reporting suspected bugs or requests for help.

Issue Description

Scanning dependencies of target OpenrCtrl-cpp2-target
[ 32%] Generating OpenrCtrl files. Output: /home/openr/build/thrift-out/openr/if
[ 32%] Built target OpenrCtrl-cpp2-target
Scanning dependencies of target OpenrCtrl-cpp2-obj
[ 32%] Building CXX object CMakeFiles/OpenrCtrl-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/OpenrCtrl_constants.cpp.o
In file included from /home/openr/build/thrift-out/openr/if/gen-cpp2/OpenrCtrl_constants.h:11:0,
from /home/openr/build/thrift-out/openr/if/gen-cpp2/OpenrCtrl_constants.cpp:8:
/home/openr/build/thrift-out/openr/if/gen-cpp2/OpenrCtrl_types.h:16:46: fatal error: openr/if/gen-cpp2/Decision_types.h: No such file or directory
compilation terminated.
make[2]: *** [CMakeFiles/OpenrCtrl-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/OpenrCtrl_constants.cpp.o] Error 1

Environment

ubuntu 18.04 gcc 7.4

Minimal test code / Steps to reproduce the issue

What's the actual result?

What's the expected result?

build success

Docker Build Error on folly

Resolution: Increase memory.
Omitting the majority of the log file, will post it if wanted. Build appears to be failing in folly directory.

Built in brand new ubuntu/xenial64 Vagrant environment, with Docker installed.
Command adapted from fbcode_builder instructions. Used appropriate variables from travis.yml due to Travis script not working out of box. #3

ubuntu@ubuntu-xenial:~/openr/build/fbcode_builder$ os_image=ubuntu:16.04 gcc_version=5 make_parallelism=2 travis_cache_dir=~/travis_ccache ./travis_docker_build.sh &> build_at_$(date +'%Y%m%d_%H%M%S').log

Omitting output.

depbase=`echo experimental/JSONSchema.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
/bin/bash ./libtool  --tag=CXX   --mode=compile ccache g++ -DHAVE_CONFIG_H   -I./.. -pthread -I/usr
/include  -I/home/install/include  -std=gnu++1y -g -O2 -MT experimental/JSONSchema.lo -MD -MP -MF $
depbase.Tpo -c -o experimental/JSONSchema.lo experimental/JSONSchema.cpp &&\
mv -f $depbase.Tpo $depbase.Plo
libtool: compile:  ccache g++ -DHAVE_CONFIG_H -I./.. -pthread -I/usr/include -I/home/install/includ
e -std=gnu++1y -g -O2 -MT experimental/JSONSchema.lo -MD -MP -MF experimental/.deps/JSONSchema.Tpo
-c experimental/JSONSchema.cpp  -fPIC -DPIC -o experimental/.libs/JSONSchema.o
depbase=`echo experimental/NestedCommandLineApp.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
/bin/bash ./libtool  --tag=CXX   --mode=compile ccache g++ -DHAVE_CONFIG_H   -I./.. -pthread -I/usr
/include  -I/home/install/include  -std=gnu++1y -g -O2 -MT experimental/NestedCommandLineApp.lo -MD
 -MP -MF $depbase.Tpo -c -o experimental/NestedCommandLineApp.lo experimental/NestedCommandLineApp.
cpp &&\
mv -f $depbase.Tpo $depbase.Plo
libtool: compile:  ccache g++ -DHAVE_CONFIG_H -I./.. -pthread -I/usr/include -I/home/install/includ
e -std=gnu++1y -g -O2 -MT experimental/NestedCommandLineApp.lo -MD -MP -MF experimental/.deps/Neste
dCommandLineApp.Tpo -c experimental/NestedCommandLineApp.cpp  -fPIC -DPIC -o experimental/.libs/Nes
tedCommandLineApp.o
g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-5/README.Bugs> for instructions.
make[2]: *** [experimental/JSONSchema.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
Makefile:2156: recipe for target 'experimental/JSONSchema.lo' failed
libtool: compile:  ccache g++ -DHAVE_CONFIG_H -I./.. -pthread -I/usr/include -I/home/install/includ
e -std=gnu++1y -g -O2 -MT experimental/NestedCommandLineApp.lo -MD -MP -MF experimental/.deps/Neste
dCommandLineApp.Tpo -c experimental/NestedCommandLineApp.cpp -o experimental/NestedCommandLineApp.o
 >/dev/null 2>&1
make[2]: Leaving directory '/home/folly/folly'
Makefile:2275: recipe for target 'all-recursive' failed
make[1]: Leaving directory '/home/folly/folly'
make[1]: *** [all-recursive] Error 1
Makefile:1302: recipe for target 'all' failed
make: *** [all] Error 2
The command '/bin/bash -c make -j '2'' returned a non-zero code: 2

Any ideas?

Two questions about open/R

Please use this template for reporting suspected bugs or requests for help.

Issue Description

first question, the NetlinkSocketTestis failed.
second question, there is a file named "platform_linux" will be compiled in /usr/local/sbin, I think it works as the platform agent for linux to program the routes, but when I run it after I run "run_openr", some core dump issues come up.

Environment

ubuntu-16.04

Minimal test code / Steps to reproduce the issue

first issue:
Start 13: NetlinkTypesTest
13/17 Test #13: NetlinkTypesTest ................. Passed 0.09 sec
Start 14: NetlinkSocketTest
14/17 Test #14: NetlinkSocketTest ................***Failed 28.45 sec
Start 15: PrefixManagerTest
15/17 Test #15: PrefixManagerTest ................ Passed 0.35 sec
Start 16: SparkTest
16/17 Test #16: SparkTest ........................ Passed 27.93 sec
Start 17: MockIoProviderTest
17/17 Test #17: MockIoProviderTest ............... Passed 0.28 sec

94% tests passed, 1 tests failed out of 17

Total Test time (real) = 424.98 sec

The following tests FAILED:
14 - NetlinkSocketTest (Failed)
Errors while running CTest
Makefile:117: recipe for target 'test' failed
make: *** [test] Error 8

second issue:
E1106 08:28:46.837707 4258 ThriftServer.cpp:397] Got an exception while setting up the server: 98failed to bind to async server socket: [::]:60099: Address already in use
E1106 08:28:46.844789 4259 ThriftServer.cpp:397] Got an exception while setting up the server: 98failed to bind to async server socket: [::]:60100: Address already in use
terminate called after throwing an instance of 'std::system_error'
what(): 98failed to bind to async server socket: [::]:60100: Address already in use
*** Aborted at 1541521726 (unix time) try "date -d @1541521726" if you are using GNU date ***
PC: @ 0x7fca01a47428 gsignal
terminate called recursively
*** SIGABRT (@0x3e80000109e) received by PID 4254 (TID 0x7fc9f9bbc700) from PID 4254; stack trace: ***
@ 0x7fca0300b390 (unknown)
@ 0x7fca01a47428 gsignal
@ 0x7fca01a4902a abort
@ 0x7fca0239984d __gnu_cxx::__verbose_terminate_handler()
@ 0x7fca023976b6 (unknown)
@ 0x7fca02397701 std::terminate()
@ 0x7fca023c2d38 (unknown)
@ 0x7fca030016ba start_thread
@ 0x7fca01b1941d clone
Aborted (core dumped)

What's the actual result?

What's the expected result?

I want to know if the "NetlinkSocketTest failed" will lead the openr doesn't work properly. And How can I enable the linux platform agent "platform_linux" after I run "run_openr"? Or the "run_openr" already contain the linux fib agent and I do not need to run another?

Thankyou

Compile again

Hi,

Latest version doesn't seem to want to compile:

Tried on Debian 8 and also ubuntu 17.04, seems to stop in the same place.

Getting a problem when it tries to make a reference to thrift:

Scanning dependencies of target openrlib [ 50%] Building CXX object CMakeFiles/openrlib.dir/allocators/PrefixAllocator.cpp.o [ 51%] Building CXX object CMakeFiles/openrlib.dir/common/KnownKeysStore.cpp.o [ 51%] Building CXX object CMakeFiles/openrlib.dir/common/ExponentialBackoff.cpp.o [ 52%] Building CXX object CMakeFiles/openrlib.dir/common/Util.cpp.o [ 53%] Building CXX object CMakeFiles/openrlib.dir/common/Constants.cpp.o [ 53%] Building CXX object CMakeFiles/openrlib.dir/config-store/PersistentStore.cpp.o [ 54%] Building CXX object CMakeFiles/openrlib.dir/config-store/PersistentStoreClient.cpp.o [ 54%] Building CXX object CMakeFiles/openrlib.dir/decision/Decision.cpp.o [ 55%] Building CXX object CMakeFiles/openrlib.dir/fib/Fib.cpp.o [ 56%] Building CXX object CMakeFiles/openrlib.dir/health-checker/HealthChecker.cpp.o [ 56%] Building CXX object CMakeFiles/openrlib.dir/kvstore/KvStoreClient.cpp.o [ 57%] Building CXX object CMakeFiles/openrlib.dir/kvstore/KvStore.cpp.o [ 57%] Building CXX object CMakeFiles/openrlib.dir/kvstore/KvStoreWrapper.cpp.o [ 58%] Building CXX object CMakeFiles/openrlib.dir/link-monitor/LinkMonitor.cpp.o [ 59%] Building CXX object CMakeFiles/openrlib.dir/nl/NetlinkIfSocket.cpp.o [ 59%] Building CXX object CMakeFiles/openrlib.dir/nl/NetlinkRouteSocket.cpp.o [ 60%] Building CXX object CMakeFiles/openrlib.dir/nl/NetlinkSubscriber.cpp.o [ 60%] Building CXX object CMakeFiles/openrlib.dir/platform/NetlinkFibHandler.cpp.o [ 61%] Building CXX object CMakeFiles/openrlib.dir/platform/NetlinkSystemHandler.cpp.o [ 62%] Building CXX object CMakeFiles/openrlib.dir/platform/PlatformPublisher.cpp.o [ 62%] Building CXX object CMakeFiles/openrlib.dir/prefix-manager/PrefixManager.cpp.o [ 63%] Building CXX object CMakeFiles/openrlib.dir/prefix-manager/PrefixManagerClient.cpp.o [ 64%] Building CXX object CMakeFiles/openrlib.dir/spark/IoProvider.cpp.o [ 64%] Building CXX object CMakeFiles/openrlib.dir/spark/SparkWrapper.cpp.o [ 65%] Building CXX object CMakeFiles/openrlib.dir/spark/Spark.cpp.o [ 65%] Linking CXX static library libopenrlib.a [ 65%] Built target openrlib Scanning dependencies of target fib_test [ 66%] Building CXX object CMakeFiles/fib_test.dir/fib/tests/FibTest.cpp.o [ 66%] Building CXX object CMakeFiles/fib_test.dir/fib/tests/MockNetlinkFibHandler.cpp.o [ 67%] Linking CXX executable fib_test /usr/local/lib/libthriftcpp2.so: undefined reference to apache::thrift::RequestRpcMetadata::~RequestRpcMetadata()'
collect2: error: ld returned 1 exit status
CMakeFiles/fib_test.dir/build.make:138: recipe for target 'fib_test' failed
make[2]: *** [fib_test] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/fib_test.dir/all' failed
make[1]: *** [CMakeFiles/fib_test.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
root@hub2-proxhub2-prox /home/jon/openr/build # `

image

Docker Build libnl patch failure

Following fbcode_builder Docker instructions. The application of the libnl patch fails due to invalid path to patch.

Step 155/176 : RUN git apply '/home'/''/'openr/build/fix-route-obj-attr-list.patch'
 ---> Running in 9282948f15c2
fatal: can't open patch '/home//openr/build/fix-route-obj-attr-list.patch': No such file or directory
The command '/bin/bash -c git apply '/home'/''/'openr/build/fix-route-obj-attr-list.patch'' returned a non-zero code: 128
+ build_exit_code=128

Command adapted from fbcode_builder instructions. Used appropriate variables from travis.yml:

ubuntu@ubuntu-xenial:~/openr/build/fbcode_builder$ os_image=ubuntu:16.04 gcc_version=5 make_parallelism=2 travis_cache_dir=~/travis_ccache ./travis_docker_build.sh &> build_at_$(date +'%Y%m%d_%H%M%S').log

Omitting log.

Step 145/176 : USER root
 ---> Running in ad4795367064
 ---> 42200aefe0cd
Removing intermediate container ad4795367064
Step 146/176 : RUN mkdir -p '/home' && chown 'nobody' '/home'
 ---> Running in ff3a615607e4
 ---> b03d9dba3ba0
Removing intermediate container ff3a615607e4
Step 147/176 : USER 'nobody'
 ---> Running in 498e7424d1ec
 ---> 8c12806307f3
Removing intermediate container 498e7424d1ec
Step 148/176 : WORKDIR '/home'
 ---> 962bb96c3e46
Removing intermediate container 02cb6da4bc4d
Step 149/176 : RUN git clone https://github.com/'thom311/libnl'
 ---> Running in 3a583b0d25ab
Cloning into 'libnl'...
 ---> 12f91c2ee263
Removing intermediate container 3a583b0d25ab
Step 150/176 : USER root
 ---> Running in 234429c9d4d9
 ---> beeeadd9ec94
Removing intermediate container 234429c9d4d9
Step 151/176 : RUN mkdir -p '/home'/'libnl'/'.' && chown 'nobody' '/home'/'libnl'/'.'
 ---> Running in e6b6847c7480
 ---> b4a6d4d38fd3
Removing intermediate container e6b6847c7480
Step 152/176 : USER 'nobody'
 ---> Running in aea6d7e5cdfe
 ---> b35d3fc2a729
Removing intermediate container aea6d7e5cdfe
Step 153/176 : WORKDIR '/home'/'libnl'/'.'
 ---> 75bc4133851b
Removing intermediate container 72645b3cb669
Step 154/176 : RUN git checkout 'libnl3_2_25'
 ---> Running in 8c6faf34cc12
Note: checking out 'libnl3_2_25'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at dcc5375... libnl-3.2.25 release
 ---> 4fca6570cf73
Removing intermediate container 8c6faf34cc12
Step 155/176 : RUN git apply '/home'/''/'openr/build/fix-route-obj-attr-list.patch'
 ---> Running in 9282948f15c2
fatal: can't open patch '/home//openr/build/fix-route-obj-attr-list.patch': No such file or directory
The command '/bin/bash -c git apply '/home'/''/'openr/build/fix-route-obj-attr-list.patch'' returned a non-zero code: 128
+ build_exit_code=128
+ echo 'Build failed with code 128, trying to save ccache'
Build failed with code 128, trying to save ccache

Is the ~/openr/build/fbcode_builder the correct directory to run the build command from? Anything incorrect here? Attempting manual Docker build due to #3.

Update workflow for One Step Build

Please use this template for reporting suspected bugs or requests for help.

Issue Description

According to #38 (comment) the one-step build script build_openr.sh is not maintained.

Environment

  • tag or commit hash on which this occurred: 6ccda74
  • OS version: ubuntu-16.04 server

Minimal test code / Steps to reproduce the issue

cd build
sudo bash ./build_openr.sh

What's the actual result?

Several issues during build, mainly because not all of the dependencies are frozen.

What's the expected result?

The build should succeed and OpenR and all dependencies included in the build are installed.

whwuiwuiui

Please use this template for reporting suspected bugs or requests for help.

Issue Description

Environment

  • tag or commit hash on which this occured
  • OS version: <e.g. ubuntu-16.04>
    ...

Minimal test code / Steps to reproduce the issue

What's the actual result?

What's the expected result?

make error HealthChecker_types.h missing

Issue Description

when making "e2e-image" on "terragraph.puma" make fail
openr/ig/gen-cpp2/HealthChecker_types.h: No such file or directory

Environment

a PC
Yocto build environment

  • OS version:
    ubuntu-18.04
    ...

Minimal test code / Steps to reproduce the issue

terragraph.puma/build-x86$ bitbake e2e-image

What's the actual result?

-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/OpenrCtrl.cpp.o -c thrift-out/openr/if/gen-cpp2/OpenrCtrl.cpp
| In file included from thrift-out/openr/if/gen-cpp2/OpenrCtrlAsyncClient.h:13,
| from thrift-out/openr/if/gen-cpp2/OpenrCtrl.h:14,
| from thrift-out/openr/if/gen-cpp2/OpenrCtrl.cpp:7:
| thrift-out/openr/if/gen-cpp2/OpenrCtrl_types.h:19:10: fatal error: openr/if/gen-cpp2/HealthChecker_types.h: No such file or directory
| #include "openr/if/gen-cpp2/HealthChecker_types.h"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

What's the expected result?

build pass

Build fail on ubuntu 18.04

Issue Description

I'm trying to build current master commit, but the build fails on ubuntu 18.04

Environment

ubuntu 18.04

  • tag or commit hash on which this occured
    master
  • OS version: ubuntu 18.04

Here is the log of error occured:

FAILED: CMakeFiles/openr_bin.dir/openr/Main.cpp.o 
/usr/bin/c++  -DFMT_LOCALE -DGFLAGS_IS_A_DLL=0 -I/tmp/fbcode_builder_getdeps-ZhomeZgdZopenrZbuildZfbcode_builder-root/repos/github.com-facebook-openr.git -I. -I/opt/facebook/re2-R1XCc2L15ALpkvbjVjkfoidVsPXjnGDG8ksFNARmizg/include -I/opt/facebook/libzmq-gn41ovlpYK63VEDWeg8M5sN4AzFJ0EHgoPkopuC08xg/include -isystem /opt/facebook/boost-kf4CALElOoOKdW_BQsSQtGGcsC3cmMDVBiSadJjAZcg/include -isystem /opt/facebook/fb303/include -isystem /opt/facebook/fbthrift/include -isystem /opt/facebook/folly/include -isystem /opt/facebook/double-conversion-KLOVP3MnqGD8CD6qyfSC0qHCLmWDTKUoRj7Xcv04GmM/include -isystem /opt/facebook/gflags-g8dDnqiYSWFBaA_iYwWmTKAicuNWJFWlVjc_qg0r_fk/include -isystem /opt/facebook/glog-DTjFLpvzyLWAKieaA0sAmyG_0SAz9UiDDjVwrJd89gY/include -isystem /opt/facebook/libevent-dtvP7TYdtYOXDTe3ViqRte8nkh5lY4Vqlie7VuYh4t0/include -isystem /opt/facebook/lz4-pLcX6qg17fAUJPqu4uMOosm5bDBAzrIAkRHj7pvAChQ/include -isystem /opt/facebook/zstd-QygZdEo2zXEVfOies4NwfhQujMEfr8oqifCnROwOfTg/include -isystem /opt/facebook/snappy-AYUfcUBRL4cdpKGcrmGt2LooExv9g8tFqPGuDnUBpvA/include -isystem /opt/facebook/fmt-DBfEjW6zLIyb73B3PSGPqFxW9p4DUksf1YMevoyi4OA/include -isystem /opt/facebook/wangle/include -isystem /opt/facebook/fizz/include -isystem /opt/facebook/libsodium-rCcHBB4cTz8S0Nei9c62IYlQKKNORHyZszYGt8wChdM/include -isystem /opt/facebook/fbzmq/include -Wall -Wextra -Wno-noexcept-type -Wno-maybe-uninitialized -Wno-deprecated-declarations -O2 -g -DNDEBUG   -std=gnu++1z -MD -MT CMakeFiles/openr_bin.dir/openr/Main.cpp.o -MF CMakeFiles/openr_bin.dir/openr/Main.cpp.o.d -o CMakeFiles/openr_bin.dir/openr/Main.cpp.o -c /tmp/fbcode_builder_getdeps-ZhomeZgdZopenrZbuildZfbcode_builder-root/repos/github.com-facebook-openr.git/openr/Main.cpp
/tmp/fbcode_builder_getdeps-ZhomeZgdZopenrZbuildZfbcode_builder-root/repos/github.com-facebook-openr.git/openr/Main.cpp:62:10: fatal error: folly/experimental/exception_tracer/ExceptionTracer.h: No such file or directory
 #include <folly/experimental/exception_tracer/ExceptionTracer.h>

It seems folly include dir do not have this header file? any suggestions?

Compiling for aarch64 architecture

Issue Description

Trying to compile OpenR for aarch64 linux distro, The cmake hardcoded in the install scripts is a x86-64 executable. I have compiled and installed cmake 13.4.0 on my own for this platform but the install scripts still tries to use the hardcoded cmake executables which of course fail. Please propose a way to disable cmake from the install scripts and just default using the native cmake installed in a system for building. (FYI there is no aarch64 precompiled lib available from the cmake repo, so just editing the cmake manifest file to point to a aarch64 variant is not possible for 13.4.0 version of cmake). Tried also with cmake 20.0.0 that is available in aarch64 version but it fails to compile as some deps are not detected correctly (like openssl).

Environment

  • tag or commit hash on which this occured
    master latest
  • OS version: <e.g. ubuntu-16.04>
    Ubuntu 16.04 lts aarch64

Minimal test code / Steps to reproduce the issue

initiate openR build script

What's the actual result?

Failed to compile libevent library when changing to 20.0.0 cmake that is available in aarch64 version.

-- The C compiler identification is GNU 7.5.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/local/bin/gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Found Git: /usr/bin/git
fatal: Not a git repository (or any of the parent directories): .git
-- Performing Test check_c_compiler_flag__Wall
-- Performing Test check_c_compiler_flag__Wall - Success
-- Performing Test check_c_compiler_flag__Wswitch
-- Performing Test check_c_compiler_flag__Wswitch - Success
-- Performing Test check_c_compiler_flag__fno_strict_aliasing
-- Performing Test check_c_compiler_flag__fno_strict_aliasing - Success
-- Looking for GNU_LIBRARY
-- Looking for GNU_LIBRARY - found
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for sys/socket.h
-- Looking for sys/socket.h - found
-- Looking for netinet/in.h
-- Looking for netinet/in.h - found
-- Looking for netinet/in6.h
-- Looking for netinet/in6.h - not found
-- Looking for unistd.h
-- Looking for unistd.h - found
-- Looking for netdb.h
-- Looking for netdb.h - found
-- Looking for dlfcn.h
-- Looking for dlfcn.h - found
-- Looking for arpa/inet.h
-- Looking for arpa/inet.h - found
-- Looking for fcntl.h
-- Looking for fcntl.h - found
-- Looking for inttypes.h
-- Looking for inttypes.h - found
-- Looking for memory.h
-- Looking for memory.h - found
-- Looking for poll.h
-- Looking for poll.h - found
-- Looking for port.h
-- Looking for port.h - not found
-- Looking for signal.h
-- Looking for signal.h - found
-- Looking for stdarg.h
-- Looking for stdarg.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stdlib.h
-- Looking for stdlib.h - found
-- Looking for strings.h
-- Looking for strings.h - found
-- Looking for string.h
-- Looking for string.h - found
-- Looking for sys/devpoll.h
-- Looking for sys/devpoll.h - not found
-- Looking for sys/epoll.h
-- Looking for sys/epoll.h - found
-- Looking for sys/eventfd.h
-- Looking for sys/eventfd.h - found
-- Looking for sys/event.h
-- Looking for sys/event.h - not found
-- Looking for sys/ioctl.h
-- Looking for sys/ioctl.h - found
-- Looking for sys/mman.h
-- Looking for sys/mman.h - found
-- Looking for sys/param.h
-- Looking for sys/param.h - found
-- Looking for sys/queue.h
-- Looking for sys/queue.h - found
-- Looking for sys/select.h
-- Looking for sys/select.h - found
-- Looking for sys/sendfile.h
-- Looking for sys/sendfile.h - found
-- Looking for sys/stat.h
-- Looking for sys/stat.h - found
-- Looking for sys/time.h
-- Looking for sys/time.h - found
-- Looking for sys/uio.h
-- Looking for sys/uio.h - found
-- Looking for include files sys/types.h, ifaddrs.h
-- Looking for include files sys/types.h, ifaddrs.h - found
-- Looking for mach/mach_time.h
-- Looking for mach/mach_time.h - not found
-- Looking for netinet/tcp.h
-- Looking for netinet/tcp.h - found
-- Looking for sys/wait.h
-- Looking for sys/wait.h - found
-- Looking for sys/resource.h
-- Looking for sys/resource.h - found
-- Looking for sys/sysctl.h
-- Looking for sys/sysctl.h - found
-- Looking for sys/timerfd.h
-- Looking for sys/timerfd.h - found
-- Looking for errno.h
-- Looking for errno.h - found
-- Looking for epoll_create
-- Looking for epoll_create - found
-- Looking for epoll_ctl
-- Looking for epoll_ctl - found
-- Looking for eventfd
-- Looking for eventfd - found
-- Looking for clock_gettime
-- Looking for clock_gettime - found
-- Looking for fcntl
-- Looking for fcntl - found
-- Looking for getaddrinfo
-- Looking for getaddrinfo - found
-- Looking for getnameinfo
-- Looking for getnameinfo - found
-- Looking for gettimeofday
-- Looking for gettimeofday - found
-- Looking for getprotobynumber
-- Looking for getprotobynumber - found
-- Looking for getservbyname
-- Looking for getservbyname - found
-- Looking for inet_ntop
-- Looking for inet_ntop - found
-- Looking for inet_pton
-- Looking for inet_pton - found
-- Looking for kqueue
-- Looking for kqueue - not found
-- Looking for mmap
-- Looking for mmap - found
-- Looking for pipe
-- Looking for pipe - found
-- Looking for pipe2
-- Looking for pipe2 - found
-- Looking for poll
-- Looking for poll - found
-- Looking for port_create
-- Looking for port_create - not found
-- Looking for sendfile
-- Looking for sendfile - found
-- Looking for sigaction
-- Looking for sigaction - found
-- Looking for signal
-- Looking for signal - found
-- Looking for splice
-- Looking for splice - found
-- Looking for strlcpy
-- Looking for strlcpy - not found
-- Looking for strsep
-- Looking for strsep - found
-- Looking for strtok_r
-- Looking for strtok_r - found
-- Looking for strtoll
-- Looking for strtoll - found
-- Looking for vasprintf
-- Looking for vasprintf - found
-- Looking for sysctl
-- Looking for sysctl - found
-- Looking for accept4
-- Looking for accept4 - found
-- Looking for arc4random
-- Looking for arc4random - not found
-- Looking for arc4random_buf
-- Looking for arc4random_buf - not found
-- Looking for epoll_create1
-- Looking for epoll_create1 - found
-- Looking for getegid
-- Looking for getegid - found
-- Looking for geteuid
-- Looking for geteuid - found
-- Looking for getifaddrs
-- Looking for getifaddrs - found
-- Looking for issetugid
-- Looking for issetugid - not found
-- Looking for mach_absolute_time
-- Looking for mach_absolute_time - not found
-- Looking for nanosleep
-- Looking for nanosleep - found
-- Looking for usleep
-- Looking for usleep - found
-- Looking for timeradd
-- Looking for timeradd - not found
-- Looking for timerclear
-- Looking for timerclear - not found
-- Looking for timercmp
-- Looking for timercmp - not found
-- Looking for timerfd_create
-- Looking for timerfd_create - found
-- Looking for timerisset
-- Looking for timerisset - not found
-- Looking for putenv
-- Looking for putenv - found
-- Looking for setenv
-- Looking for setenv - found
-- Looking for setrlimit
-- Looking for setrlimit - found
-- Looking for umask
-- Looking for umask - found
-- Looking for unsetenv
-- Looking for unsetenv - found
-- Looking for gethostbyname_r
-- Looking for gethostbyname_r - found
-- Checking prototype gethostbyname_r for EVENT__HAVE_GETHOSTBYNAME_R_3_ARG - False
-- Checking prototype gethostbyname_r for EVENT__HAVE_GETHOSTBYNAME_R_5_ARG - False
-- Checking prototype gethostbyname_r for EVENT__HAVE_GETHOSTBYNAME_R_6_ARG - True
-- Looking for select
-- Looking for select - found
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of uint8_t
-- Check size of uint8_t - done
-- Check size of uint16_t
-- Check size of uint16_t - done
-- Check size of uint32_t
-- Check size of uint32_t - done
-- Check size of uint64_t
-- Check size of uint64_t - done
-- Check size of short
-- Check size of short - done
-- Check size of int
-- Check size of int - done
-- Check size of unsigned
-- Check size of unsigned - done
-- Check size of unsigned int
-- Check size of unsigned int - done
-- Check size of long
-- Check size of long - done
-- Check size of long long
-- Check size of long long - done
-- Performing Test HAVE_INLINE
-- Performing Test HAVE_INLINE - Success
-- Looking for TAILQ_FOREACH
-- Looking for TAILQ_FOREACH - found
-- Looking for CTL_KERN
-- Looking for CTL_KERN - not found
-- Looking for KERN_ARND
-- Looking for KERN_ARND - not found
-- Looking for KERN_RANDOM
-- Looking for KERN_RANDOM - not found
-- Looking for RANDOM_UUID
-- Looking for RANDOM_UUID - not found
-- Looking for F_SETFD
-- Looking for F_SETFD - found
-- Check size of fd_mask
-- Check size of fd_mask - done
-- Check size of size_t
-- Check size of size_t - done
-- Check size of off_t
-- Check size of off_t - done
-- Check size of ssize_t
-- Check size of ssize_t - done
-- Check size of SSIZE_T
-- Check size of SSIZE_T - failed
-- Check size of socklen_t
-- Check size of socklen_t - done
-- Check size of pid_t
-- Check size of pid_t - done
-- Check size of pthread_t
-- Check size of pthread_t - done
-- Check size of uintptr_t
-- Check size of uintptr_t - done
-- Check size of void *
-- Check size of void * - done
-- Performing Test EVENT__HAVE_WAITPID_WITH_WNOWAIT
-- Performing Test EVENT__HAVE_WAITPID_WITH_WNOWAIT - Failed
-- Looking for _MINIX
-- Looking for _MINIX - not found
-- Looking for _POSIX_1_SOURCE
-- Looking for _POSIX_1_SOURCE - not found
-- Looking for _POSIX_SOURCE
-- Looking for _POSIX_SOURCE - found
-- Check size of struct addrinfo
-- Check size of struct addrinfo - done
-- Check size of struct in6_addr
-- Check size of struct in6_addr - done
-- Performing Test EVENT__HAVE_STRUCT_IN6_ADDR_S6_ADDR16
-- Performing Test EVENT__HAVE_STRUCT_IN6_ADDR_S6_ADDR16 - Success
-- Performing Test EVENT__HAVE_STRUCT_IN6_ADDR_S6_ADDR32
-- Performing Test EVENT__HAVE_STRUCT_IN6_ADDR_S6_ADDR32 - Success
-- Check size of sa_family_t
-- Check size of sa_family_t - done
-- Check size of struct sockaddr_in6
-- Check size of struct sockaddr_in6 - done
-- Performing Test EVENT__HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN
-- Performing Test EVENT__HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN - Failed
-- Performing Test EVENT__HAVE_STRUCT_SOCKADDR_IN_SIN_LEN
-- Performing Test EVENT__HAVE_STRUCT_SOCKADDR_IN_SIN_LEN - Failed
-- Check size of struct sockaddr_storage
-- Check size of struct sockaddr_storage - done
-- Performing Test EVENT__HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY
-- Performing Test EVENT__HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY - Success
-- Performing Test EVENT__HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY
-- Performing Test EVENT__HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY - Failed
CMake Error at /opt/facebook/cmake-AA6vHTxv5_KWMvgTGOWVbipzSkVjGuFLAe6ACsMRQ0E/share/cmake-3.20/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the
system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY
OPENSSL_INCLUDE_DIR)
Call Stack (most recent call first):
/opt/facebook/cmake-AA6vHTxv5_KWMvgTGOWVbipzSkVjGuFLAe6ACsMRQ0E/share/cmake-3.20/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
/opt/facebook/cmake-AA6vHTxv5_KWMvgTGOWVbipzSkVjGuFLAe6ACsMRQ0E/share/cmake-3.20/Modules/FindOpenSSL.cmake:570 (find_package_handle_standard_args)
CMakeLists.txt:683 (find_package)

-- Configuring incomplete, errors occurred!
See also "/tmp/fbcode_builder_getdeps-ZrootZmmwavesZopenrZbuildZfbcode_builder-root/build/libevent-urcq3ZGOglQ94yMJ5LETSRPR58oKUrOhHIXjzlZSloM/CMakeFiles/CMakeOutput.log".
See also "/tmp/fbcode_builder_getdeps-ZrootZmmwavesZopenrZbuildZfbcode_builder-root/build/libevent-urcq3ZGOglQ94yMJ5LETSRPR58oKUrOhHIXjzlZSloM/CMakeFiles/CMakeError.log".
Command '['/opt/facebook/cmake-AA6vHTxv5_KWMvgTGOWVbipzSkVjGuFLAe6ACsMRQ0E/bin/cmake', '/tmp/fbcode_builder_getdeps-ZrootZmmwavesZopenrZbuildZfbcode_builder-root/extracted/libevent-release-2.1.8-stable.tar.gz/libevent-release-2.1.8-stable', '-DCMAKE_INSTALL_PREFIX=/opt/facebook/libevent-urcq3ZGOglQ94yMJ5LETSRPR58oKUrOhHIXjzlZSloM', '-DBUILD_SHARED_LIBS=OFF', '-DCMAKE_BUILD_TYPE=RelWithDebInfo', '-DEVENT__DISABLE_TESTS=ON', '-DEVENT__DISABLE_BENCHMARK=ON', '-DEVENT__DISABLE_SAMPLES=ON', '-DEVENT__DISABLE_REGRESS=ON', '-G', 'Ninja']' returned non-zero exit status 1.
!! Failed
[ERROR]: Failed to build openr`

What's the expected result?

Should build libevent

FBThrift 'py3' support needed: No module named 'openr.thrift'

Issue Description

Hi, I've build openr on my machine according the README. After openr/py installed, the breeze command throws several module not found error like:

File "/usr/local/lib/python3.6/dist-packages/py_openr-1.0-py3.6.egg/openr/clients/openr_client.py", line 17, in <module>
ModuleNotFoundError: No module named 'openr.thrift'

It seems some python modules for py3 part is missing and I have no clue where is openr.thrift module and like openr.thrift.OpenrCtrlCpp.clients?

Can someone give me some hints to fix so that maybe I can contribute.

Environment

  • tag or commit hash on which this occured
    master
  • OS version: ubuntu 1804

Minimal test code / Steps to reproduce the issue

After built, run any breeze cmd

What's the actual result?

throws module not found error

$ breeze kvstore keys
Traceback (most recent call last):
  File "/usr/local/bin/breeze", line 33, in <module>
    sys.exit(load_entry_point('py-openr==1.0', 'console_scripts', 'breeze')())
  File "/home/gd/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 473, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/home/gd/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2843, in load_entry_point
    return ep.load()
  File "/home/gd/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2447, in load
    return self.resolve()
  File "/home/gd/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2453, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/local/lib/python3.6/dist-packages/py_openr-1.0-py3.6.egg/openr/cli/breeze.py", line 22, in <module>
  File "/usr/local/lib/python3.6/dist-packages/py_openr-1.0-py3.6.egg/openr/cli/clis/config.py", line 12, in <module>
  File "/usr/local/lib/python3.6/dist-packages/py_openr-1.0-py3.6.egg/openr/cli/commands/config.py", line 16, in <module>
  File "/usr/local/lib/python3.6/dist-packages/py_openr-1.0-py3.6.egg/openr/cli/utils/utils.py", line 28, in <module>
  File "/usr/local/lib/python3.6/dist-packages/py_openr-1.0-py3.6.egg/openr/clients/openr_client.py", line 17, in <module>
ModuleNotFoundError: No module named 'openr.thrift'

What's the expected result?

no module issues.

`python fbcode_builder/make_docker_context.py` produces corrupt Dockerfile

Issue Description

python fbcode_builder/make_docker_context.py puts ' (single-quotes) around many values, states in Dockerfile. Probably by echo-ing variables to output and encapsulate them wrong.

Environment

  • Current head 5b06765dbf2dc1a1bfc4d83ca47e0ca3f0a129b4
  • Linux stretch 4.9.0-8-amd64 #1 SMP Debian 4.9.130-2 (2018-10-27) x86_64 GNU/Linux from Vagrants debian/stretch64 (9.6.0)

Minimal test code / Steps to reproduce the issue

# clone openr
# follow build/README.md
# Run Step 1
# Run Step 2
# error, cmake can not even compile the test program

What's the actual result?

You can not use the build env...

What's the expected result?

Getting the build env finished without errors to have a look at open/r ;)

Fix

sed -ie "s/'//g" Dockerfile

ARM64 Build

Does this build on ARM64?

aarch64 / arm64

Latest and Ubuntu 16.04 on Scaleway

Compile error, seems to be a reference in folly build to some extensions that are not available.

g++: error: unrecognized command line option ‘-msse4.2’
g++: error: unrecognized command line option ‘-mpclmul’
Makefile:2178: recipe for target 'detail/libfollybasesse42_la-RangeSse42.lo' failed

Cheers,
Jon.

multi-area route redistribution sets incorrect routes on one area

Topology:


+------------------------+                      +---------------------------+
|                        |      Area "1" link   |                           |
| Node: First_00abcdef   |                      |  Node: Second_1234567890  |
| Namespace: n1          |Veth0          Veth0  +  Namespace: n2            |
| areas: "1"             +----------------------+  areas: "1", "2"          |
|                        |                      |                           |
|                        |                      |                           |
+------------------------+                      +-----------+---------------+
                                                            | veth1
                                             Area "2" link  |
                                                            |
                                                            |Veth0
                                                +-------------------------+
                                                |                         |
                                                | Node: Third_ab1234fefe  |
                                                | Namespace: n3           |
                                                | areas: "2"              |
                                                |                         |
                                                +-------------------------+


tested with:
ubuntu 20.04 with linux namespaces (kernel 5.4)
OpenR 2021-01-16 (d76157f)

#to recreate issue:
openr-multi-area.zip
to setup unzip files and :
sudo ./multi-area-openr.sh
will create 3 namespaces with OpenR instance each.

#to destroy setup
sudo ./multi-area-openr.sh stop

What's the actual result?

First node on n1 receives routes from Third node on n3 namespace. Which are in different areas.
fdfd:2:3:1::/64 via fe80::b801:49ff:fe41:5b7f dev veth0 proto 99 metric 10 pref medium
First node doesn't receive route from Second node on n2.
First node cant ping node n2 but can ping n3 via n2:

# ping fdfd:2:2::1
ping: connect: Network is unreachable
# ping fdfd:2:3::1
PING fdfd:2:3::1(fdfd:2:3::1) 56 data bytes
64 bytes from fdfd:2:3::1: icmp_seq=1 ttl=63 time=0.125 ms

Adjacencies and peers seem to be formed correctly, but the n1 received route from n3 and it is advertised as area 1 route

> Prefix: fdfd:2:3:1::/64
  via fe80::b801:49ff:fe41:5b7f dev veth0 weight 0 metric 1 area 1 

Second node on n2 receives routes from both areas correctly:

# ip -6 r | grep /56
fdfd:1:1::/56 via fe80::e48e:64ff:fe4a:6205 dev veth0 proto 99 metric 10 pref medium
fdfd:2:3::/56 via fe80::c0f9:c0ff:feca:d7e7 dev veth1 proto 99 metric 10 pref medium

Third node on n3 can ping both n1 and n2

notes:

  • when changing the order of areas in n2.conf we can switch the the effect from n1 to n3 so that implies that the first area in area list is the main one, other is semi-working.

Docker build fails on current release and on master

Please use this template for reporting suspected bugs or requests for help.

Issue Description

Current docker build fails

Environment

Minimal test code / Steps to reproduce the issue

cd openr/build
python fbcode_builder/make_docker_context.py
cd /tmp/docker-context-XXX
sudo docker build -t openr-build . | tee log

What's the actual result?

The build step compiling OpenR fails with:

Step 207/211 : WORKDIR '/home'/'openr'/'build'
Removing intermediate container 36c56466aa5e
 ---> c72a0fcfed38
Step 208/211 : RUN CXXFLAGS="$CXXFLAGS -fPIC -isystem "'/home/install'"/include" CFLAGS="$CFLAGS -fPIC -isystem "'/home/install'"/include" cmake -D'CMAKE_INSTALL_PREFIX'='/home/install' -D'BUILD_SHARED_LIBS'='ON' -D'ADD_ROOT_TESTS'='OFF' '..'
 ---> Running in 4dba5f1c17ef
[...]
[ 29%] Building CXX object CMakeFiles/OpenrCtrl-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/OpenrCtrl_constants.cpp.o
In file included from /home/openr/build/thrift-out/openr/if/gen-cpp2/OpenrCtrl_constants.h:11:0,
                 from /home/openr/build/thrift-out/openr/if/gen-cpp2/OpenrCtrl_constants.cpp:8:
/home/openr/build/thrift-out/openr/if/gen-cpp2/OpenrCtrl_types.h:16:46: fatal error: openr/if/gen-cpp2/Decision_types.h: No such file or directory
compilation terminated.
CMakeFiles/OpenrCtrl-cpp2-obj.dir/build.make:102: recipe for target 'CMakeFiles/OpenrCtrl-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/OpenrCtrl_constants.cpp.o' failed
make[2]: *** [CMakeFiles/OpenrCtrl-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/OpenrCtrl_constants.cpp.o] Error 1
make[1]: *** [CMakeFiles/OpenrCtrl-cpp2-obj.dir/all] Error 2
CMakeFiles/Makefile2:703: recipe for target 'CMakeFiles/OpenrCtrl-cpp2-obj.dir/all' failed
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
The command '/bin/bash -c PYTHONPATH="$PYTHONPATH:"'/home/install'/lib/python2.7/site-packages make -j '1'' returned a non-zero code: 2

For full logs and Dockerfile see:
full_log.zip

What's the expected result?

A successfully built docker container containing OpenR

Document PolicyEngine & Config to advertise Static Routes

Issue Description

77040d2 removed LinkMonitor CLI argument for redistributing static routes.

We should document how to do this with config.

Minimal test code / Steps to reproduce the issue

  • Pass the arg and it does not work

What's the expected result?

Have a documented way that works for OpenR Users to share static routes.

open/R build fails while running build_openr.sh with default configuration

Issue Description

open/R build fails while running build_openr.sh with default configuration. It fails in Allocator i.e. Prefix and Range Allocators

Environment

OS version: ubuntu-16.04

Minimal test code / Steps to reproduce the issue

Below is the step followed for open/R build:
openr/build$ bash ./build_openr.sh | tee output.txt

What's the actual result?

openr/openr/allocators/PrefixAllocator.cpp:451:12: required from here
/home/infonet/git-openr/openr/openr/allocators/RangeAllocator-inl.h:39:1: error: mangled name for ‘openr::RangeAllocator::RangeAllocator(const string&, const string&, openr::KvStoreClient*, std::function<void(folly::Optional) noexcept>, std::chrono::milliseconds, std::chrono::milliseconds, bool) [with T = unsigned int; std::__cxx11::string = std::__cxx11::basic_string; std::chrono::milliseconds = std::chrono::duration<long int, std::ratio<1, 1000> >]’ will change in C++17 because the exception specification is part of a function type [-Werror=noexcept-type]
RangeAllocator::RangeAllocator(
^~~~~~~~~~~~~~~~~
/openr/openr/allocators/RangeAllocator-inl.h:39:1: error: mangled name for ‘openr::RangeAllocator::RangeAllocator(const string&, const string&, openr::KvStoreClient*, std::function<void(folly::Optional) noexcept>, std::chrono::milliseconds, std::chrono::milliseconds, bool) [with T = unsigned int; std::__cxx11::string = std::__cxx11::basic_string; std::chrono::milliseconds = std::chrono::duration<long int, std::ratio<1, 1000> >]’ will change in C++17 because the exception specification is part of a function type [-Werror=noexcept-type]
/openr/openr/allocators/RangeAllocator-inl.h:39:1: error: mangled name for ‘openr::RangeAllocator::RangeAllocator(const string&, const string&, openr::KvStoreClient*, std::function<void(folly::Optional) noexcept>, std::chrono::milliseconds, std::chrono::milliseconds, bool) [with T = unsigned int]’ will change in C++17 because the exception specification is part of a function type [-Werror=noexcept-type]
In file included from /openr/openr/allocators/PrefixAllocator.h:29:0,
from /home/infonet/git-openr/openr/openr/allocators/PrefixAllocator.cpp:8:
/openr/openr/../openr/kvstore/KvStoreClient.h: In member function ‘void openr::PrefixAllocator::operator()(const openr::PrefixAllocatorModeStatic&)’:
/openr/openr/../openr/kvstore/KvStoreClient.h:194:34: error: mangled name for ‘folly::Optionalopenr::thrift::Value openr::KvStoreClient::subscribeKey(const string&, openr::KvStoreClient::KeyCallback, bool)’ will change in C++17 because the exception specification is part of a function type [-Werror=noexcept-type]
folly::Optionalthrift::Value subscribeKey(std::string const& key,
^~~~~~~~~~~~
cc1plus: all warnings being treated as errors
make[2]: *** [CMakeFiles/openrlib.dir/allocators/PrefixAllocator.cpp.o] Error 1
CMakeFiles/openrlib.dir/build.make:62: recipe for target 'CMakeFiles/openrlib.dir/allocators/PrefixAllocator.cpp.o' failed
CMakeFiles/Makefile2:1458: recipe for target 'CMakeFiles/openrlib.dir/all' failed
make[1]: *** [CMakeFiles/openrlib.dir/all] Error 2
make: *** [all] Error 2
Makefile:138: recipe for target 'all' failed

build fails on ubuntu 17.10

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=17.10
DISTRIB_CODENAME=artful
DISTRIB_DESCRIPTION="Ubuntu 17.10"

sudo bash ./build_openr.sh outputs

+ pushd .
~/openr/build/deps ~/openr/build/deps
+ [[ ! -e fbzmq ]]
+ git clone https://github.com/facebook/fbzmq.git
Cloning into 'fbzmq'...
remote: Counting objects: 8081, done.
remote: Compressing objects: 100% (132/132), done.
remote: Total 8081 (delta 67), reused 220 (delta 45), pack-reused 7836
Receiving objects: 100% (8081/8081), 830.73 KiB | 2.28 MiB/s, done.
Resolving deltas: 100% (2417/2417), done.
++ find_github_hash facebook/fbzmq
++ [[ 1 -eq 1 ]]
++ rev_file=github_hashes/facebook/fbzmq-rev.txt
++ [[ -f github_hashes/facebook/fbzmq-rev.txt ]]
++ head -1 github_hashes/facebook/fbzmq-rev.txt
++ awk '{ print $3 }'
+ rev=72d58988cc561c8b375a76ad451f21e3e0970349
+ cd fbzmq/fbzmq/build
+ [[ ! -z 72d58988cc561c8b375a76ad451f21e3e0970349 ]]
+ git checkout 72d58988cc561c8b375a76ad451f21e3e0970349
Note: checking out '72d58988cc561c8b375a76ad451f21e3e0970349'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at 72d5898... Updating submodules
+ cmake '-DCMAKE_CXX_FLAGS=-Wno-sign-compare -Wno-unused-parameter' -DBUILD_SHARED_LIBS=OFF -DCMAKE_EXE_LINKER_FLAGS=-static -DCMAKE_FIND_LIBRARY_SUFFIXES=.a -DBUILD_TESTS=OFF ..
-- The C compiler identification is GNU 7.2.0
-- The CXX compiler identification is GNU 7.2.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
Thrift will create the Object file : Monitor-cpp2-obj
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ohmer/openr/build/deps/fbzmq/fbzmq/build
+ make
Scanning dependencies of target Monitor-cpp2-target
[  5%] Generating Monitor files. Output: /home/ohmer/openr/build/deps/fbzmq/fbzmq/build/fbzmq/service/if
[  5%] Built target Monitor-cpp2-target
Scanning dependencies of target Monitor-cpp2-obj
[ 10%] Building CXX object CMakeFiles/Monitor-cpp2-obj.dir/fbzmq/service/if/gen-cpp2/Monitor_constants.cpp.o
[ 15%] Building CXX object CMakeFiles/Monitor-cpp2-obj.dir/fbzmq/service/if/gen-cpp2/Monitor_data.cpp.o
[ 21%] Building CXX object CMakeFiles/Monitor-cpp2-obj.dir/fbzmq/service/if/gen-cpp2/Monitor_types.cpp.o
[ 26%] Built target Monitor-cpp2-obj
Scanning dependencies of target fbzmq
[ 31%] Building CXX object CMakeFiles/fbzmq.dir/async/AsyncSignalHandler.cpp.o
In file included from /home/ohmer/openr/build/deps/fbzmq/fbzmq/../fbzmq/async/AsyncSignalHandler.h:14:0,
                 from /home/ohmer/openr/build/deps/fbzmq/fbzmq/async/AsyncSignalHandler.cpp:10:
/home/ohmer/openr/build/deps/fbzmq/fbzmq/../fbzmq/async/ZmqEventLoop.h: In constructor ‘fbzmq::ZmqEventLoop::PollSubscription::PollSubscription(int, fbzmq::SocketCallback&&)’:
/home/ohmer/openr/build/deps/fbzmq/fbzmq/../fbzmq/async/ZmqEventLoop.h:226:5: error: mangled name for ‘fbzmq::ZmqEventLoop::PollSubscription::PollSubscription(int, fbzmq::SocketCallback&&)’ will change in C++17 because the exception specification is part of a function type [-Werror=noexcept-type]
     PollSubscription(int events, SocketCallback&& callback)
     ^~~~~~~~~~~~~~~~
/home/ohmer/openr/build/deps/fbzmq/fbzmq/../fbzmq/async/ZmqEventLoop.h:226:5: error: mangled name for ‘fbzmq::ZmqEventLoop::PollSubscription::PollSubscription(int, fbzmq::SocketCallback&&)’ will change in C++17 because the exception specification is part of a function type [-Werror=noexcept-type]
/home/ohmer/openr/build/deps/fbzmq/fbzmq/../fbzmq/async/ZmqEventLoop.h: In constructor ‘fbzmq::ZmqEventLoop::TimeoutEvent::TimeoutEvent(std::chrono::_V2::steady_clock::time_point, fbzmq::TimeoutCallback&&, int64_t)’:
/home/ohmer/openr/build/deps/fbzmq/fbzmq/../fbzmq/async/ZmqEventLoop.h:241:5: error: mangled name for ‘fbzmq::ZmqEventLoop::TimeoutEvent::TimeoutEvent(std::chrono::_V2::steady_clock::time_point, fbzmq::TimeoutCallback&&, int64_t)’ will change in C++17 because the exception specification is part of a function type [-Werror=noexcept-type]
     TimeoutEvent(
     ^~~~~~~~~~~~
/home/ohmer/openr/build/deps/fbzmq/fbzmq/../fbzmq/async/ZmqEventLoop.h:241:5: error: mangled name for ‘fbzmq::ZmqEventLoop::TimeoutEvent::TimeoutEvent(std::chrono::_V2::steady_clock::time_point, fbzmq::TimeoutCallback&&, int64_t)’ will change in C++17 because the exception specification is part of a function type [-Werror=noexcept-type]
/home/ohmer/openr/build/deps/fbzmq/fbzmq/../fbzmq/async/ZmqEventLoop.h: At global scope:
/home/ohmer/openr/build/deps/fbzmq/fbzmq/../fbzmq/async/ZmqEventLoop.h:241:5: error: mangled name for ‘fbzmq::ZmqEventLoop::TimeoutEvent::TimeoutEvent(std::chrono::_V2::steady_clock::time_point, fbzmq::TimeoutCallback&&, int64_t)’ will change in C++17 because the exception specification is part of a function type [-Werror=noexcept-type]
/home/ohmer/openr/build/deps/fbzmq/fbzmq/../fbzmq/async/ZmqEventLoop.h:226:5: error: mangled name for ‘fbzmq::ZmqEventLoop::PollSubscription::PollSubscription(int, fbzmq::SocketCallback&&)’ will change in C++17 because the exception specification is part of a function type [-Werror=noexcept-type]
     PollSubscription(int events, SocketCallback&& callback)
     ^~~~~~~~~~~~~~~~
/home/ohmer/openr/build/deps/fbzmq/fbzmq/../fbzmq/async/ZmqEventLoop.h: In constructor ‘fbzmq::AsyncSignalHandler::AsyncSignalHandler(fbzmq::ZmqEventLoop*)’:
/home/ohmer/openr/build/deps/fbzmq/fbzmq/../fbzmq/async/ZmqEventLoop.h:143:8: error: mangled name for ‘void fbzmq::ZmqEventLoop::addSocketFd(int, int, fbzmq::SocketCallback)’ will change in C++17 because the exception specification is part of a function type [-Werror=noexcept-type]
   void addSocketFd(int socketFd, int events, SocketCallback callback);
        ^~~~~~~~~~~
cc1plus: all warnings being treated as errors
CMakeFiles/fbzmq.dir/build.make:62: recipe for target 'CMakeFiles/fbzmq.dir/async/AsyncSignalHandler.cpp.o' failed
make[2]: *** [CMakeFiles/fbzmq.dir/async/AsyncSignalHandler.cpp.o] Error 1
CMakeFiles/Makefile2:104: recipe for target 'CMakeFiles/fbzmq.dir/all' failed
make[1]: *** [CMakeFiles/fbzmq.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

How to advertise a prefix with specified metric?

Issue Description

I use breeze to advertise a prefix , but I want advertise a prefix with specified metric.
In our application scenarios, we should advertise some prefixes dynamically. We may advertise an identical prefix on different Open/R node since we want to offer our customers redundancy access service. So we want to set different metric to each identical prefix.

I did not find this feature in the Open/R's source code, Could you give me some guidance?
Or What do I need to do to implement it by myself if the OpenR doesn't include this feature?

Compile Error

Hi All,

I downloaded this and tried to compile, firstly on Debian 8 Jessie and then on Ubuntu 17.04, but both fail in the same place. I've not yet tried 16.04 though.

I used the provided install script.

It seems to be around the spark.cpp section:

/home/jon/openr/openr/spark/Spark.cpp: In member function ‘void openr::Spark::prepare(folly::Optional<int>)’: /home/jon/openr/openr/spark/Spark.cpp:445:66: error: throw will always call terminate() [-Werror=terminate] "Failed creating UDP socket: {}", folly::errnoStr(errno)));

image

Cheers :)

Jon.

Compiling on a low spec VM

Hi,
Trying to compile on a low resource VM in the cloud, only one gigabyte of memory allocated, seems to fail, pretty sure its lack of memory.
g++: internal compiler error: Killed (program cc1plus)
Are there any tweaks that will allow this to compile on a low spec machine such as this?
Cheers,
Jon.

[question] Is NetLink a hard-dependency?

I am not able to build OpenR on FreeBSD because NetLink is a Linux kernel protocol.

Is dependency on NetLink hard, or it is possible to disable it?

Thanks,
Yuri

Conenction failed in run_openr.sh

Please use this template for reporting suspected bugs or requests for help.

Issue Description

Connection failed while running run_openr.sh with default configuration.

Environment

ubuntu 17.10

What's the actual result?

$ ./run_openr.sh
./run_openr.sh: line 94: /etc/sysconfig/openr: No such file or directory
Configuration not found at /etc/sysconfig/openr. Using default configuration
openr[2672]: Starting OpenR daemon.
I0427 15:19:00.024416 2675 Main.cpp:419] Starting Watchdog thread ...
I0427 15:19:00.034060 2672 FunctionScheduler.cpp:323] Starting FunctionScheduler with 0 functions.
I0427 15:19:00.035585 2672 PersistentStore.cpp:156] Failed to read file contents from '/tmp/aq_persistent_config_store.bin'. Error (2): No such file or directory
E0427 15:19:00.035598 2672 PersistentStore.cpp:55] Failed to load config-database from file: /tmp/aq_persistent_config_store.bin
I0427 15:19:00.035655 2680 Main.cpp:504] Starting ConfigStore thread...
I0427 15:19:00.035948 2679 NetlinkSystemHandler.cpp:114] Initializng Netlink from server thread
I0427 15:19:00.035987 2679 Main.cpp:480] Starting NetlinkSystem server...
I0427 15:19:00.036290 2681 Main.cpp:524] Starting ZmqMonitor thread...
I0427 15:19:00.036597 2679 ThriftServer.cpp:261] libevent 2.0.21-stable method epoll
I0427 15:19:00.036864 2682 Main.cpp:549] Starting KvStore thread...
I0427 15:19:00.037708 2685 Main.cpp:574] Starting the PrefixManager thread...
E0427 15:19:00.037739 2672 KnownKeysStore.cpp:24] Failed reading known keys, file might be missing
I0427 15:19:00.037760 2679 ThriftServer.cpp:390] Using 0 SSL handshake threads
I0427 15:19:00.038846 2686 Main.cpp:648] Starting the spark thread...
I0427 15:19:00.039815 2672 LinkMonitor.cpp:149] Loading link-monitor config
I0427 15:19:00.039913 2672 LinkMonitor.cpp:255] Connect to Spark for neighbor events
I0427 15:19:00.039959 2686 Spark.cpp:427] Constructing Spark server for node shashi-All-Series
I0427 15:19:00.040031 2686 Spark.cpp:550] Spark thread attaching socket/events callbacks...
I0427 15:19:00.040076 2687 Main.cpp:755] Starting LinkMonitor thread...
I0427 15:19:00.040637 2688 Main.cpp:784] Starting Decision thread...
I0427 15:19:00.041105 2672 Fib.cpp:149] Fib thread attaching socket/timeout callbacks...
I0427 15:19:00.041188 2689 Main.cpp:810] Starting FIB thread ...
I0427 15:19:00.041220 2672 Main.cpp:847] Starting main event loop...
W0427 15:19:00.041541 2687 LinkMonitor.cpp:165] Failed to load link-monitor config. Setting node as UNDRAINED
I0427 15:19:00.140871 2687 LinkMonitor.cpp:1066] Syncing Interface DB from Netlink Platform
I0427 15:19:00.145431 2683 ThreadManager.tcc:374] ThreadManager::add called with numa == true, but not a NumaThreadManager
I0427 15:19:01.042603 2689 AsyncSocket.cpp:2194] AsyncSocket::handleConnect(this=0x7f8f50000b60, fd=129 host=[::1]:60100) exception: AsyncSocketException: connect failed, type = Socket not open, errno = 111 (Connection refused)
E0427 15:19:01.049522 2689 Fib.cpp:74] Failed to make thrift call to Switch Agent. Error: N6apache6thrift9transport19TTransportExceptionE: AsyncSocketException: connect failed, type = Socket not open, errno = 111 (Connection refused): Connection refused
I0427 15:19:02.043053 2689 AsyncSocket.cpp:2194] AsyncSocket::handleConnect(this=0x7f8f50000b60, fd=129 host=[::1]:60100) exception: AsyncSocketException: connect failed, type = Socket not open, errno = 111 (Connection refused)
E0427 15:19:02.043359 2689 Fib.cpp:74] Failed to make thrift call to Switch Agent. Error: N6apache6thrift9transport19TTransportExceptionE: AsyncSocketException: connect failed, type = Socket not open, errno = 111 (Connection refused): Connection refused

What's the expected result?

No connection issue and openr works sommothly with default configuration

run_openr.sh uses unknown command line flags

Issue Description

When launching OpenR using run_openr.sh an error message is displayed and execution is stopped.

Environment

  • tag or commit hash on which this occured
    master

  • OS version: <e.g. ubuntu-16.04>
    ubuntu-16.04

Minimal test code / Steps to reproduce the issue

execute run_openr.sh

What's the actual result?

root@13e42c1e5c91:/install# run_openr.sh 
Using OpenR config parameters from /etc/sysconfig/openr
openr[11]: Starting OpenR daemon.
openr[11]: Starting OpenR daemon.
ERROR: unknown command line flag 'logbufsecs'
ERROR: unknown command line flag 'logtostderr'
ERROR: unknown command line flag 'max_log_size'
ERROR: unknown command line flag 'v'

What's the expected result?

Starting the openr process without errors.
.

Trying to compile in CentOS 7 (want to know what compiler is used at Facebook?)

Issue Description

I am trying to compile and install OpenR in a CentOS 7 docker image.

According to the OpenR github-page ,
this should be supported, but I am running into issues compiling fbthrift.

These issues seem to be caused by a bug in the Red Hat Developer Toolset 7 that I use,
so I was wondering what toolset was used by Facebook when you got it to compile on CentOS 7.

I also tried devtoolset-6, but that doesn't offer proper C++14 support and fails compilation in different ways.

Environment

  • tag or commit hash on which this occured
    • commit hash d331eb0 , but with folly version bumped to include bugfix for #820 (otherwise it would not compile).
/tmp/openr-centos/build # git diff
diff --git a/build/deps/github_hashes/facebook/folly-rev.txt b/build/deps/github_hashes/facebook/folly-rev.txt
index f535f21..0491c68 100644
--- a/build/deps/github_hashes/facebook/folly-rev.txt
+++ b/build/deps/github_hashes/facebook/folly-rev.txt
@@ -1 +1 @@
-Subproject commit 7153cc6bf1b0f71b80ce4412fbc83163d10c9a2f
+Subproject commit e752dcd00ed4b8ff4d633e7996db027321ac7708
  • OS version: <e.g. ubuntu-16.04>
    CentOS 7,
    with devtoolset-7 installed.

Minimal test code / Steps to reproduce the issue

Run attached script,
which is a version of build_openr.sh updated for CentOS 7.

What's the actual result?

[ 31%] Built target compiler_generators
[ 32%] Linking CXX executable ../../bin/thrift1
[ 32%] Building CXX object thrift/lib/cpp/CMakeFiles/security.dir/util/kerberos/Krb5OlderVersionStubs.cpp.o
/jeroend/tmp/openr-centos/build/deps/fbthrift/thrift/lib/cpp/concurrency/TimerManager.cpp: In destructor 'virtual apache::thrift::concurrency::TimerManager::~TimerManager()':
/jeroend/tmp/openr-centos/build/deps/fbthrift/thrift/lib/cpp/concurrency/TimerManager.cpp:158:7: warning: throw will always call terminate() [-Wterminate]
       throw;
       ^~~~~
/jeroend/tmp/openr-centos/build/deps/fbthrift/thrift/lib/cpp/concurrency/TimerManager.cpp:158:7: note: in C++11 destructors default to noexcept
/opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7/libstdc++_nonshared.a(cow-stdexcept.o): In function `std::__sso_string::__sso_string(std::string const&)':
(.text._ZNSt12__sso_stringC2ERKSs+0x8): undefined reference to `std::__sso_string::__sso_string(char const*, unsigned long)'
/opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7/libstdc++_nonshared.a(cow-stdexcept.o): In function `std::_V2::error_category::_M_message(int) const':
(.text._ZNKSt3_V214error_category10_M_messageEi+0x30): undefined reference to `std::__sso_string::__sso_string(char const*, unsigned long)'
/opt/rh/devtoolset-7/root/usr/libexec/gcc/x86_64-redhat-linux/7/ld: ../../bin/thrift1: hidden symbol `_ZNSt12__sso_stringD1Ev' isn't defined
/opt/rh/devtoolset-7/root/usr/libexec/gcc/x86_64-redhat-linux/7/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
make[2]: *** [thrift/compiler/CMakeFiles/thrift1.dir/build.make:185: bin/thrift1] Error 1
make[1]: *** [CMakeFiles/Makefile2:115: thrift/compiler/CMakeFiles/thrift1.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 33%] Building CXX object thrift/lib/cpp/CMakeFiles/security.dir/util/kerberos/Krb5CredentialsCacheManager.cpp.o
[ 33%] Building CXX object thrift/lib/cpp/CMakeFiles/security.dir/util/kerberos/Krb5CCacheStore.cpp.o
[ 34%] Building CXX object thrift/lib/cpp/CMakeFiles/security.dir/util/kerberos/Krb5Tgts.cpp.o
[ 35%] Building CXX object thrift/lib/cpp/CMakeFiles/security.dir/util/kerberos/FBKrb5GetCreds.cpp.o
[ 36%] Linking CXX shared library ../../../lib/libthrift-core.so
[ 36%] Built target thrift-core
[ 36%] Linking CXX shared library ../../../lib/libserver.so
[ 36%] Built target server
[ 37%] Linking CXX shared library ../../../lib/libconcurrency.so
[ 37%] Built target concurrency
[ 37%] Linking CXX shared library ../../../lib/libsecurity.so
[ 37%] Built target security
make: *** [Makefile:128: all] Error 2

What's the expected result?

A script that I can run that simply works and installs OpenR on CentOS 7 would be best :-),
but any help would be appreciated.

Compilation fails - Cmake not scanning dependencies for LinkMonitor

Please use this template for reporting suspected bugs or requests for help.

Issue Description

I cloned openr in a ubuntu 16.04 container. When I compiled (cd build & ./build_openr.sh), it fails when producing thrift-out for LinkMonitor-cpp2-obj.

Environment

  • branch master
  • OS version: ubuntu-16.04 (container)

Minimal test code / Steps to reproduce the issue

Create a ubuntu:16.04 container.
Clone openr.
cd openr/build
./build_openr.sh

What's the actual result?

[ 32%] Built target LinuxPlatform-cpp2-target
Scanning dependencies of target LinuxPlatform-cpp2-obj
[ 33%] Building CXX object CMakeFiles/LinuxPlatform-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/LinuxPlatform_constants.cpp.o
[ 34%] Building CXX object CMakeFiles/LinuxPlatform-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/LinuxPlatform_data.cpp.o
[ 34%] Building CXX object CMakeFiles/LinuxPlatform-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/LinuxPlatform_types.cpp.o
[ 35%] Building CXX object CMakeFiles/LinuxPlatform-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/LinuxFibService.cpp.o
[ 35%] Building CXX object CMakeFiles/LinuxPlatform-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/LinuxFibService_client.cpp.o
[ 36%] Building CXX object CMakeFiles/LinuxPlatform-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/LinuxFibService_processmap_binary.cpp.o
[ 37%] Building CXX object CMakeFiles/LinuxPlatform-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/LinuxFibService_processmap_compact.cpp.o
[ 37%] Built target LinuxPlatform-cpp2-obj
[ 38%] Built target LinkMonitor-cpp2-target
[ 39%] Building CXX object CMakeFiles/LinkMonitor-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/LinkMonitor_constants.cpp.o
In file included from /openr/build/thrift-out/openr/if/gen-cpp2/LinkMonitor_constants.h:11:0,
from /openr/build/thrift-out/openr/if/gen-cpp2/LinkMonitor_constants.cpp:8:
/openr/build/thrift-out/openr/if/gen-cpp2/LinkMonitor_types.h:15:43: fatal error: openr/if/gen-cpp2/Spark_types.h: No such file or directory
compilation terminated.
CMakeFiles/LinkMonitor-cpp2-obj.dir/build.make:84: recipe for target 'CMakeFiles/LinkMonitor-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/LinkMonitor_constants.cpp.o' failed
make[2]: *** [CMakeFiles/LinkMonitor-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/LinkMonitor_constants.cpp.o] Error 1
CMakeFiles/Makefile2:291: recipe for target 'CMakeFiles/LinkMonitor-cpp2-obj.dir/all' failed
make[1]: *** [CMakeFiles/LinkMonitor-cpp2-obj.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2

What's the expected result?

Build should succeed.
What I notice is for LinkMonitor, the Cmake doesnt scan for dependencies.

Make GitHub Actions Pass Again

Let's get GitHub actions passing again and keep it passing.

  • Also ensure we run python tests if we can - Python 3 only (Might do in a separate parallel Action)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.