From a9983af0913000bf3116908f7e2b08fe5cc33d7b Mon Sep 17 00:00:00 2001 From: Jannik Schönartz Date: Wed, 8 Apr 2020 15:13:31 +0000 Subject: [server/log] Add log when setting dhcp ip in the client registration failed --- server/api/registration.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/server/api/registration.js b/server/api/registration.js index 5744369..6688b29 100644 --- a/server/api/registration.js +++ b/server/api/registration.js @@ -232,6 +232,11 @@ noAuthRouter.postAsync('/clients', async (req, res) => { dhcp.ref = setIp.id // Check for errors. if (setIp.error) { + log({ + category: 'ERROR_DHCP', + description: `[${dhcp.backend.id}] Error setting ip ${network.ip} for mac ${network.mac}\nError: ${setIp.msg}` + }) + // Setting the client ip failed ipSelection = true delete client.networks[0].dhcp @@ -248,7 +253,7 @@ noAuthRouter.postAsync('/clients', async (req, res) => { } if (ipSelection) { - // If not check if the client has a leased ipv4 address. + // If not: check if the client has a leased ipv4 address. const ipCheck = await dhcp.instance.checkIp(dhcp.backend.credentials, network.ip) // Build ipxe and return -- cgit v1.2.3-55-g7522