Skip to content

Commit e51d390

Browse files
committed
NBD remove config file at right place
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]>
1 parent 244c98c commit e51d390

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

lava-slave/Dockerfile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@ COPY scripts/ /usr/local/bin/
1515
RUN chmod a+x /usr/local/bin/*
1616
COPY conmux/ /etc/conmux/
1717

18-
# LAVA issue 585
19-
RUN rm /etc/nbd-server/config
20-
2118
# Caution to not use any port between the Linux dynamic port range: 32768-60999
2219
RUN find /usr/lib/python3/dist-packages/ -iname constants.py | xargs sed -i 's,XNBD_PORT_RANGE_MIN.*,XNBD_PORT_RANGE_MIN=61950,'
2320
RUN find /usr/lib/python3/dist-packages/ -iname constants.py | xargs sed -i 's,XNBD_PORT_RANGE_MAX.*,XNBD_PORT_RANGE_MAX=62000,'

lavalab-gen.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,8 @@ def main():
602602
if use_nbd:
603603
dockcomp["services"][name]["ports"].append("61950-62000:61950-62000")
604604
fp = open("%s/scripts/extra_actions" % workerdir, "a")
605-
fp.write("apt-get -y install nbd-server\n")
605+
# LAVA issue 585 need to remove /etc/nbd-server/config
606+
fp.write("apt-get -y install nbd-server && rm -f /etc/nbd-server/config\n")
606607
fp.close()
607608
os.chmod("%s/scripts/extra_actions" % workerdir, 0o755)
608609
use_overlay_server = True

0 commit comments

Comments
 (0)