GithubHelp home page GithubHelp logo

Comments (8)

stgraber avatar stgraber commented on May 31, 2024

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.

candlerb avatar candlerb commented on May 31, 2024

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.

stgraber avatar stgraber commented on May 31, 2024

Yeah, pylxd should definitely do a better job at catching errors here

from pylxd.

candlerb avatar candlerb commented on May 31, 2024

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.

jpic avatar jpic commented on May 31, 2024

Should pylxd raise an exception if it gets a response with a status code > 400 ?

from pylxd.

candlerb avatar candlerb commented on May 31, 2024

I think it should

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.

jpic avatar jpic commented on May 31, 2024

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.

rockstar avatar rockstar commented on May 31, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.