Skip to content

Facter spamming "dhcpcd is not running" on ubuntu 24.04 #2780

Open
@archaron

Description

@archaron

Describe the Bug

Same as #2773. When running facter on Ubuntu 24.04 with no dhcp-enabled interfaces, facter tries to run dhcpcd -U <interface> that produces an error over every detected interface.

Previous issue was closed by its author as 'resolved', but error is still there. Fixing by purging dhcpcd-base is not an option, because many system packets depends on it.

As mentioned in this comment , I think, facter needs an additional check if dhcdpcd is running.

# apt-cache rdepends dhcpcd-base
dhcpcd-base
Reverse Depends:
  cloud-init
  dhcpcd
  ubuntu-minimal
  initramfs-tools-core
  cloud-init
 |madwimax
 |libguestfs0t64
  mini-iso-tools

syslog:

.....
server dhcpcd[34667]: dhcpcd is not running
server dhcpcd[34668]: dhcpcd is not running
server dhcpcd[34672]: dhcpcd is not running
server dhcpcd[34673]: dhcpcd is not running
.....

facter debug log:

DEBUG Facter::Resolvers::Linux::Networking - Get DHCP for interface lo 
DEBUG Facter::Resolvers::Linux::Networking - Attempt to get DHCP for interface lo, from systemd/netif/leases 
DEBUG Facter::Util::FileHelper - File at: /run/systemd/netif/leases/1 is not accessible. 
DEBUG Facter::Resolvers::Linux::Networking - Attempt to get DHCP for interface lo, from dhclient leases 
DEBUG Facter::Resolvers::Linux::Networking - Attempt to get DHCP for interface lo, from dhcpcd command 
DEBUG Facter::Core::Execution::Posix - Executing command: /usr/sbin/dhcpcd -U lo 
DEBUG Facter::Resolvers::Linux::Networking - Command /usr/sbin/dhcpcd -U lo completed with the following stderr message: dhcpcd is not running 

Expected Behavior

No errors.

Steps to Reproduce

Steps to reproduce the behavior:
apt-get purge dhcpcd
Run facter
Check log: tail -f /var/log/syslog -n 200

Environment

Distributor ID: Ubuntu
Description: Ubuntu 24.04.1 LTS
Facter version: 4.10.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriagedJira issue has been created for this

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions