ansibleplaybookbundle/ansible-playbook-bundle

apb push results in "Exception occurred! 'module' object has no attribute 'configuration'"

rwsu opened this issue · 5 comments

rwsu commented

On a fresh Centos7 VM, I used
apb 1.1.5-1.20180117190645.el7.centos
openshift origin 3.7.1

Pushing to local registry resulted in error.

Using project "ansible-service-broker".
++ oc whoami
admin
++ apb prepare
Finished writing dockerfile.
++ apb build
Finished writing dockerfile.
Building APB using tag: [tripleo-k8s-mariadb]
Successfully built APB image: tripleo-k8s-mariadb
++ apb push
version: 1.0
id: 5a9eb5f8-cbde-4e62-a30a-9fa30006fc9a
name: tripleo-k8s-mariadb
image: tripleo/tripleo-k8s-mariadb
description: This is a sample application generated by apb init
bindable: True
async: optional
metadata:
displayName: tripleo-k8s-mariadb
plans:

  • name: tripleo-k8s-mariadb
    description: This plan deploys mariadb on k8s
    free: True
    metadata: {}
    parameters: []

Found registry IP at: 172.30.1.1:5000
Building image with the tag: 172.30.1.1:5000/openshift/tripleo-k8s-mariadb
Exception occurred! 'module' object has no attribute 'configuration'

@rwsu what version of the openshift python package are you running? See if updating it helps

Also update the kubernetes python package.

rwsu commented

What is the OpenShift python package called? In any case, I did a system update and that did the trick. Thanks.

pip install -U openshift kubernetes

if you're using the containerized apb-tool, try the canary tag.

docker pull docker.io/ansibleplaybookbundle/apb-tools:canary

alias apb='docker run --rm --privileged -v $PWD:/mnt -v $HOME/.kube:/.kube -v /var/run/docker.sock:/var/run/docker.sock -u $UID docker.io/ansibleplaybookbundle/apb-tools:canary'