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

pfdhcp API is called even if pfdhcp is disabled in PF configuration #7525

Closed
nqb opened this issue Feb 10, 2023 · 0 comments · Fixed by #7719
Closed

pfdhcp API is called even if pfdhcp is disabled in PF configuration #7525

nqb opened this issue Feb 10, 2023 · 0 comments · Fixed by #7719

Comments

@nqb
Copy link
Contributor

nqb commented Feb 10, 2023

Describe the bug
In node_deregister function, we call:

pf::api::unifiedapiclient->default_client->call("DELETE", "/api/v1/dhcp/mac/".$mac,{});

even if pfdhcp service is disabled in configuration,

To Reproduce
Steps to reproduce the behavior:

  1. Stop and disable pfdhcp in configuration:
[services]
#
# services.pfdhcp
#
# Should pfdhcp be managed by PacketFence?
pfdhcp=disabled
  1. Check logs when a device is unregistered automatically:
│Feb 10 09:25:21 pfdeb11localdev pfperl-api-docker-wrapper[60416]: pfperl-api(13) ERROR: [mac:[undef]] Error releasing ip for 00:03:00:11:11:01 : 502 Proxy Error at /usr/local/pf/lib/pf/api/unifiedapiclient.pm line 218.                 │

Expected behavior
Don't call pfdhcp is service is disabled in configuration.

Additional context
This fix needs to be done on Perl side because if pfdhcp or other services are stopped, they can check their own status 😜

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants