hpe-storage / python-hpedockerplugin

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

Ansible installer with encryption : backend initialization is failing after using encrypted password #762

Closed sandesh-desai closed 4 years ago

sandesh-desai commented 4 years ago

Testbed Details:

[root@master-node ansible_3par_docker_plugin]# kubectl version Client Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.0", GitCommit:"e8462b5b5dc2584fdcd18e6bcfe9f1e4d970a529", GitTreeState:"clean", BuildDate:"2019-06-19T16:40:16Z", GoVersion:"go1.12.5", Compiler:"gc", Platform:"linux/amd64"} Server Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.6", GitCommit:"7015f71e75f670eb9e7ebd4b5749639d42e20079", GitTreeState:"clean", BuildDate:"2019-11-13T11:11:50Z", GoVersion:"go1.12.12", Compiler:"gc", Platform:"linux/amd64"} [root@master-node ansible_3par_docker_plugin]# docker version Client: Version: 18.09.6 API version: 1.39 Go version: go1.10.8 Git commit: 1578dca Built: Sat May 4 02:09:15 2019 OS/Arch: linux/amd64 Experimental: false

Server: Docker Engine - Enterprise Engine: Version: 18.09.6 API version: 1.39 (minimum version 1.12) Go version: go1.10.8 Git commit: 1578dca Built: Sat May 4 02:03:09 2019 OS/Arch: linux/amd64 Experimental: false [root@master-node ansible_3par_docker_plugin]# cat /etc/os-release NAME="Red Hat Enterprise Linux Server" VERSION="7.6 (Maipo)" ID="rhel" ID_LIKE="fedora" VARIANT="Server" VARIANT_ID="server" VERSION_ID="7.6" PRETTY_NAME="Red Hat Enterprise Linux" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:redhat:enterprise_linux:7.6:GA:server" HOME_URL="https://www.redhat.com/" BUG_REPORT_URL="https://bugzilla.redhat.com/"

REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 7" REDHAT_BUGZILLA_PRODUCT_VERSION=7.6 REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux" REDHAT_SUPPORT_PRODUCT_VERSION="7.6"

Steps to Re-Produced:

1.Created the properties file ansible-vault create plugin_configuration_properties.yml Create a new vault password. 2.Edit the properties file ansible-vault edit plugin_configuration_properties.yml and save 3.Ran the install script ansible-playbook -i /root/hosts install_hpe_3par_volume_driver.yml --ask-vault-pass 4.Password will be prompted give the same password which was give while creating.

Actual output: In hpe.conf 3par password not encrypted.

Expected output: In hpe.conf 3par password should be encrypted.

Attaching the output: encryption_Testing on K8s 1.15.txt

NOTE: same observation found on openshift Single master 3.11

Attaching the output: encryption_Testing on OS_3.11.txt .

sneharai4 commented 4 years ago

@sandesh-desai For the encryption to work, we need to add encryptor_key in the properties/plugin_configuration_properties.yml.

sneharai4 commented 4 years ago

@sandesh-desai Also, I have observed that the encryption is not working with volume_plugin: hpestorage/legacyvolumeplugin:3.3 but it works well with plugin 3.1.1. Will investigate this more and find out the root cause.

sneharai4 commented 4 years ago

Fix is given in #764.

amitk1977 commented 4 years ago

Issue is verified and fixed on OpenShift 3.11 and K8s 1.15

sandesh-desai commented 4 years ago

Attaching the resolved logs.

PASSED-K8S-1.15-MM-INSTALL-3.3.1-ENCRYPTION-VAULT-PASS.txt