Pin pip packages to stay with python2

Change-Id: Ibd3b9883130d57afbd7f6bacaecf7fec467996e7
Related-Prod: PROD-34533
diff --git a/src/com/mirantis/mk/Openstack.groovy b/src/com/mirantis/mk/Openstack.groovy
index 0e02f2a..88706d5 100644
--- a/src/com/mirantis/mk/Openstack.groovy
+++ b/src/com/mirantis/mk/Openstack.groovy
@@ -41,7 +41,7 @@
         'oslo.i18n>=2.3.0,<2.4.0',
         'oslo.serialization>=1.8.0,<1.9.0',
         'oslo.utils>=1.4.0,<1.5.0',
-        'docutils'
+        'docutils==0.16'
     ]
 
     def openstack_latest_packages = [
@@ -58,10 +58,12 @@
         'warlock<=1.3.1;python_version=="2.7"',
         'warlock>1.3.1;python_version=="3.4"',
         'warlock>1.3.1;python_version=="3.5"',
-        'python-openstackclient',
-        'python-octaviaclient',
-        'python-heatclient',
-        'docutils'
+        // NOTE: pin client packages to current latest to prevent
+        // downloading packages which are not support Python 2.7
+        'python-openstackclient==4.0.0',
+        'python-octaviaclient==1.11.0',
+        'python-heatclient=1.18.0',
+        'docutils==0.16'
     ]
 
     if (version == 'kilo') {
diff --git a/src/com/mirantis/mk/Python.groovy b/src/com/mirantis/mk/Python.groovy
index 9d07d47..9c9bf88 100644
--- a/src/com/mirantis/mk/Python.groovy
+++ b/src/com/mirantis/mk/Python.groovy
@@ -159,7 +159,7 @@
  */
 def setupDocutilsVirtualenv(path, python="python2") {
     requirements = [
-        'docutils',
+        'docutils==0.16',
     ]
     setupVirtualenv(path, python, requirements)
 }
@@ -453,8 +453,8 @@
  */
 def setupJinjaVirtualenv(path) {
     requirements = [
-        'jinja2-cli',
-        'pyyaml',
+        'jinja2-cli==0.7.0',
+        'pyyaml==5.3',
     ]
     setupVirtualenv(path, 'python2', requirements)
 }