Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
archaron opened this issue Nov 20, 2024 · 4 comments
Open

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

archaron opened this issue Nov 20, 2024 · 4 comments
Labels
bug Something isn't working triaged Jira issue has been created for this

Comments

@archaron
Copy link

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

@archaron archaron added the bug Something isn't working label Nov 20, 2024
@mhashizume mhashizume added the triaged Jira issue has been created for this label Dec 17, 2024
@mhashizume
Copy link
Contributor

Thank you for reporting this @archaron , our team has added this issue to our backlog.

Copy link

Migrated issue to FACT-3489

@joshcooper
Copy link
Contributor

@archaron what's the best way to detect if the dhcpcd service is running? Would it be sufficient to check for the existence of /var/run/dhcpcd.pid?

@archaron
Copy link
Author

archaron commented Jan 15, 2025

As I can see, there are two ways pid filename can be generated:

       # man 5 dhcpcd

       /run/dhcpcd/pid
       Stores the PID of dhcpcd running on all interfaces.

       /run/dhcpcd/interface.pid
       Stores the PID of dhcpcd running on the interface.

But my system doesn't have dhcpcd running and this directory doesn't exist at all:

# ls /run/dhcpcd
ls: cannot access '/run/dhcpcd': No such file or directory

# dhcpcd --version
dhcpcd 10.0.6
Copyright (c) 2006-2023 Roy Marples
Compiled in features: INET ARP ARPing IPv4LL INET6 DHCPv6 AUTH PRIVSEP

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triaged Jira issue has been created for this
Projects
None yet
Development

No branches or pull requests

3 participants