Skip to content

Config file completely wiped on lldpad daemon stop/restart/SIGHUP #114

@asphalter

Description

@asphalter

Hi all,

I'm currently running lldpad v1.1.1-3:

# rpm -qi lldpad
Name        : lldpad
Version     : 1.1.1
Release     : 3.gitf1dd9eb.el9
Architecture: x86_64
Install Date: Thu 14 Nov 2024 02:56:41 PM CET
Group       : Unspecified
Size        : 713305
License     : GPL-2.0-only
Signature   : RSA/SHA256, Wed 09 Oct 2024 09:16:02 AM CEST, Key ID 05b555b38483c65d
Source RPM  : lldpad-1.1.1-3.gitf1dd9eb.el9.src.rpm
Build Date  : Tue 10 Sep 2024 09:51:44 AM CEST
Build Host  : x86-01.stream.rdu2.redhat.com
Packager    : builder@centos.org
Vendor      : CentOS
URL         : https://github.com/intel/openlldp
Summary     : Intel LLDP Agent

This is started up on boot by systemd, and it creates a config file in /var/lib/lldpad/lldpad.conf

After some configurations issued by lldptool, the lldpad.conf file looks complete:

# cat /root/lldpad.conf 
<cut>
lldp : 
{
  eno1 : 
  {
    tlvid00000001 : 
    {
      info = "0420040FEBE37C";
    };
    tlvid00000002 : 
    {
      info = "05656E6F31";
      subtype = 5;
    };
    adminStatus = 3;
    tlvid00000005 : 
    {
      enableTx = true;
    };
    tlvid00000004 : 
    {
      enableTx = true;
    };
  };
<cut>
#

Unfortunately, when I shut down, restart or even reload (SIGHUP) the lldpad daemon, it decides to kill all the content of the config file:

# cat /root/lldpad.conf 
dcbx : 
{
  version = "1.0";
  dcbx_version = 2;
};
nearest_customer_bridge : 
{
};
nearest_nontpmr_bridge : 
{
};
lldp : 
{
};
#

Loading the daemon in debug mode, I can clearly see that it kills every port from the config file:

<cut>
14:49:48.040432 In remove_port: Found port eno2
14:49:48.040442 In remove_port: Found port eno2
14:49:48.046431 In remove_config_device, remove eno2 from section nearest_customer_bridge
14:49:48.046546 In remove_config_device, remove eno2 from section nearest_nontpmr_bridge
14:49:48.046664 In remove_config_device, remove eno2 from section lldp
<cut>

In my humble opinion, this seems due to the:

https://github.com/intel/openlldp/commit/a75e35a0cb36817e42a69ac14d1785cc63341132

Could you please give a look and let me know?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions