Errors building custom ubuntu-core images

Luke Williams luke.williams at canonical.com
Fri Oct 14 00:32:08 UTC 2016


Hmm….

I’m getting http 500 errors when I try anything other than the stable channel….

wililupy at xenial-build:~/temp$ sudo /snap/bin/ubuntu-image -c edge -o onl-snappy.img --extra-snaps onl-kernel_3.18.25_amd64.snap pc.model 
error: received an unexpected http response code (500) when trying to download https://068ed04f23.site.internapcdn.net/download-snap/UqFziVZDHLSyO3TqSWgNBoAdHbLI4dAH_9.snap?t=2016-10-15T00:30:14Z&h=06855316c6c93f4548f3a54513bd82ed66f018ee
COMMAND FAILED: snap prepare-image --channel=edge --extra-snaps=onl-kernel_3.18.25_amd64.snap pc.model /tmp/tmpvm_5sw_c/unpackuncaught exception in state machine step: [1] prepare_image
Traceback (most recent call last):
  File "/snap/ubuntu-image/20/usr/lib/python3.5/site-packages/ubuntu_image/state.py", line 68, in __next__
    step()
  File "/snap/ubuntu-image/20/usr/lib/python3.5/site-packages/ubuntu_image/builder.py", line 139, in prepare_image
    self.args.channel, self.args.extra_snaps)
  File "/snap/ubuntu-image/20/usr/lib/python3.5/site-packages/ubuntu_image/helpers.py", line 130, in snap
    run(cmd, stdout=None, stderr=None)
  File "/snap/ubuntu-image/20/usr/lib/python3.5/site-packages/ubuntu_image/helpers.py", line 114, in run
    proc.check_returncode()
  File "/snap/ubuntu-image/20/usr/lib/python3.5/subprocess.py", line 659, in check_returncode
    self.stderr)
subprocess.CalledProcessError: Command '['snap', 'prepare-image', '--channel=edge', '--extra-snaps=onl-kernel_3.18.25_amd64.snap', 'pc.model', '/tmp/tmpvm_5sw_c/unpack']' returned non-zero exit status 1
Crash in state machine
Traceback (most recent call last):
  File "/snap/ubuntu-image/20/usr/lib/python3.5/site-packages/ubuntu_image/__main__.py", line 117, in main
    list(state_machine)
  File "/snap/ubuntu-image/20/usr/lib/python3.5/site-packages/ubuntu_image/state.py", line 68, in __next__
    step()
  File "/snap/ubuntu-image/20/usr/lib/python3.5/site-packages/ubuntu_image/builder.py", line 139, in prepare_image
    self.args.channel, self.args.extra_snaps)
  File "/snap/ubuntu-image/20/usr/lib/python3.5/site-packages/ubuntu_image/helpers.py", line 130, in snap
    run(cmd, stdout=None, stderr=None)
  File "/snap/ubuntu-image/20/usr/lib/python3.5/site-packages/ubuntu_image/helpers.py", line 114, in run
    proc.check_returncode()
  File "/snap/ubuntu-image/20/usr/lib/python3.5/subprocess.py", line 659, in check_returncode
    self.stderr)
subprocess.CalledProcessError: Command '['snap', 'prepare-image', '--channel=edge', '--extra-snaps=onl-kernel_3.18.25_amd64.snap', 'pc.model', '/tmp/tmpvm_5sw_c/unpack']' returned non-zero exit status 1

Thanks,

Luke Williams - Technical Partner Manager, Network Switches/Ubuntu-Core
email: luke.williams at canonical.com <mailto:luke.williams at canonical.com>
http://www.canonical.com/ <http://www.canonical.com/> | http://www.ubuntu.com <http://www.ubuntu.com/>





> On Oct 13, 2016, at 5:24 PM, Manik Taneja <manik at canonical.com> wrote:
> 
> +mvo
> 
> luke,
> fyi, i can build pc image just fine with-
> 
> <image.png>
> 
> i think your issue might be something else. perhaps, mvo can help.
> 
> /manik
> 
> On Thu, Oct 13, 2016 at 4:08 PM, Luke Williams <luke.williams at canonical.com <mailto:luke.williams at canonical.com>> wrote:
> Hello,
> 
> I am trying to build a custom ubuntu-core image with a custom kernel. Below is my assertion:
> 
> {
> 
>   "type": "model",
> 
>   "authority-id": "<removed>",
> 
>   "brand-id": "<removed>",
> 
>   "series": "16",
> 
>   "model": "pc",
> 
>   "architecture": "amd64",
> 
>   "gadget": "pc",
> 
>   "kernel": "onl-kernel_3.18.25_amd64.snap",
> 
>   "timestamp": "2016-10-13T22:26:50+00:00"
> 
> }
> 
> 
> I the sign the assertion and have a valid assertion model, but when I try to build, I get the following error:
> 
> 
> $ sudo /snap/bin/ubuntu-image -c stable -o onl-snappy.img --extra-snaps onl-kernel_3.18.25_amd64.snap pc.model
> 
> Fetching core
> 
> Copying "onl-kernel_3.18.25_amd64.snap" (onl-kernel)
> 
> Fetching pc
> 
> onl-kernel already prepared, skipping
> 
> uncaught exception in state machine step: [2] load_gadget_yaml
> 
> Traceback (most recent call last):
> 
>   File "/snap/ubuntu-image/20/usr/lib/python3.5/site-packages/ubuntu_image/state.py", line 68, in __next__
> 
>     step()
> 
>   File "/snap/ubuntu-image/20/usr/lib/python3.5/site-packages/ubuntu_image/builder.py", line 145, in load_gadget_yaml
> 
>     with open(yaml_file, 'r', encoding='utf-8') as fp:
> 
> FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmpfmnriroe/unpack/gadget/meta/gadget.yaml'
> 
> Crash in state machine
> 
> Traceback (most recent call last):
> 
>   File "/snap/ubuntu-image/20/usr/lib/python3.5/site-packages/ubuntu_image/__main__.py", line 117, in main
> 
>     list(state_machine)
> 
>   File "/snap/ubuntu-image/20/usr/lib/python3.5/site-packages/ubuntu_image/state.py", line 68, in __next__
> 
>     step()
> 
>   File "/snap/ubuntu-image/20/usr/lib/python3.5/site-packages/ubuntu_image/builder.py", line 145, in load_gadget_yaml
> 
>     with open(yaml_file, 'r', encoding='utf-8') as fp:
> 
> FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmpfmnriroe/unpack/gadget/meta/gadget.yaml'
> 
> It almost looks like the gadget snap is no longer called pc, but I cannot find in any past threads or documentation what it was changed to.
> 
> Any help would be greatly appreciated.
> 
> -- 
> Thanks,
> 
> 
> Luke Williams - Technical Partner Manager, Network Switches and Ubuntu-Core
> luke.williams at canonical.com <mailto:luke.williams at canonical.com>
> www.canonical.com <http://www.canonical.com/> || www.ubuntu.com <http://www.ubuntu.com/>
> 
> 
> --
> Snapcraft mailing list
> Snapcraft at lists.snapcraft.io <mailto:Snapcraft at lists.snapcraft.io>
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/snapcraft <https://lists.ubuntu.com/mailman/listinfo/snapcraft>
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/snapcraft/attachments/20161013/383a3e29/attachment.html>


More information about the Snapcraft mailing list