Skip to content

Commit

Permalink
NBD remove config file at right place
Browse files Browse the repository at this point in the history
NBD is not yet installed in Dockerfile but via extra actions, so we need
to remove config file elsewhere.

Signed-off-by: Corentin LABBE <[email protected]>
  • Loading branch information
montjoie committed Jan 24, 2023
1 parent 4ef5cd5 commit bacc75a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 0 additions & 3 deletions lava-slave/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ COPY scripts/ /usr/local/bin/
RUN chmod a+x /usr/local/bin/*
COPY conmux/ /etc/conmux/

# LAVA issue 585
RUN rm /etc/nbd-server/config

# Caution to not use any port between the Linux dynamic port range: 32768-60999
RUN find /usr/lib/python3/dist-packages/ -iname constants.py | xargs sed -i 's,XNBD_PORT_RANGE_MIN.*,XNBD_PORT_RANGE_MIN=61950,'
RUN find /usr/lib/python3/dist-packages/ -iname constants.py | xargs sed -i 's,XNBD_PORT_RANGE_MAX.*,XNBD_PORT_RANGE_MAX=62000,'
Expand Down
3 changes: 2 additions & 1 deletion lavalab-gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,8 @@ def main():
if use_nbd:
dockcomp["services"][name]["ports"].append("61950-62000:61950-62000")
fp = open("%s/scripts/extra_actions" % workerdir, "a")
fp.write("apt-get -y install nbd-server\n")
# LAVA issue 585 need to remove /etc/nbd-server/config
fp.write("apt-get -y install nbd-server && rm -f /etc/nbd-server/config\n")
fp.close()
os.chmod("%s/scripts/extra_actions" % workerdir, 0o755)
use_overlay_server = True
Expand Down

0 comments on commit bacc75a

Please sign in to comment.