Error when executing ansible-playbook -i environments/local couchdb.yml
- Dominant language
- Scala
- Stars
- 6.8k
- Forks
- 1.2k
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 2
Description
## Environment details:
* ubuntu 16.04
* `docker -v` Docker version 20.10.7, build f0df350
## Steps to reproduce the issue:
1. ` cd tools/ubuntu-setup && ./all.sh`
2. `./gradlew distDocker`
3. `ansible-playbook setup.yml`
4. `ansible-playbook -i environments/local couchdb.yml`
## the result of `ansible-playbook setup.yml`:
```
** [root@amax11 ansible]$ ansible-playbook -i environments/local setup.yml
/usr/local/lib/python3.5/dist-packages/ansible/parsing/vault/__init__.py:44: CryptographyDeprecationWarning: Python 3.5 support will be dropped in the next release of cryptography. Please upgrade your Python.
from cryptography.exceptions import InvalidSignature
PLAY [localhost] *********************************************************************************************************************************** [WARNING]: While constructing a mapping from /home/cxq/openwhisk/ansible/group_vars/all, line 486, column 3, found a duplicate dict key
(dataManagementService). Using last defined value only.
TASK [Gathering Facts] *****************************************************************************************************************************Tuesday 29 March 2022 20:12:21 +0800 (0:00:00.042) 0:00:00.042 *********
ok: [localhost]
TASK [gen hosts if 'local' env is used] ************************************************************************************************************Tuesday 29 March 2022 20:12:21 +0800 (0:00:00.764) 0:00:00.807 *********
ok: [localhost -> localhost]
TASK [find the ip of docker-machine] ***************************************************************************************************************Tuesday 29 March 2022 20:12:22 +0800 (0:00:00.556) 0:00:01.363 *********
skipping: [localhost]
TASK [get the docker-machine ip] *******************************************************************************************************************Tuesday 29 March 2022 20:12:22 +0800 (0:00:00.032) 0:00:01.395 *********
skipping: [localhost]
TASK [gen hosts for docker-machine] ****************************************************************************************************************Tuesday 29 March 2022 20:12:22 +0800 (0:00:00.040) 0:00:01.435 *********
skipping: [localhost]
TASK [gen hosts for Jenkins] ***********************************************************************************************************************Tuesday 29 March 2022 20:12:22 +0800 (0:00:00.035) 0:00:01.471 *********
skipping: [localhost]
TASK [check if db_local.ini exists?] ***************************************************************************************************************Tuesday 29 March 2022 20:12:22 +0800 (0:00:00.037) 0:00:01.509 *********
ok: [localhost]
TASK [prepare db_local.ini] ************************************************************************************************************************Tuesday 29 March 2022 20:12:22 +0800 (0:00:00.241) 0:00:01.750 *********
skipping: [localhost]
TASK [gen untrusted server certificate for host] ***************************************************************************************************Tuesday 29 March 2022 20:12:22 +0800 (0:00:00.044) 0:00:01.795 *********
changed: [localhost -> localhost]
TASK [gen untrusted client certificate for host] ***************************************************************************************************Tuesday 29 March 2022 20:12:23 +0800 (0:00:00.353) 0:00:02.149 *********
changed: [localhost -> localhost]
TASK [clean up old kafka keystore] *****************************************************************************************************************Tuesday 29 March 2022 20:12:23 +0800 (0:00:00.409) 0:00:02.558 *********
skipping: [localhost]
TASK [ensure kafka files directory exists] *********************************************************************************************************Tuesday 29 March 2022 20:12:23 +0800 (0:00:00.037) 0:00:02.595 *********
skipping: [localhost]
TASK [generate kafka certificates] *****************************************************************************************************************Tuesday 29 March 2022 20:12:23 +0800 (0:00:00.049) 0:00:02.645 *********
skipping: [localhost]
TASK [ensure controller files directory exists] ****************************************************************************************************Tuesday 29 March 2022 20:12:23 +0800 (0:00:00.033) 0:00:02.679 *********
ok: [localhost]
TASK [generate controller certificates] ************************************************************************************************************Tuesday 29 March 2022 20:12:24 +0800 (0:00:00.438) 0:00:03.117 *********
changed: [localhost -> localhost]
TASK [ensure invoker files directory exists] *******************************************************************************************************Tuesday 29 March 2022 20:12:24 +0800 (0:00:00.538) 0:00:03.656 *********
ok: [localhost]
TASK [generate invoker certificates] ***************************************************************************************************************Tuesday 29 March 2022 20:12:25 +0800 (0:00:00.426) 0:00:04.082 *********
changed: [localhost -> localhost]
PLAY RECAP *****************************************************************************************************************************************localhost : ok=9 changed=4 unreachable=0 failed=0
Tuesday 29 March 2022 20:12:25 +0800 (0:00:00.486) 0:00:04.569 *********
===============================================================================
Gathering Facts ----------------------------------------------------------------------------------------------------------------------------- 0.76s
gen hosts if 'local' env is used ------------------------------------------------------------------------------------------------------------ 0.56s
generate controller certificates ------------------------------------------------------------------------------------------------------------ 0.54s
generate invoker certificates --------------------------------------------------------------------------------------------------------------- 0.49s
ensure controller files directory exists ---------------------------------------------------------------------------------------------------- 0.44s
ensure invoker files directory exists ------------------------------------------------------------------------------------------------------- 0.43s
gen untrusted client certificate for host --------------------------------------------------------------------------------------------------- 0.41s
gen untrusted server certificate for host --------------------------------------------------------------------------------------------------- 0.35s
check if db_local.ini exists? --------------------------------------------------------------------------------------------------------------- 0.24s
ensure kafka files directory exists --------------------------------------------------------------------------------------------------------- 0.05s
prepare db_local.ini ------------------------------------------------------------------------------------------------------------------------ 0.04s
get the docker-machine ip ------------------------------------------------------------------------------------------------------------------- 0.04s
gen hosts for Jenkins ----------------------------------------------------------------------------------------------------------------------- 0.04s
clean up old kafka keystore ----------------------------------------------------------------------------------------------------------------- 0.04s
gen hosts for docker-machine ---------------------------------------------------------------------------------------------------------------- 0.04s
generate kafka certificates ----------------------------------------------------------------------------------------------------------------- 0.03s
find the ip of docker-machine --------------------------------------------------------------------------------------------------------------- 0.03s
**
```
## the result of `ansible-playbook -i environments/local couchdb.yml`:
```
[root@amax11 ansible]$ ansible-playbook -i environments/local couchdb.yml
/usr/local/lib/python3.5/dist-packages/ansible/parsing/vault/__init__.py:44: CryptographyDeprecationWarning: Python 3.5 support will be dropped in the next release of cryptography. Please upgrade your Python.
from cryptography.exceptions import InvalidSignature
PLAY [db] ****************************************************************************************************************************************** [WARNING]: While constructing a mapping from /home/cxq/openwhisk/ansible/group_vars/all, line 486, column 3, found a duplicate dict key
(dataManagementService). Using last defined value only.
TASK [Gathering Facts] *****************************************************************************************************************************Tuesday 29 March 2022 20:15:55 +0800 (0:00:00.044) 0:00:00.044 *********
ok: [172.17.0.1]
TASK [couchdb : set the coordinator to the first node] *********************************************************************************************Tuesday 29 March 2022 20:15:56 +0800 (0:00:00.637) 0:00:00.681 *********
ok: [172.17.0.1]
TASK [couchdb : Set the volumes] *******************************************************************************************************************Tuesday 29 March 2022 20:15:56 +0800 (0:00:00.054) 0:00:00.736 *********
ok: [172.17.0.1]
TASK [couchdb : Set the nodes] *********************************************************************************************************************Tuesday 29 March 2022 20:15:56 +0800 (0:00:00.045) 0:00:00.782 *********
ok: [172.17.0.1]
TASK [couchdb : check if db credentials are valid for CouchDB] *************************************************************************************Tuesday 29 March 2022 20:15:56 +0800 (0:00:00.055) 0:00:00.837 *********
skipping: [172.17.0.1]
TASK [couchdb : ensure directory for persisting db exists] *****************************************************************************************Tuesday 29 March 2022 20:15:56 +0800 (0:00:00.083) 0:00:00.921 *********
skipping: [172.17.0.1]
TASK [couchdb : fail if path to persist db does not exist] *****************************************************************************************Tuesday 29 March 2022 20:15:56 +0800 (0:00:00.084) 0:00:01.005 *********
skipping: [172.17.0.1]
TASK [couchdb : mount directory for persisting dbs] ************************************************************************************************Tuesday 29 March 2022 20:15:56 +0800 (0:00:00.074) 0:00:01.079 *********
skipping: [172.17.0.1]
TASK [couchdb : include_tasks] *********************************************************************************************************************Tuesday 29 March 2022 20:15:56 +0800 (0:00:00.077) 0:00:01.157 *********
skipping: [172.17.0.1]
TASK [couchdb : set the erlang cookie volume] ******************************************************************************************************Tuesday 29 March 2022 20:15:56 +0800 (0:00:00.082) 0:00:01.239 *********
skipping: [172.17.0.1]
TASK [couchdb : (re)start CouchDB from 'apache/couchdb:2.3 '] **************************************************************************************Tuesday 29 March 2022 20:15:56 +0800 (0:00:00.071) 0:00:01.310 *********
fatal: [172.17.0.1]: FAILED! => {"changed": false, "msg": "Failed to import docker-py - No module named requests.exceptions. Try `pip install docker-py`"}
Failed to import docker-py - No module named requests.exceptions. Try `pip
install docker-py`
PLAY RECAP *****************************************************************************************************************************************172.17.0.1 : ok=4 changed=0 unreachable=0 failed=1
Tuesday 29 March 2022 20:15:57 +0800 (0:00:00.284) 0:00:01.595 *********
===============================================================================
Gathering Facts ----------------------------------------------------------------------------------------------------------------------------- 0.64s
couchdb : (re)start CouchDB from 'apache/couchdb:2.3 ' ------------------------------------------------------------------------------------- 0.28s
couchdb : ensure directory for persisting db exists ----------------------------------------------------------------------------------------- 0.08s
couchdb : check if db credentials are valid for CouchDB ------------------------------------------------------------------------------------- 0.08s
couchdb : include_tasks --------------------------------------------------------------------------------------------------------------------- 0.08s
couchdb : mount directory for persisting dbs ------------------------------------------------------------------------------------------------ 0.08s
couchdb : fail if path to persist db does not exist ----------------------------------------------------------------------------------------- 0.07s
couchdb : set the erlang cookie volume ------------------------------------------------------------------------------------------------------ 0.07s
couchdb : Set the nodes --------------------------------------------------------------------------------------------------------------------- 0.06s
couchdb : set the coordinator to the first node --------------------------------------------------------------------------------------------- 0.06s
couchdb : Set the volumes ------------------------------------------------------------------------------------------------------------------- 0.05s
```
## Additional information you deem important:
* db_local.ini
```
[db_creds]
db_provider=CouchDB
db_username=openwhisk
db_password=openwhisk
db_protocol=http
db_host=172.17.0.1
db_port=5984
[controller]
db_username=whisk_local_controller0
db_password=some_controller_passw0rd
[invoker]
db_username=whisk_local_invoker0
db_password=some_invoker_passw0rd
[scheduler]
db_username=whisk_local_scheduler0
db_password=some_scheduler_passw0rd
```
* According to the error message, i have tried`pip install docker-py` while it didn't work
```[root@amax11 ansible]$ pip install docker-py
DEPRECATION: Python 3.5 reached the end of its life on September 13th, 2020. Please upgrade your Python as Python 3.5 is no longer maintained. pip 21.0 will drop support for Python 3.5 in January 2021. pip 21.0 will remove support for this functionality.
Requirement already satisfied: docker-py in /usr/local/lib/python3.5/dist-packages (1.10.6)
Requirement already satisfied: websocket-client>=0.32.0 in /usr/local/lib/python3.5/dist-packages (from docker-py) (0.59.0)
Requirement already satisfied: docker-pycreds>=0.2.1 in /usr/local/lib/python3.5/dist-packages (from docker-py) (0.4.0)
Requirement already satisfied: requests!=2.11.0,>=2.5.2 in /usr/local/lib/python3.5/dist-packages (from docker-py) (2.10.0)
Requirement already satisfied: six>=1.4.0 in /usr/local/lib/python3.5/dist-packages (from docker-py) (1.16.0)```
Contributor guide
Assessment
This issue has not been assessed yet.