Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Image location error is incomprehensible #2094
Comments
|
It would if the image server you were talking to wasn't a static apache2 web server :) |
|
images: isn't running LXD at all, it's a static web server with some clever rewrite rules. The source of the error you're getting is because it doesn't know if you typed a partial hash (where we only support full length or 12 chars length in our fake server) or if you requested something which doesn't exist at all. |
|
I'm sure there are excellent technical reasons why it doesn't work. My only point is that this is a terrible message which should be fixed taking in account that it's a user sitting at the terminal, rather than a developer. There's nothing in that location, and I should try another one. |
|
Suggested message: |
|
That error message would be rather confusing to people doing:
Which is an existing image and would be absolutely valid on any real LXD server. |
|
I don't understand the point. If it is an existing image, then the image exists and you should not display this error. |
|
The server is a static web server, it doesn't know how to match partial hashes. Anyway, I changed the error to:
That will have to do. |
stgraber
closed this
Jun 9, 2016
|
Thanks, that's way more clear. Might be worth mentioning what was not found. Note that the fact a static web server is backing it is somewhat irrelevant. The lxc tool can do whatever it wants to present reasonable information to the user. |
mikescott
commented
Nov 12, 2017
|
For anybody (like me) who arrived here through Google and is trying to create lxd containers with Ansible, it's because their current documentation is wrong. I wanted to use images:debian/stretch. Their main example for images: is: # An example for creating a Ubuntu container and install python
- hosts: localhost
connection: local
tasks:
- name: Create a started container
lxd_container:
name: mycontainer
state: started
source:
type: image
mode: pull
server: https://images.linuxcontainers.org
protocol: lxd
alias: ubuntu/xenial/amd64
profiles: ["default"]
wait_for_ipv4_addresses: true
timeout: 600So I tried changing alias to "debian/stretch" and "images:debian/stretch" but got the cryptic error above. As stgraber mentioned this is because images: is not running lxd, so the protocol setting needs to be "simplestreams", and the correct alias would be "debian/stretch". |
niemeyer commentedJun 9, 2016
Tried this today:
This should really say "image not found" or similar.