Description of problem: When attempting to deprovision mysql from downstream images, in this case brew-pulp-docker01.web.prod.ext.phx2.redhat.com:8888/openshift3/mysql-apb:v3.7, it fails because the key propagation_policy is not expected when creating the V1DeleteOptions() object. This suggests that the python2-kubernetes package is out of date, output below. ``` $ oc logs -n dh-mysql-apb-depr-9lscv apb-68084cdd-7f82-4472-934f-8e5e2edb21f4 + [[ deprovision --extra-vars {"_apb_plan_id":"dev","_apb_service_class_id":"ddd528762894b277001df310a126d5ad","_apb_service_instance_id":"06c290a4-b540-41df-8de7-91a7dc01a24f","mysql_database":"devel","mysql_user":"devel","mysql_version":"5.7","namespace":"fooproject","service_name":"mysql"} == *\s\2\i\/\a\s\s\e\m\b\l\e* ]] + ACTION=deprovision + shift + playbooks=/opt/apb/actions + CREDS=/var/tmp/bind-creds + TEST_RESULT=/var/tmp/test-result + whoami + '[' -w /etc/passwd ']' ++ id -u + echo 'apb:x:1000120000:0:apb user:/opt/apb:/sbin/nologin' + oc-login.sh Attempting to login with a service account... Logged into "https://kubernetes.default:443" as "system:serviceaccount:dh-mysql-apb-depr-9lscv:apb-68084cdd-7f82-4472-934f-8e5e2edb21f4" using the token provided. You have access to the following projects and can switch between them with 'oc project <projectname>': * dh-mysql-apb-depr-9lscv fooproject Using project "dh-mysql-apb-depr-9lscv". Welcome! See 'oc help' to get started. + set +x + [[ -e /opt/apb/actions/deprovision.yaml ]] + [[ -e /opt/apb/actions/deprovision.yml ]] + ANSIBLE_ROLES_PATH=/etc/ansible/roles:/opt/ansible/roles + ansible-playbook /opt/apb/actions/deprovision.yml --extra-vars '{"_apb_plan_id":"dev","_apb_service_class_id":"ddd528762894b277001df310a126d5ad","_apb_service_instance_id":"06c290a4-b540-41df-8de7-91a7dc01a24f","mysql_database":"devel","mysql_user":"devel","mysql_version":"5.7","namespace":"fooproject","service_name":"mysql"}' PLAY [mysql-apb playbook to deprovision the application] *********************** TASK [ansible.kubernetes-modules : Install latest openshift client] ************ skipping: [localhost] TASK [ansibleplaybookbundle.asb-modules : debug] ******************************* skipping: [localhost] TASK [rhscl-mysql-apb-openshift : include_tasks] ******************************* included: /opt/ansible/roles/rhscl-mysql-apb-openshift/tasks/dev.yml for localhost TASK [rhscl-mysql-apb-openshift : set MySQL deployment with ephemeral storage to absent] *** An exception occurred during task execution. To see the full traceback, use -vvv. The error was: TypeError: __init__() got an unexpected keyword argument 'propagation_policy' fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "module_stderr": "Traceback (most recent call last):\n File \"/tmp/ansible_U5cldO/ansible_module_openshift_v1_deployment_config.py\", line 4926, in <module>\n main()\n File \"/tmp/ansible_U5cldO/ansible_module_openshift_v1_deployment_config.py\", line 4920, in main\n module.execute_module()\n File \"/tmp/ansible_U5cldO/ansible_modlib.zip/ansible/module_utils/k8s_common.py\", line 191, in execute_module\n File \"/usr/lib/python2.7/site-packages/openshift/helper/base.py\", line 289, in delete_object\n status_obj = delete_method(name, namespace, body=V1DeleteOptions(propagation_policy='Foreground'))\nTypeError: __init__() got an unexpected keyword argument 'propagation_policy'\n", "module_stdout": "", "msg": "MODULE FAILURE", "rc": 0} [WARNING]: Could not create retry file '/opt/apb/actions/deprovision.retry'. [Errno 13] Permission denied: u'/opt/apb/actions/deprovision.retry' PLAY RECAP ********************************************************************* localhost : ok=1 changed=0 unreachable=0 failed=1 + EXIT_CODE=2 + set +ex + '[' -f /var/tmp/test-result ']' + '[' -f /var/tmp/bind-creds ']' + exit 2 ```
Downstream: ``` $ docker run -it --entrypoint /bin/bash brew-pulp-docker01.web.prod.ext.phx2.redhat.com:8888/openshift3/mysql-apb:v3.7 bash-4.2$ rpm -qa python2-kubernetes python2-kubernetes-1.0.2-1.el7.noarch ``` vs. Upstream: ``` $ docker run -it --entrypoint /bin/bash docker.io/ansibleplaybookbundle/rhscl-mysql-apb:139.3 bash-4.2$ rpm -qa python2-kubernetes python2-kubernetes-3.0.0-1.el7.centos.noarch ```
3.7.4-2 images should fix this if you can test this specific version. Note the 3.7.5-1 builds are probably broken. We're trying to find out from someone why containers with versions above 3.7.0 are picking up old packages.
Fixed. All latest images works fine and have updated python2-kubernetes package. No error in apb logs dering deprovision. openshift3/mysql-apb:v3.7.4-2 python2-kubernetes-3.0.0-1.el7.noarch openshift3/mediawiki-apb:v3.7.4-2 python2-kubernetes-3.0.0-1.el7.noarch openshift3/mariadb-apb:v3.7.4-2 python2-kubernetes-3.0.0-1.el7.noarch openshift3/postgresql-apb:v3.7.4-2 python2-kubernetes-3.0.0-1.el7.noarch Thanks for helpful information, David Zager, Jason Montleon.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2017:3464