Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 37D71200B2A for ; Sat, 11 Jun 2016 07:30:07 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 368BB160A5A; Sat, 11 Jun 2016 05:30:07 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 31705160A38 for ; Sat, 11 Jun 2016 07:30:06 +0200 (CEST) Received: (qmail 32402 invoked by uid 500); 11 Jun 2016 05:30:04 -0000 Mailing-List: contact dev-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list dev@cloudstack.apache.org Received: (qmail 31344 invoked by uid 99); 11 Jun 2016 05:30:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 11 Jun 2016 05:30:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 9EC1B180617 for ; Sat, 11 Jun 2016 05:30:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.28 X-Spam-Level: * X-Spam-Status: No, score=1.28 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=sg-or-id.20150623.gappssmtp.com Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id zrwwfS109_Y9 for ; Sat, 11 Jun 2016 05:29:59 +0000 (UTC) Received: from mail-oi0-f45.google.com (mail-oi0-f45.google.com [209.85.218.45]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with ESMTPS id C32395F19B for ; Sat, 11 Jun 2016 05:29:58 +0000 (UTC) Received: by mail-oi0-f45.google.com with SMTP id u201so14609684oie.0 for ; Fri, 10 Jun 2016 22:29:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sg-or-id.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to; bh=rf9T9RjCFkQixZidPy5MYR3gF3HdmPuNkl3OhQT+b2g=; b=iLkSmmggB1kpy6Xkh1gnR1wpIbz1NEvy4PYP4a+Cmevwp0oDyCgCElnAKIt8WDBfPG BqgC4HKODOPyFGbYb2nGnSiE4zKucOujAXAC9RgrfkuYs1hjoARIRzO7YMuoE3ERGYBf Fcgh9zRqktLTyQ/L5hnu16wQ0TRSbvyA2U5BtAjvSc0uiQEOt8zvmKpGMd82Z5BF562e /ZcyAJvfRCqtBjpGS7NDvlpgJcSY4EPrWD69oYHuZW+/dAR0BsdWAmit2tGCJGtUjvG0 UIzsxvcHIb+3ByKmZnP4zL7U+B2raYnFgHKFCm7js2yYQ2lu1srPQeRidLpMlG2aVECs T6xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to; bh=rf9T9RjCFkQixZidPy5MYR3gF3HdmPuNkl3OhQT+b2g=; b=bwddrBEQ6J0/QJjDbwvO5FyxDyiEJit+xhkiMkgmH+AZN+kEuo+LCKq9mB2mOfKWIi 7Nl7+gOxui44IfCUS4L7TbTkMJ2DhgQQemIK1mZllXVqs9BVI7wUM2nutD+oWqny50Us zZifauBfrtYOJdzvVyi/FZGQx9JCjcEJYlPMDR10RkXO2oMhG7aQXle2wLPUKVKhm5bb d8pRLKK5BblsI3ywJBL6yUkOcDYOS72Khp1lo8JK17llKU3I6XauIAO/j6gOpGgVMCGg xG9t4qxkb19uJcTVnauV/F/zOx4m/CoUyhW4+BYCsN9w/NNEvVfLJryDqe2BOhITeoV1 l8qA== X-Gm-Message-State: ALyK8tJ1rythEfIqhtBVM87SQQtykyt+1JV9B36Wj3FiEmSNv8WbaiL/RrH97SxlRfqn70ysBBG3NfFJvFEDyA== MIME-Version: 1.0 X-Received: by 10.157.44.240 with SMTP id e45mr3050146otd.177.1465622997230; Fri, 10 Jun 2016 22:29:57 -0700 (PDT) Received: by 10.202.204.199 with HTTP; Fri, 10 Jun 2016 22:29:57 -0700 (PDT) In-Reply-To: References: Date: Sat, 11 Jun 2016 13:29:57 +0800 Message-ID: Subject: Re: CloudStack 4.8.0 with LXC - LibvirtException: unsupported configuration: System lacks NETNS support From: Cloud List To: users@cloudstack.apache.org, dev@cloudstack.apache.org Content-Type: multipart/alternative; boundary=001a11428dec1ffce80534f9f205 archived-at: Sat, 11 Jun 2016 05:30:07 -0000 --001a11428dec1ffce80534f9f205 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Dear all, Anyone implemented LXC on CloudStack before and can provide some advice? Documentation is a bit limited on this area. Other than below documentations, any other pointers anyone can provide? http://docs.cloudstack.apache.org/projects/cloudstack-installation/en/4.8/h= ypervisor/lxc.html https://cwiki.apache.org/confluence/display/CLOUDSTACK/LXC+Template+creatio= n https://cwiki.apache.org/confluence/display/CLOUDSTACK/LXC+Support+in+Cloud= stack https://cwiki.apache.org/confluence/display/CLOUDSTACK/LXC+Enhancements Looking forward to your reply, thank you. Cheers. -ip- On Fri, Jun 10, 2016 at 6:39 PM, Cloud List wrote: > Dear all, > > We tried to setup an LXC cluster and add an LXC host into a test > CloudStack 4.8.0.1 environment. The cluster is created and the LXC host i= s > created successfully. We also tried to follow below documentation to crea= te > an Ubuntu LXC template -- we are running Ubuntu 12.04.5 LTS. > > > https://cwiki.apache.org/confluence/display/CLOUDSTACK/LXC+Template+creat= ion > > =3D=3D=3D > Install lxc: apt-get install lxc > > Create a container with any name, in our case 'ubuntu': > > sudo lxc-create -t download -n ubuntu -- --dist ubuntu --release trusty > --arch amd64 > > Creation of the LXC container will take a lot of time, it will be stored > here: /var/lib/lxc/ubuntu > > Next stop the container: > sudo lxc-stop -n ubuntu > > Next create a temp director, tar the rootfs and export the template: > mkdir -p /tmp/lxc-template > cd /tmp/lxc-template > sudo tar --numeric-owner -czf /tmp/lxc-template/template.tar.gz > /var/lib/lxc/ubuntu/rootfs/ > =3D=3D=3D > > As per suggestion from Rohit on another thread, I saved the template file > as .tar and register it to cloudstack with HVM disabled. I then tried to > create an LXC container instance using the template, but after a long > "Creating" process, the provisioning will fail with insufficient capacity > error. > > =3D=3D=3D > 2016-06-10 18:24:45,468 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] > (API-Job-Executor-44:ctx-c8a4afdc job-232) (logid:523a0c37) Complete asyn= c > job-232, jobStatus: FAILED, resultCode: 530, result: > org.apache.cloudstack.api.response.ExceptionR > esponse/null/{"uuidList":[],"errorcode":530,"errortext":"Unable to start = a > VM due to insufficient capacity"} > =3D=3D=3D > > Further check on the LXC host's agent.log shows that the provisioning > failed due to libvirt exception, which says that the configuration is > unsupported because the system lacks NETNS support > > "LibvirtException: unsupported configuration: System lacks NETNS support" > > See excerpts of the logs below: > > =3D=3D=3D > 2016-06-10 18:24:43,740 DEBUG > [resource.wrapper.LibvirtStartCommandWrapper] (agentRequest-Handler-1:nul= l) > starting i-2-42-VM: > i-2-42-VM > c29a74fb-e4bc-4aa2-bef4-3c8844de87df > Ubuntu 14.04 (64-bit) > > > > > > > > > > > > > > > > > > dir=3D'/mnt/d7678837-9f9f-32ab-99f3-b508feb3595a/6d26a879-999f-4cba-bfcc-= 1d2d9e70af5c'/> > > > > > > > > > > 1048576 > > > > 1 > > exe > /sbin/init > > > 1000 > > restart > destroy > destroy > > > 2016-06-10 18:24:43,743 WARN > [resource.wrapper.LibvirtStartCommandWrapper] (agentRequest-Handler-1:nul= l) > LibvirtException > org.libvirt.LibvirtException: unsupported configuration: System lacks > NETNS support > at org.libvirt.ErrorHandler.processError(Unknown Source) > at org.libvirt.ErrorHandler.processError(Unknown Source) > at org.libvirt.Connect.domainCreateXML(Unknown Source) > at > com.cloud.hypervisor.kvm.resource.LibvirtComputingResource.startVM(Libvir= tComputingResource.java:1293) > at > com.cloud.hypervisor.kvm.resource.wrapper.LibvirtStartCommandWrapper.exec= ute(LibvirtStartCommandWrapper.java:82) > at > com.cloud.hypervisor.kvm.resource.wrapper.LibvirtStartCommandWrapper.exec= ute(LibvirtStartCommandWrapper.java:46) > at > com.cloud.hypervisor.kvm.resource.wrapper.LibvirtRequestWrapper.execute(L= ibvirtRequestWrapper.java:75) > at > com.cloud.hypervisor.kvm.resource.LibvirtComputingResource.executeRequest= (LibvirtComputingResource.java:1317) > at com.cloud.agent.Agent.processRequest(Agent.java:522) > at com.cloud.agent.Agent$AgentRequestHandler.doTask(Agent.java:83= 0) > at com.cloud.utils.nio.Task.call(Task.java:83) > at com.cloud.utils.nio.Task.call(Task.java:29) > at java.util.concurrent.FutureTask.run(FutureTask.java:262) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java= :1145) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.jav= a:615) > at java.lang.Thread.run(Thread.java:745) > 2016-06-10 18:24:43,744 DEBUG [kvm.storage.KVMStoragePoolManager] > (agentRequest-Handler-1:null) Disconnecting disk > 6d26a879-999f-4cba-bfcc-1d2d9e70af5c > 2016-06-10 18:24:43,744 INFO [kvm.storage.LibvirtStorageAdaptor] > (agentRequest-Handler-1:null) Trying to fetch storage pool > d7678837-9f9f-32ab-99f3-b508feb3595a from libvirt > 2016-06-10 18:24:43,744 DEBUG [kvm.resource.LibvirtConnection] > (agentRequest-Handler-1:null) Looking for libvirtd connection at: lxc:/// > 2016-06-10 18:24:43,751 DEBUG [kvm.storage.LibvirtStorageAdaptor] > (agentRequest-Handler-1:null) Succesfully refreshed pool > d7678837-9f9f-32ab-99f3-b508feb3595a Capacity: 483387244544 Used: > 127107334144 Available: 356279910400 > 2016-06-10 18:24:43,757 DEBUG [cloud.agent.Agent] > (agentRequest-Handler-1:null) Seq 7-8790463522673787745: { Ans: , MgmtId= : > 181122461655966, via: 7, Ver: v1, Flags: 10, > [{"com.cloud.agent.api.StartAnswer":{"vm":{"id":42,"name":"i-2-42-VM","ty= pe":"User","cpus":1,"minSpeed":1000,"maxSpeed":2000,"minRam":1073741824,"ma= xRam":1073741824,"arch":"x86_64","os":"Ubuntu > 14.04 (64-bit)","platformEmulator":"Ubuntu > 14.04","bootArgs":"","enableHA":true,"limitCpuUse":true,"enableDynamicall= yScaleVm":false,"vncPassword":"hOWX3h7K6kkOpL316OApzQ","vncAddr":"192.168.3= .202","params":{"memoryOvercommitRatio":"1.0","cpuOvercommitRatio":"2.0","M= essage.ReservedCapacityFreed.Flag":"false"},"uuid":"c29a74fb-e4bc-4aa2-bef4= -3c8844de87df","disks":[{"data":{"org.apache.cloudstack.storage.to.VolumeOb= jectTO":{"uuid":"6d26a879-999f-4cba-bfcc-1d2d9e70af5c","volumeType":"ROOT",= "dataStore":{"org.apache.cloudstack.storage.to.PrimaryDataStoreTO":{"uuid":= "d7678837-9f9f-32ab-99f3-b508feb3595a","id":5,"poolType":"NetworkFilesystem= ","host":"192.168.0.242","path":"/export/cloudstack3","port":2049,"url":"Ne= tworkFilesystem:// > 192.168.0.242/export/cloudstack3/?ROLE=3DPrimary&STOREUUID=3Dd7678837-9f9= f-32ab-99f3-b508feb3595a"}},"name":"ROOT-42","size":479057920,"path":"6d26a= 879-999f-4cba-bfcc-1d2d9e70af5c","volumeId":50,"vmName":"i-2-42-VM","accoun= tId":2,"format":"DIR","provisioningType":"THIN","id":50,"deviceId":0,"cache= Mode":"NONE","hypervisorType":"LXC"}},"diskSeq":0,"path":"6d26a879-999f-4cb= a-bfcc-1d2d9e70af5c","type":"ROOT","_details":{"managed":"false","storagePo= rt":"2049","storageHost":"192.168.0.242","volumeSize":"479057920"}},{"data"= :{"org.apache.cloudstack.storage.to.TemplateObjectTO":{"id":0,"format":"ISO= ","accountId":0,"hvm":false}},"diskSeq":3,"type":"ISO"}],"nics":[{"deviceId= ":0,"networkRateMbps":100,"defaultNic":true,"pxeDisable":false,"nicUuid":"9= 38ed009-54fa-4dd9-be7c-e5c95ab4fd27","uuid":"4b8f3aa8-21bb-4362-b695-ab4e41= 141227","ip":"192.168.0.192","netmask":"255.255.255.0","gateway":"192.168.0= .1","mac":"06:a5:1c:00:00:2a","dns1":"8.8.8.8","dns2":"8.8.4.4","broadcastT= ype":"Native","type":"Guest","broadcastUri":"vlan://untagged","isSecurityGr= oupEnabled":true}]},"result":false,"details":"unsupported > configuration: System lacks NETNS support","wait":0}}] } > 2016-06-10 18:24:43,935 DEBUG [cloud.agent.Agent] > (agentRequest-Handler-2:null) Request:Seq 7-8790463522673787746: { Cmd , > MgmtId: 181122461655966, via: 7, Ver: v1, Flags: 100011, > [{"com.cloud.agent.api.StopCommand":{"isProxy":false,"executeInSequence":= false,"checkBeforeCleanup":false,"vmName":"i-2-42-VM","wait":0}}] > } > 2016-06-10 18:24:43,936 DEBUG [cloud.agent.Agent] > (agentRequest-Handler-2:null) Processing command: > com.cloud.agent.api.StopCommand > 2016-06-10 18:24:43,936 DEBUG [kvm.resource.LibvirtConnection] > (agentRequest-Handler-2:null) Looking for libvirtd connection at: > qemu:///system > 2016-06-10 18:24:43,937 DEBUG [kvm.resource.LibvirtConnection] > (agentRequest-Handler-2:null) Can not find KVM connection for Instance: > i-2-42-VM, continuing. > 2016-06-10 18:24:43,938 DEBUG [kvm.resource.LibvirtConnection] > (agentRequest-Handler-2:null) Looking for libvirtd connection at: lxc:/// > 2016-06-10 18:24:43,939 DEBUG [kvm.resource.LibvirtConnection] > (agentRequest-Handler-2:null) Can not find LXC connection for Instance: > i-2-42-VM, continuing. > 2016-06-10 18:24:43,939 WARN [kvm.resource.LibvirtConnection] > (agentRequest-Handler-2:null) Can not find a connection for Instance > i-2-42-VM. Assuming the default connection. > 2016-06-10 18:24:43,939 DEBUG [kvm.resource.LibvirtConnection] > (agentRequest-Handler-2:null) Looking for libvirtd connection at: lxc:/// > 2016-06-10 18:24:43,940 DEBUG [kvm.resource.LibvirtComputingResource] > (agentRequest-Handler-2:null) Failed to get dom xml: > org.libvirt.LibvirtException: Domain not found: No domain with matching > name 'i-2-42-VM' > 2016-06-10 18:24:43,941 DEBUG [kvm.resource.LibvirtComputingResource] > (agentRequest-Handler-2:null) Failed to get dom xml: > org.libvirt.LibvirtException: Domain not found: No domain with matching > name 'i-2-42-VM' > 2016-06-10 18:24:43,941 DEBUG [kvm.resource.LibvirtComputingResource] > (agentRequest-Handler-2:null) Try to stop the vm at first > 2016-06-10 18:24:43,942 DEBUG [kvm.resource.LibvirtComputingResource] > (agentRequest-Handler-2:null) VM i-2-42-VM doesn't exist, no need to stop= it > 2016-06-10 18:24:43,943 DEBUG [cloud.agent.Agent] > (agentRequest-Handler-2:null) Seq 7-8790463522673787746: { Ans: , MgmtId= : > 181122461655966, via: 7, Ver: v1, Flags: 10, > [{"com.cloud.agent.api.StopAnswer":{"result":true,"wait":0}}] } > 2016-06-10 18:25:02,268 DEBUG [kvm.resource.LibvirtConnection] > (UgentTask-5:null) Looking for libvirtd connection at: lxc:/// > 2016-06-10 18:25:02,271 DEBUG [kvm.resource.LibvirtConnection] > (UgentTask-5:null) Looking for libvirtd connection at: qemu:///system > =3D=3D=3D > > I checked and the system indeed supports namespace as per below result: > > =3D=3D=3D > root@sc-test-kvm-04:/var/log/cloudstack/agent# ip netns show > blue > =3D=3D=3D > > Any pointers on how we can resolve the problem? > > Looking forward to your reply, thank you. > > Cheers. > > -ip- > > --001a11428dec1ffce80534f9f205--