hpe-storage / python-hpedockerplugin

HPE Native Docker Plugin
Apache License 2.0
36 stars 64 forks source link

Installer Upgrade - Plugin upgrade fails with Encryption key set in properties file #766

Closed sonawane-shashikant closed 4 years ago

sonawane-shashikant commented 4 years ago

Summary - When encryption_key is set in plugin properties file, and plugin upgrade from 3.1.1 to 3.3.1 is attempted, it observed that, initial plugin installtion is successful with 3.1.1 but upgrade from 3.1.1 to 3.3.1 fails.

Test Bed - Server https://cld6b15-openshift-master00.set.rdlabs.hpecorp.net:8443 openshift v3.11.135 kubernetes v1.11.0+d4cacc0 [root@cld6b15-openshift-master00 ~]#

Issue is reproduced on k8s 1.15 as well

[root@cssosbe01-196119 ~]# kubeadm version kubeadm version: &version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.3", GitCommit:"2d3c76f9091b6bec110a5e63777c332469e0cba2", GitTreeState:"clean", BuildDate:"2019-08-19T11:11:18Z", GoVersion:"go1.12.9", Compiler:"gc", Platform:"linux/amd64"} [root@cssosbe01-196119 ~]#

Steps to reproduce -

  1. Install plugin having version 3.1.1 either in openshift 3.11 or k8s 1.15.
  2. Verify the successful installtion of your plugin.
  3. Go to plugin properties file and replace plugin tag from 3.1.1 to 3.3.1
  4. Run installer again.

Expected Results - Plugin should be upgraded successfully

Actual Results - Plugin upgrade fails with below error.

failed: [15.212.196.151] (item=[u'DEFAULT', {u'option': u'hpe3par_password', u'value': u'hpe3par_password'}]) => {"changed": true, "cmd": "hpe3parencryptor --backend DEFAULT -a shashi \"3pardata\"", "delta": "0:00:00.709962", "end": "2019-12-13 20:41:23.653150", "item": ["DEFAULT", {"option": "hpe3par_password", "value": "hpe3par_password"}], "msg": "non-zero return code", "rc": 255, "start": "2019-12-13 20:41:22.943188", "stderr": "", "stderr_lines": [], "stdout": "Plugin is running can not perform the operation\nABORTING\nERROR: Not able to connect etcd, this could be because of:\n1. etcd is not running\n2. host and port in conf file is wrong.", "stdout_lines": ["Plugin is running can not perform the operation", "ABORTING", "ERROR: Not able to connect etcd, this could be because of:", "1. etcd is not running", "2. host and port in conf file is wrong."]}

Attached are the output files for K8S and OpenShift

FAILED_OS_3.11_MM_UPGRADE_ENCRYPTION_VAULTPASS.txt FAILED-K8S-1.15-MM-UPGRADE-3.1.1-3.3.1-ENCRYPTION-VAULT-PASS.txt

bhagyashree-sarawate commented 4 years ago

The bug is fixed and pushed into the branch https://github.com/bhagyashree-sarawate/python-hpedockerplugin/blob/installer_support_matrix

sonawane-shashikant commented 4 years ago

Verifying this issues as FIXED. Attached are the relevant outputs.

PASSED_K8S_1.15_MM_INSTALL_UPGRADE_WO_ENCRYPTION.txt PASSED_OS_3.11_MM_INSTALL_UPGRADE_ENCRYPTION_VAULTPASS.txt PASSED_OS_3.11_MM_INSTALL_UPGRADE_WO_ENCRYPTION.txt PASSED_K8S_1.15_MM_INSTALL_UPGRADE_ENCRYPTION_VAULTPASS.txt