The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/lxc/pull/3148

This e-mail was sent by the LXC bot, direct replies will not reach the author
unless they happen to be subscribed to this list.

=== Description (from pull-request) ===
Dear developpers,

When we use lxc-update-config to translate a LXCv2 to LXCv3 configuration file, we have a issue with the parameters `lxc.network.X.ipv4.address`.

The output of the translate is: 
`lxc.net.0.ipv4.address.address`

Instead of:
`lxc.net.0.ipv4.address`

This introduce a bug: the container want to use the gateway address as a secondary network address.
From 10ae1390d9730c8e1ce7a1f72db7d4f2eac89781 Mon Sep 17 00:00:00 2001
From: Alban VIDAL <zord...@debian.org>
Date: Thu, 3 Oct 2019 18:32:47 +0200
Subject: [PATCH] Fix lxc-update-config in network.address

---
 src/lxc/cmd/lxc-update-config.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lxc/cmd/lxc-update-config.in b/src/lxc/cmd/lxc-update-config.in
index 16a56dea1c..84bcd625f5 100644
--- a/src/lxc/cmd/lxc-update-config.in
+++ b/src/lxc/cmd/lxc-update-config.in
@@ -69,7 +69,7 @@ sed -i \
 -e 
's/\([[:blank:]*]\|#*\)\(lxc\.init_uid\)\([[:blank:]*]\|=\)/\1lxc\.init\.uid\3/g'
 \
 -e 
's/\([[:blank:]*]\|#*\)\(lxc\.init_gid\)\([[:blank:]*]\|=\)/\1lxc\.init\.gid\3/g'
 \
 -e 
's/\([[:blank:]*]\|#*\)\(lxc\.limit\)\([[:blank:]*]\|=\)/\1lxc\.prlimit\3/g' \
--e 
's/\([[:blank:]*]\|#*\)\(lxc\.network\)\(\.[[:digit:]*]\)\(\.ipv4\)/\1lxc\.net\3\4\.address/g'
 \
+-e 
's/\([[:blank:]*]\|#*\)\(lxc\.network\)\(\.[[:digit:]*]\)\(\.ipv4\)/\1lxc\.net\3\4/g'
 \
 -e 's/\([[:blank:]*]\|#*\)\(lxc\.network\)\(\.[[:digit:]*]\)/\1lxc\.net\3/g' \
 -e 's/\([[:blank:]*]\|#*\)\(lxc\.network\)\([[:blank:]*]\|=\)/\1lxc\.net\3/g' \
 -e '/\([[:blank:]*]\|#*\)\(lxc\.rootfs\.backend\)\([[:blank:]*]\|=\)/d' \
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to