GithubHelp home page GithubHelp logo

custodia.openshift's People

Contributors

tiran avatar

Watchers

 avatar  avatar  avatar  avatar

custodia.openshift's Issues

KeyError: u'containerID' on OpenShift 3.7

In some situations I see custodia configured with custodia.openshift to fail with

2018-01-03 15:59:15 - ContainerAuth-[auth:container]   - Detected docker://6e3578420cc82950272a5a479e48222be99e9f9a35104a24751124dbcdd6e630 for pid 102522
2018-01-03 15:59:15 - SimplePathAuthz-[authz:paths]    - PASS: '102522' authorized for '/secrets'
2018-01-03 15:59:15 - server                           - Handler failed: KeyError(u'containerID',)
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/custodia/httpd/server.py", line 351, in handle_one_request
    response = self.pipeline(self.server.config, request)
  File "/usr/lib/python2.7/site-packages/custodia/httpd/server.py", line 450, in pipeline
    valid = authzers[authz].handle(request)
  File "/usr/lib/python2.7/site-packages/custodia/openshift/authz.py", line 83, in handle
    pod = self.find_pod(pods, containerid)
  File "/usr/lib/python2.7/site-packages/custodia/openshift/authz.py", line 68, in find_pod
    if status[u'containerID'] == containerid:
KeyError: u'containerID'

It seems the code in find_pod cycles containerStatuses but assumes that containerID has to be present.

I haven't seen my tests fail with OpenShift 3.6 but with 3.7, I've started to get the above traceback, so maybe in 3.7 containerID can be missing? Or perhaps with 3.6 I was just lucky. In any case, the code should likely check for containerID existence.

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.