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

Add DHCP Relay #38

Merged
merged 13 commits into from
Nov 24, 2016
13 changes: 13 additions & 0 deletions dockers/docker-dhcp-relay/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM docker-base

## Make apt-get non-interactive
ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update && apt-get -y install \
isc-dhcp-relay
Copy link
Collaborator

@qiluo-msft qiluo-msft Oct 24, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clean up apt in the same 'RUN' command to save disk space. #Closed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do


COPY isc-dhcp-relay /etc/default/isc-dhcp-relay

ENTRYPOINT service isc-dhcp-relay start \
&& /bin/bash
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need to start rsyslog in the docker? how do we provide logging functionaility?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addressed in latest iteration, used rsyslog


6 changes: 6 additions & 0 deletions dockers/docker-dhcp-relay/isc-dhcp-relay
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
SERVERS=""

INTERFACES=""

#-a provides option 82 circuit id information
Copy link
Collaborator

@qiluo-msft qiluo-msft Oct 24, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment does not make sense. #Closed

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think Manny is explaining that the -a option enables the relay agent to use DHCP's option82 function.
Manny, I think you need to actually specify OPTIONS="-a", right?

Copy link
Contributor Author

@mbrar mbrar Oct 25, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the -a option enables the use of DHCP Option 82. I left Option 82 off by default but it might make more sense to set OPTIONS="-a"

OPTIONS=""
1 change: 1 addition & 0 deletions dockers/docker-ptf/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ RUN sed --in-place 's/httpredir.debian.org/debian-archive.trafficmanager.net/' /
python-dev \
wget \
cmake \
isc-dhcp-server \
Copy link
Collaborator

@qiluo-msft qiluo-msft Oct 24, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. indentation not aligned.
  2. why install in ptf docker? #Closed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DHCP server is used for DHCP testing. One option was to create a seperate Docker container for the server but after discussion with Pavel and Darren it seems ok to just install isc-dhcp-server in the ptf docker. The client (ptf code) and server run on the same docker container.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is better to remove this package from ptf docker since ptf docker is generic docker for testing purpose, what if some other one want to use ptf docker to test another dhcp server implementation?

It is better to move this into the ansible playbook of the test itself.


In reply to: 84995018 [](ancestors = 84995018)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, that's an easy change. I will install and start dhcp server from playbook instead.

&& dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; } \
&& dpkg_apt /root/deps/python-ptf_*.deb \
&& dpkg_apt /root/deps/libthrift-0.9.2_*.deb \
Expand Down