failed to retrieve the template to clone: lxc container

Bug #1499718 reported by Sean Feole
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju-core (Ubuntu)
New
Undecided
Unassigned

Bug Description

Juju version: 1.25-alpha1-0ubuntu1~14.04.1~juju1
agent-metadata-url=https://streams.canonical.com/juju/tools
agent-stream=devel

I have seen this problem arise in the past from time to time , but it's never really consistent. I'm unable to create lxc containers on hosts that are added to my juju environment. but it usually always works on the stateserver node.

 See below:

$ juju status
environment: maas
machines:
  "0":
    agent-state: started
    agent-version: 1.25-alpha1
    dns-name: ms10-08-avaton.1ss
    instance-id: /MAAS/api/1.0/nodes/node-38852c38-61a9-11e5-8ddf-5254005431bd/
    series: trusty
    containers:
      0/lxc/0:
        agent-state: started
        agent-version: 1.25-alpha1
        dns-name: 10.229.81.65
        instance-id: juju-machine-0-lxc-0
        series: trusty
        hardware: arch=amd64
    hardware: arch=amd64 cpu-cores=8 mem=32768M tags=avaton
    state-server-member-status: has-vote
  "1":
    agent-state: started
    agent-version: 1.25-alpha1
    dns-name: ms10-07-avaton.1ss
    instance-id: /MAAS/api/1.0/nodes/node-7ddc8ec0-61a9-11e5-96eb-5254005431bd/
    series: trusty
    containers:
      1/lxc/1:
        agent-state-info: 'failed to retrieve the template to clone: lxc container
          creation failed: error executing "lxc-create": + ''['' amd64 = i686 '']'';
          + ''['' 0 = 0 '']''; + case "$hostarch:$arch" in; + :; + ''['' tryreleased
          ''!='' daily -a tryreleased ''!='' released -a tryreleased ''!='' tryreleased
          '']''; + ''['' -z /var/lib/lxc/juju-trusty-lxc-template '']''; ++ id -u;
          + ''['' 0 ''!='' 0 '']''; + config=/var/lib/lxc/juju-trusty-lxc-template/config;
          + ''['' -z /var/lib/lxc/juju-trusty-lxc-template/rootfs '']''; + type ubuntu-cloudimg-query;
          ubuntu-cloudimg-query is /usr/bin/ubuntu-cloudimg-query; + type wget; wget
          is /tmp/wget789803152/wget; + cache=/var/cache/lxc/cloud-trusty; + ''[''
          0 -eq 1 '']''; + mkdir -p /var/cache/lxc/cloud-trusty; + ''['' tryreleased
          = tryreleased '']''; + stream=released; + ubuntu-cloudimg-query trusty released
          amd64; + ''['' -n https://10.229.65.108:17070/environment/f70ed3cd-54c4-477e-8fb2-829c5ee1fec4/images/lxc/trusty/amd64/ubuntu-14.04-server-cloudimg-amd64-root.tar.gz
          '']''; + url2=https://10.229.65.108:17070/environment/f70ed3cd-54c4-477e-8fb2-829c5ee1fec4/images/lxc/trusty/amd64/ubuntu-14.04-server-cloudimg-amd64-root.tar.gz;
          ++ basename https://10.229.65.108:17070/environment/f70ed3cd-54c4-477e-8fb2-829c5ee1fec4/images/lxc/trusty/amd64/ubuntu-14.04-server-cloudimg-amd64-root.tar.gz;
          + filename=ubuntu-14.04-server-cloudimg-amd64-root.tar.gz; + ''['' -n https://10.229.65.108:17070/environment/f70ed3cd-54c4-477e-8fb2-829c5ee1fec4/images/lxc/trusty/amd64/ubuntu-14.04-server-cloudimg-amd64-root.tar.gz
          '']''; + do_extract_rootfs; + cd /var/cache/lxc/cloud-trusty; + ''['' 0
          -eq 1 '']''; + trap wgetcleanup EXIT SIGHUP SIGINT SIGTERM; + ''['' ''!''
          -f ubuntu-14.04-server-cloudimg-amd64-root.tar.gz '']''; + wget https://10.229.65.108:17070/environment/f70ed3cd-54c4-477e-8fb2-829c5ee1fec4/images/lxc/trusty/amd64/ubuntu-14.04-server-cloudimg-amd64-root.tar.gz;
          --2015-09-25 12:27:37-- https://10.229.65.108:17070/environment/f70ed3cd-54c4-477e-8fb2-829c5ee1fec4/images/lxc/trusty/amd64/ubuntu-14.04-server-cloudimg-amd64-root.tar.gz;
          Connecting to 10.229.65.108:17070... connected.; ERROR: certificate
          common name ''*'' doesn''t match requested host name ''10.229.65.108''.;
          To connect to 10.229.65.108 insecurely, use `--no-check-certificate''.;
          + build_root_tgz ubuntu-14.04-server-cloudimg-amd64-root.tar.gz; + url=ubuntu-14.04-server-cloudimg-amd64-root.tar.gz;
          + filename=; ++ mktemp -d -p .; + xdir=./tmp.ldkBhCxaeY; ++ basename ubuntu-14.04-server-cloudimg-amd64-root.tar.gz;
          + tarname=ubuntu-14.04-server-cloudimg-amd64-root.tar.gz; + imgname=''trusty-*-cloudimg-amd64.img'';
          + trap buildcleanup EXIT SIGHUP SIGINT SIGTERM; + ''['' 0 -eq 1 -o ''!''
          -f /var/cache/lxc/cloud-trusty/ubuntu-14.04-server-cloudimg-amd64-root.tar.gz
          '']''; + rm -f ubuntu-14.04-server-cloudimg-amd64-root.tar.gz; + echo ''Downloading
          cloud image from ubuntu-14.04-server-cloudimg-amd64-root.tar.gz''; Downloading
          cloud image from ubuntu-14.04-server-cloudimg-amd64-root.tar.gz; + wget
          ubuntu-14.04-server-cloudimg-amd64-root.tar.gz; --2015-09-25 12:27:37-- http://ubuntu-14.04-server-cloudimg-amd64-root.tar.gz/;
          Resolving ubuntu-14.04-server-cloudimg-amd64-root.tar.gz (ubuntu-14.04-server-cloudimg-amd64-root.tar.gz)...
          failed: Name or service not known.; wget: unable to resolve host address
          ''ubuntu-14.04-server-cloudimg-amd64-root.tar.gz''; + echo ''Couldn''\''''t
          find cloud image ubuntu-14.04-server-cloudimg-amd64-root.tar.gz.''; Couldn''t
          find cloud image ubuntu-14.04-server-cloudimg-amd64-root.tar.gz.; + exit
          1; + buildcleanup; + cd /var/lib/lxc/juju-trusty-lxc-template/rootfs; +
          umount -l /var/cache/lxc/cloud-trusty/./tmp.ldkBhCxaeY; umount: /var/cache/lxc/cloud-trusty/./tmp.ldkBhCxaeY:
          not mounted; + true; + rm -rf /var/cache/lxc/cloud-trusty; lxc_container:
          lxccontainer.c: create_run_template: 1125 container creation template for
          juju-trusty-lxc-template failed; lxc_container: lxc_create.c: main: 271
          Error creating container juju-trusty-lxc-template'
        instance-id: pending
        series: trusty
    hardware: arch=amd64 cpu-cores=8 mem=32768M tags=avaton
services: {}

I have posted the last few lines on the debug log here:

http://pastebin.ubuntu.com/12553885/

The last line displays the error.

Revision history for this message
Sean Feole (sfeole) wrote :
Revision history for this message
Trent Lloyd (lathiat) wrote :

You might be onto something there.. on my local juju host (where I run the command) I had 2 DNS servers, one that knew about the .maas and one that didn't. Changed over to the one that did and it worked.

Having said that, I didn't retry to see if it failed reliably without said DNS.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.