From nobody Sat Feb 7 19:45:54 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1538360355260566.9716441052884; Sun, 30 Sep 2018 19:19:15 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4B575C056808; Mon, 1 Oct 2018 02:19:13 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1A6B53091383; Mon, 1 Oct 2018 02:19:13 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id C0B314BB75; Mon, 1 Oct 2018 02:19:12 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w912JCBq025814 for ; Sun, 30 Sep 2018 22:19:12 -0400 Received: by smtp.corp.redhat.com (Postfix) id 02384D8422; Mon, 1 Oct 2018 02:19:12 +0000 (UTC) Received: from mx1.redhat.com (ext-mx18.extmail.prod.ext.phx2.redhat.com [10.5.110.47]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EE80AD8420 for ; Mon, 1 Oct 2018 02:19:09 +0000 (UTC) Received: from mail-qt1-f169.google.com (mail-qt1-f169.google.com [209.85.160.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F235130820D4 for ; Mon, 1 Oct 2018 02:19:07 +0000 (UTC) Received: by mail-qt1-f169.google.com with SMTP id l2-v6so12381492qtr.12 for ; Sun, 30 Sep 2018 19:19:07 -0700 (PDT) Received: from localhost.localdomain ([2804:431:b704:8a2:d882:7024:1d6c:56ed]) by smtp.gmail.com with ESMTPSA id h66-v6sm409258qkc.53.2018.09.30.19.19.05 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 30 Sep 2018 19:19:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id; bh=Gb9Qmbs2vGZ3m9/YJmrq0/JR6jzIgcxXXL0+eQBGONU=; b=qzzvr+VsQ2XshYIiZMW63IEU0t0BQlKv68RrG18YuYSQgNJ93ycFZdQhqhV1fS6jKM F7n8j/OmB0EUrWueQeMJfA2tbjXQJeE1kmwGmjW753+n9Kf8LiRPl32d2Jlc2i+bzgA5 E4c1IbVgd4lZg1K5eSNU8am+Znjx5DTxaoBLRzb+hY/Q47hBo0O1TvLwINc6ajONSQiW 5XHxNCZUBBxctcfrfncxgliK5b9jpDA+2y6RYRvPeo/jvCxVrS73VJPegS6PqtYJFtpU Nxos8InRwdp+JC4B0DKeMoavVoDINjT0NfzFk/IjHZYqZDnweX54q0rdA4acHyCj4vq5 tRlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=Gb9Qmbs2vGZ3m9/YJmrq0/JR6jzIgcxXXL0+eQBGONU=; b=IedqbcO6+88Zdsk7HHHN5xbsQ9TuNSFUp5aD7ZQfcJwoCAcJO5bDsIekZRjITObvgg VBQxzif300VNVTuXePhoXqUf71l4BuvC2NZTCz9cQ2VdwBd8l1oC1lQb3rHBe8G+wVdv RoABAy5c5ZLgXxzVUX3C32fgSnM34Is5237rZtRXPMHFD1BGBQ4mzE7WTDd+cKu21FJo ldT2SGWScMm8qfV6bwvHc/cOT0aZVmIf4uCbhNkqsg8NWT9qXSMVJTr+Bu94uicDxAk+ mxe7P+V4bONqPNZnBgWgRtlA7EK36ckcIcX82q1uJRrtn8+hrj4hmJU9p3p3DvYuFCik nsGg== X-Gm-Message-State: ABuFfoii2vLoCUd1FO4hotAfv9m1LroVz6GtT9USQ1vEQOob6L31BZwT NB0CXyBesPpCO46WyXJI6VD1JUqk X-Google-Smtp-Source: ACcGV60dEvI7QMx7hk1hc+nC8OjbN34x/FXnZdvxiea7VemrOcBIjfIUmrK1wqq147tR4k5PT6d1AA== X-Received: by 2002:aed:38a9:: with SMTP id k38-v6mr6962683qte.170.1538360346955; Sun, 30 Sep 2018 19:19:06 -0700 (PDT) From: Julio Faracco To: libvir-list@redhat.com Date: Sun, 30 Sep 2018 23:18:58 -0300 Message-Id: <20181001021858.4650-1-jcfaracco@gmail.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Mon, 01 Oct 2018 02:19:08 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Mon, 01 Oct 2018 02:19:08 +0000 (UTC) for IP:'209.85.160.169' DOMAIN:'mail-qt1-f169.google.com' HELO:'mail-qt1-f169.google.com' FROM:'jcfaracco@gmail.com' RCPT:'' X-RedHat-Spam-Score: -0.13 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_PASS) 209.85.160.169 mail-qt1-f169.google.com 209.85.160.169 mail-qt1-f169.google.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.47 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.27 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH RFC] lxc: Include support to lxc version 3.0 and higher. X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.26 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Mon, 01 Oct 2018 02:19:13 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDMRC_1 RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" This patch introduce the new settings for LXC 3.0 and higher. The older versions keep the compatibility to deprecated settings for LXC, but after release 3.0, the compatibility was removed. This commit adds the support to the refactored settings. Signed-off-by: Julio Faracco --- src/lxc/lxc_native.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/lxc/lxc_native.c b/src/lxc/lxc_native.c index cbdec723dd..c0f70ebb7d 100644 --- a/src/lxc/lxc_native.c +++ b/src/lxc/lxc_native.c @@ -200,7 +200,9 @@ lxcSetRootfs(virDomainDefPtr def, int type =3D VIR_DOMAIN_FS_TYPE_MOUNT; VIR_AUTOFREE(char *) value =3D NULL; =20 - if (virConfGetValueString(properties, "lxc.rootfs", &value) <=3D 0) + if (virConfGetValueString(properties, "lxc.rootfs", &value) <=3D 0 && + /* Legacy config keys were removed after release 3.0. */ + virConfGetValueString(properties, "lxc.rootfs.path", &value) <=3D = 0) return -1; =20 if (STRPREFIX(value, "/dev/")) @@ -1041,7 +1043,9 @@ lxcParseConfigString(const char *config, if (VIR_STRDUP(vmdef->os.init, "/sbin/init") < 0) goto error; =20 - if (virConfGetValueString(properties, "lxc.utsname", &value) <=3D 0 || + if ((virConfGetValueString(properties, "lxc.utsname", &value) <=3D 0 && + /* Legacy config keys were removed after release 3.0. */ + virConfGetValueString(properties, "lxc.uts.name", &value) <=3D 0)= || VIR_STRDUP(vmdef->name, value) < 0) goto error; if (!vmdef->name && (VIR_STRDUP(vmdef->name, "unnamed") < 0)) @@ -1051,7 +1055,9 @@ lxcParseConfigString(const char *config, goto error; =20 /* Look for fstab: we shouldn't have it */ - if (virConfGetValue(properties, "lxc.mount")) { + if (virConfGetValue(properties, "lxc.mount") || + /* Legacy config keys were removed after release 3.0. */ + virConfGetValue(properties, "lxc.mount.fstab")) { virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s", _("lxc.mount found, use lxc.mount.entry lines inste= ad")); goto error; --=20 2.17.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list