You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2019/05/21 12:06:52 UTC

[GitHub] [incubator-openwhisk-deploy-kube] neerajmangal opened a new issue #467: Invoker agent failed to pull docker images if using docker registry name.

neerajmangal opened a new issue #467: Invoker agent failed to pull docker images if using docker registry name.  
URL: https://github.com/apache/incubator-openwhisk-deploy-kube/issues/467
 
 
   ## Description 
   
   InitContainer `docker-pull-runtimes` failed to perform `docker login` task from playbook with below error. 
   
   ```bash
   TASK [docker login] ************************************************************
   fatal: [localhost]: FAILED! => {"changed": false, "msg": "Failed to import docker-py - No module named requests.exceptions. Try `pip install docker-py`"}
   	to retry, use: --limit @/invoker-scripts/playbook.retry
   
   PLAY RECAP *********************************************************************
   localhost                  : ok=2    changed=0    unreachable=0    failed=1
   
   ```
   
   
   ## Steps to reproduce the issue:
   
   1. In mycluster.yml, select enable as invoker agent. 
   2. Add private Docker Registry. 
   
   ```yaml
   invoker: 
        kubernetes:
         replicaCount: 3
         agent:
           imageName: "openwhisk/kube-invoker-agent"
           imageTag: "7314d75"
           imagePullPolicy: "IfNotPresent"
           enabled: true
           port: 3233
   docker:
     registry:
       name: <Docker registry Name with suffix "/">
       username: mangal
       password: <docker-registry-password>
   ```
   ## Troubleshooting 
   
   By looking at the error, it seems like it looks like the issue is because of docker-py but while performing docker login. But if we do docker login outside of ansible playbook, docker login works. 
   
   Added few debugging in the InitContainer commands. 
   
   ```bash
   kubectl logs owstage-invoker-agent-2rrlb -c docker-pull-runtimes 
   + pip list
   DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
   Package                      Version
   ---------------------------- --------
   ansible                      2.5.2
   asn1crypto                   0.24.0
   backports.ssl-match-hostname 3.7.0.1
   bcrypt                       3.1.6
   certifi                      2019.3.9
   cffi                         1.12.3
   chardet                      3.0.4
   cryptography                 2.1.4
   docker                       4.0.1
   enum34                       1.1.6
   gyp                          0.1
   idna                         2.6
   ipaddress                    1.0.17
   Jinja2                       2.9.6
   keyring                      10.6.0
   keyrings.alt                 3.0
   MarkupSafe                   1.1.1
   paramiko                     2.4.2
   pip                          19.0.3
   pyasn1                       0.4.5
   pycparser                    2.19
   pycrypto                     2.6.1
   pygobject                    3.26.1
   PyNaCl                       1.3.0
   pyxdg                        0.25
   PyYAML                       5.1
   requests                     2.22.0
   SecretStorage                2.3.1
   setuptools                   41.0.0
   six                          1.11.0
   urllib3                      1.25.2
   websocket-client             0.56.0
   wheel                        0.30.0
   You are using pip version 19.0.3, however version 19.1.1 is available.
   You should consider upgrading via the 'pip install --upgrade pip' command.
   + docker login -u mangal -p <token> <docker-registry>.corp.adobe.com
   Login Succeeded
   + ls /invoker-scripts/playbook.yml
   /invoker-scripts/playbook.yml
   ---
   ---
   ---
   TASK [docker login] ************************************************************
   fatal: [localhost]: FAILED! => {"changed": false, "msg": "Failed to import docker-py - No module named requests.exceptions. Try `pip install docker-py`"}
   	to retry, use: --limit @/invoker-scripts/playbook.retry
   
   PLAY RECAP *********************************************************************
   localhost                  : ok=2    changed=0    unreachable=0    failed=1
   ```
   
   So it seems to have the issue with ansible docker module only.  
   
   ## Solution and changes (WIP)
   
   1. Added docker pip module in ow-utils image. 
   
   Need to open separate PR to main repo for the fix and will update the new ow-utils image tag in this repo.  
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services