Comments (8)
You indeed are passing it invalid input :)
alias set to ubuntu/xenial/amd64 should do the trick, or pass 16.04 but then set protocol to simplestreams and server to https://cloud-images.ubuntu.com/releases
from pylxd.
I get the same "Whoops" response with this config too:
config = {
'source': {
'alias': '16.04', 'type': 'image', 'mode': 'pull', 'protocol': 'simplestreams', 'server': 'https://cloud-images.ubuntu.com/releases'},
'name': CONTAINER_NAME,
'profiles': ['default']
}
But in any case, would you agree that the REST API should return an error for bad parameters, and that pylxd should return the error to the client, probably as an exception?
from pylxd.
Yeah, pylxd should definitely do a better job at catching errors here
from pylxd.
Just for the record, this config does work:
config = {
'source': {
'alias': 'ubuntu/xenial/amd64', 'type': 'image', 'mode': 'pull', 'protocol': 'lxd', 'server': 'https://images.linuxcontainers.org'},
'name': CONTAINER_NAME,
'profiles': ['default']
}
It creates a container (in stopped state)
from pylxd.
Should pylxd raise an exception if it gets a response with a status code > 400 ?
from pylxd.
However I already added that patch, so I believe this is different issue.
Here the job submission is accepted, pylxd polls for completion, but pylxd is apparently ignoring the result of the job.
from pylxd.
Raising an exception with status code >= 400 will inhibit specific error handling ie. in Container.get - integration tests caught it.
However, raising a RuntimeError on status_code >= 500 works well, adding it to my PR then.
from pylxd.
This is using the deprecated API (though forwarded to the public API for backwards compatibility), which was deprecated for this very reason. If you have similar issues (and by the looks of #77, you do) with the newer API, please report those issues.
from pylxd.
Related Issues (20)
- Latest release 2.3.0 or 2.3.1 HOT 1
- Client(verify=False) is not respected HOT 1
- migration: "instances" entry already exists HOT 1
- Lxc copy for clone lxc non exsiste in pylxd HOT 1
- Support managing network forwards HOT 1
- container.execute Failed to receive data ConnectionResetError: [Errno 104] Connection reset by peer ws4py/websocket.py HOT 1
- Replace ws4py with something which is maintained
- Connection refused error when using UNIX socket HOT 2
- pylxd version conflicts HOT 3
- Instability with executing commands and file operations in LXD virtual machine. HOT 2
- Please capture/return lxd container error logs within stack traces HOT 1
- Network ACLs management HOT 1
- Rename functionalities does not actually rename but create a new object instead
- Instance status and state().status out of sync
- Unable to pass recursion to client.instances.all()
- recursive_get doesn't preserve permissions HOT 1
- Can't set or update profile description HOT 1
- instance.save() tries and fails to modify volatile key in restricted project HOT 1
- The storage pool model is missing support for snapshots of custom volumes
- Creating an instance with a bogus `source` config gives a cryptic error HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pylxd.