Use two-phase init to prevent calling a pure virtual

When the background reader starts "too early", before the derived class'
constructor has finished, it results in calling a pure virtual:

 pure virtual method called
 terminate called without an active exception
 Aborted (core dumped)

 #5  0xb6a5e0c8 in std::terminate() () from /lib/libstdc++.so.6
 #6  0xb6a5efec in __cxa_pure_virtual () from /lib/libstdc++.so.6
 #7  0x0050bf34 in operator() (__closure=0x263ca04) at /home/jkt/work/prog/_build/_br-cfb/build/velia-custom/src/ietf-hardware/FspYh.cpp:97
 #8  std::__invoke_impl<void, velia::ietf_hardware::FspYh::FspYh(const std::filesystem::__cxx11::path&, const std::string&, std::shared_ptr<velia::ietf_hardware::TransientI2C>)::<lambda()> > (__f=...)
     at /home/jkt/work/prog/_build/_br-cfb/per-package/velia/host/opt/ext-toolchain/arm-buildroot-linux-gnueabihf/include/c++/13.2.0/bits/invoke.h:61
 #9  std::__invoke<velia::ietf_hardware::FspYh::FspYh(const std::filesystem::__cxx11::path&, const std::string&, std::shared_ptr<velia::ietf_hardware::TransientI2C>)::<lambda()> > (__fn=...)
     at /home/jkt/work/prog/_build/_br-cfb/per-package/velia/host/opt/ext-toolchain/arm-buildroot-linux-gnueabihf/include/c++/13.2.0/bits/invoke.h:96
 #10 std::thread::_Invoker<std::tuple<velia::ietf_hardware::FspYh::FspYh(const std::filesystem::__cxx11::path&, const std::string&, std::shared_ptr<velia::ietf_hardware::TransientI2C>)::<lambda()> > >::_M_invoke<0> (this=0x263ca04) at /home/jkt/work/prog/_build/_br-cfb/per-package/velia/host/opt/ext-toolchain/arm-buildroot-linux-gnueabihf/include/c++/13.2.0/bits/std_thread.h:292
 #11 std::thread::_Invoker<std::tuple<velia::ietf_hardware::FspYh::FspYh(const std::filesystem::__cxx11::path&, const std::string&, std::shared_ptr<velia::ietf_hardware::TransientI2C>)::<lambda()> > >::operator() (this=0x263ca04) at /home/jkt/work/prog/_build/_br-cfb/per-package/velia/host/opt/ext-toolchain/arm-buildroot-linux-gnueabihf/include/c++/13.2.0/bits/std_thread.h:299
 #12 std::thread::_State_impl<std::thread::_Invoker<std::tuple<velia::ietf_hardware::FspYh::FspYh(const std::filesystem::__cxx11::path&, const std::string&, std::shared_ptr<velia::ietf_hardware::TransientI2C>)::<lambda()> > > >::_M_run(void) (this=0x263ca00)
     at /home/jkt/work/prog/_build/_br-cfb/per-package/velia/host/opt/ext-toolchain/arm-buildroot-linux-gnueabihf/include/c++/13.2.0/bits/std_thread.h:244
 #13 0xb6a8bdb4 in ?? () from /lib/libstdc++.so.6
 #14 0xb687534c in ?? () from /lib/libc.so.6

Change-Id: Ie73d64e5d6d669db3264cfa7b44467a866a21577
2 files changed
tree: e431d2a5df1fa925a739e42aec6bb0b70d56c492
  1. .clang-format
  2. .gitmodules
  3. .zuul.yaml
  4. CMakeLists.txt
  5. Doxyfile.in
  6. LICENSE
  7. LICENSE.md
  8. README.md
  9. ci/
  10. cmake/
  11. docs/
  12. src/
  13. tests/
  14. yang/
README.md

YANG System management for embedded devices running Linux

Together with sysrepo, this software provides "general system management" of embedded devices. The target platform is anything that runs Linux with systemd. This runs in production on CzechLight SDN DWDM devices.

Health tracking

This component tracks the overal health state of the system, including various sensors, or the state of systemd units. As an operator-friendly LED at the front panel of the appliance shows the aggregated health state.

System management

Firmware can be updated via RAUC, and various aspects of the system's configuration can be adjusted. This includes a firewall, basic network settings, and authentication management.

Supported YANG models

For a full list, consult the yang/ directory in this repository.

Installation

For building, one needs:

The build process uses CMake. A quick-and-dirty build with no fancy options can be as simple as mkdir build && cd build && cmake .. && make && make install.