dhcp: replace IP reservation with --no-ping option

It was discovered that the ping check used by default by dnsmasq DHCP
server is actually the root cause of the issue with changing IPs of DUTs
connected to Satlab. Changing the approach as it will be way easier to
provide to Satlab users.

BUG=b/321300259
TEST=manual

Change-Id: Ie8a8a43b27a99d32a59c46032e027269ffd9787c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/moblab/+/5416375
Reviewed-by: Michal Matyjek <mmatyjek@google.com>
Commit-Queue: Tomasz Jakubowski <jakubowskit@google.com>
Tested-by: Tomasz Jakubowski <jakubowskit@google.com>
diff --git a/os-dependent/chromeos/upstart-scripts/moblab-dhcp.conf b/os-dependent/chromeos/upstart-scripts/moblab-dhcp.conf
index a026838..1ba07d3 100644
--- a/os-dependent/chromeos/upstart-scripts/moblab-dhcp.conf
+++ b/os-dependent/chromeos/upstart-scripts/moblab-dhcp.conf
@@ -131,12 +131,6 @@
     --restart always \
     gcr.io/chromeos-partner-moblab/moblab-dhcp:release \
     ${DEV_ARGS} --interface "${INT_IFACE}" --bind-interfaces
-  # create dhcp-hostsdir if it doesn't exist and restart the DHCP server
-  DHCP_HOSTSDIR="/var/lib/misc/dhcp_hosts"
-  if ! [ -d "${DHCP_HOSTSDIR}" ]; then
-    docker exec dhcp mkdir -p ${DHCP_HOSTSDIR}
-    docker exec dhcp killall -HUP dnsmasq || true
-  fi
 
   logger -t "$UPSTART_JOB" "Ending."
 end script
diff --git a/src/dockerfiles/dhcp/Dockerfile b/src/dockerfiles/dhcp/Dockerfile
index b9ef85a..a182c3c 100644
--- a/src/dockerfiles/dhcp/Dockerfile
+++ b/src/dockerfiles/dhcp/Dockerfile
@@ -11,11 +11,10 @@
     && apk upgrade --no-cache \
     && apk --no-cache add dnsmasq libcap
 
-#configure dnsmasq
+# configure dnsmasq
 RUN mkdir -p /etc/default/
 RUN echo -e "ENABLED=1\nIGNORE_RESOLVCONF=yes" > /etc/default/dnsmasq
 COPY dnsmasq.conf /etc/dnsmasq.conf
 COPY dnsmasq-dev.conf /etc/dnsmasq-dev.conf
 
-#run!
-ENTRYPOINT ["/usr/sbin/dnsmasq","--no-daemon"]
+ENTRYPOINT ["/usr/sbin/dnsmasq","--no-daemon","--no-ping"]
diff --git a/src/dockerfiles/dhcp/dnsmasq-dev.conf b/src/dockerfiles/dhcp/dnsmasq-dev.conf
index a1dfe2d..a715ec2 100644
--- a/src/dockerfiles/dhcp/dnsmasq-dev.conf
+++ b/src/dockerfiles/dhcp/dnsmasq-dev.conf
@@ -8,4 +8,3 @@
 
 dhcp-range=192.168.231.10,192.168.231.250,1h
 dhcp-broadcast
-dhcp-hostsdir=/var/lib/misc/dhcp_hosts
diff --git a/src/dockerfiles/dhcp/dnsmasq.conf b/src/dockerfiles/dhcp/dnsmasq.conf
index 1be404e..b025102 100644
--- a/src/dockerfiles/dhcp/dnsmasq.conf
+++ b/src/dockerfiles/dhcp/dnsmasq.conf
@@ -8,4 +8,3 @@
 
 dhcp-range=192.168.231.10,192.168.231.250,12h
 dhcp-broadcast
-dhcp-hostsdir=/var/lib/misc/dhcp_hosts