openbmc / entity-manager

Run-time JSON driven system configuration manager
Other
27 stars 50 forks source link

Incorrect config file crash the service #26

Open drakedog2008 opened 1 year ago

drakedog2008 commented 1 year ago

I accidentally forgot the Name property for one E-M config file but was surprised to find the whole service was crashed and the bmc is accessible because the network service depends on the E-M.

It makes think if we can ignore the ill-formed single config and continue to processed the health ones. It would make the system more robust.

drakedog2008 commented 1 year ago

Attached the log:

entity-manager: /usr/include/nlohmann/json.hpp:2135: const nlohmann::json_abi_v3_11_2::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType>::value_type& nlohmann::json_abi_v3_11_2::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType>::operator[](const typename object_t::key_type&) const [with ObjectType = std::map; ArrayType = std::vector; StringType = std::cxx11::basic_string; BooleanType = bool; NumberIntegerType = long long int; NumberUnsignedType = long long unsigned int; NumberFloatType = double; AllocatorType = std::allocator; JSONSerializer = nlohmann::json_abi_v3_11_2::adl_serializer; BinaryType = std::vector; const_reference = const nlohmann::json_abi_v3_11_2::basic_json<>&; typename object_t::key_type = std::cxx11::basic_string; object_t = std::map<std::cxx11::basic_string, nlohmann::json_abi_v3_11_2::basic_json<>, std::less, std::allocator<std::pair<const std::cxx11::basic_string, nlohmann::json_abi_v3_11_2::basic_json<> > > >]: Assertion `it != m_value.object->end()' failed.