From d6d0c954b9d9cde4d30ff927d170a76ec4669767 Mon Sep 17 00:00:00 2001 From: micafer Date: Mon, 29 Jun 2020 16:28:50 +0200 Subject: [PATCH 1/4] Set version 1.9.3 --- IM/__init__.py | 2 +- changelog | 5 +++++ docker-devel/Dockerfile | 6 +++--- docker-py3/Dockerfile | 8 ++++---- docker/Dockerfile | 8 +++----- 5 files changed, 16 insertions(+), 13 deletions(-) diff --git a/IM/__init__.py b/IM/__init__.py index af81dc2c9..c169196bb 100644 --- a/IM/__init__.py +++ b/IM/__init__.py @@ -19,7 +19,7 @@ 'InfrastructureInfo', 'InfrastructureManager', 'recipe', 'request', 'REST', 'retry', 'ServiceRequests', 'SSH', 'SSHRetry', 'timedcall', 'UnixHTTPAdapter', 'VirtualMachine', 'VMRC', 'xmlobject'] -__version__ = '1.9.2' +__version__ = '1.9.3' __author__ = 'Miguel Caballer' diff --git a/changelog b/changelog index dca26aa32..7e331d02d 100644 --- a/changelog +++ b/changelog @@ -586,3 +586,8 @@ IM 1.9.2: * Fix error in get_nets_common_cird if cidr is not set. * Fix error creating VPC in case of common network do not uses /16 range. * Fir error adding routers in EC2 conn. + +IM 1.9.3: + * Support for ex_tenant_domain_id due to change in libcloud. + * Error getting EC2 instance types. + * Error deleting SGs in some OpenStack sites. \ No newline at end of file diff --git a/docker-devel/Dockerfile b/docker-devel/Dockerfile index 6a0bb5c5b..e69f78fcc 100644 --- a/docker-devel/Dockerfile +++ b/docker-devel/Dockerfile @@ -1,8 +1,8 @@ # Dockerfile to create a container with the IM service FROM grycap/jenkins:ubuntu16.04-im ARG BRANCH=devel -MAINTAINER Miguel Caballer -LABEL version="1.9.2" +LABEL maintainer="Miguel Caballer " +LABEL version="1.9.3" LABEL description="Container image to run the IM service. (http://www.grycap.upv.es/im)" EXPOSE 8899 8800 @@ -14,7 +14,7 @@ RUN cd tmp \ && pip install /tmp/im # Install pip optional libraries -RUN pip install MySQL-python pyOpenSSL cheroot==8.1.0 pymongo msrest msrestazure azure-common azure-mgmt-storage azure-mgmt-compute azure-mgmt-network azure-mgmt-resource azure-mgmt-dns azure-storage +RUN pip install MySQL-python pyOpenSSL cheroot==8.1.0 pymongo msrest msrestazure azure-common azure-mgmt-storage azure-mgmt-compute azure-mgmt-network azure-mgmt-resource azure-mgmt-dns # Set the VM_NUM_USE_CTXT_DIST to 3 for the tests RUN sed -i -e 's/VM_NUM_USE_CTXT_DIST = 30/VM_NUM_USE_CTXT_DIST = 3/g' /etc/im/im.cfg diff --git a/docker-py3/Dockerfile b/docker-py3/Dockerfile index 0280e13f5..aa33f8940 100644 --- a/docker-py3/Dockerfile +++ b/docker-py3/Dockerfile @@ -1,7 +1,7 @@ # Dockerfile to create a container with the IM service FROM ubuntu:18.04 LABEL maintainer="Miguel Caballer " -LABEL version="1.9.2" +LABEL version="1.9.3" LABEL description="Container image to run the IM service. (http://www.grycap.upv.es/im)" EXPOSE 8899 8800 @@ -12,9 +12,9 @@ RUN apt-get update && apt-get install --no-install-recommends -y python3 openssh # Install IM RUN apt-get update && apt-get install --no-install-recommends -y git python3-pip && \ pip3 install pip setuptools --upgrade && \ - /usr/local/bin/pip3 install msrest msrestazure azure-common azure-mgmt-storage azure-mgmt-compute azure-mgmt-network azure-mgmt-resource azure-mgmt-dns azure-storage && \ - /usr/local/bin/pip3 install pyOpenSSL cheroot xmltodict pymongo ansible==2.7.16 && \ - /usr/local/bin/pip3 install IM==1.9.2 && \ + /usr/local/bin/pip3 install msrest msrestazure azure-common azure-mgmt-storage azure-mgmt-compute azure-mgmt-network azure-mgmt-resource azure-mgmt-dns && \ + /usr/local/bin/pip3 install pyOpenSSL cheroot xmltodict pymongo ansible==2.9.10 && \ + /usr/local/bin/pip3 install IM==1.9.3 && \ /usr/local/bin/pip3 uninstall pip -y && \ apt-get purge -y git python3-pip && \ apt-get autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && rm -rf ~/.cache/ diff --git a/docker/Dockerfile b/docker/Dockerfile index b867a59d8..4774480a4 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,7 +1,7 @@ # Dockerfile to create a container with the IM service FROM ubuntu:18.04 LABEL maintainer="Miguel Caballer " -LABEL version="1.9.2" +LABEL version="1.9.3" LABEL description="Container image to run the IM service. (http://www.grycap.upv.es/im)" EXPOSE 8899 8800 @@ -13,11 +13,9 @@ RUN apt-get update && apt-get install --no-install-recommends -y openssh-client RUN apt-get update && apt-get install --no-install-recommends -y gcc git python python-dev python-pip libmysqld-dev libssl-dev libffi-dev libsqlite3-dev && \ pip install setuptools --upgrade -I && \ pip install pip --upgrade -I && \ - /usr/local/bin/pip install msrest msrestazure azure-common azure-mgmt-storage azure-mgmt-compute azure-mgmt-network azure-mgmt-resource azure-mgmt-dns azure-storage && \ + /usr/local/bin/pip install msrest msrestazure azure-common azure-mgmt-storage azure-mgmt-compute azure-mgmt-network azure-mgmt-resource azure-mgmt-dns && \ /usr/local/bin/pip install MySQL-python pyOpenSSL pycrypto xmltodict pymongo && \ - # Install my version 2.7.0 (as is the last with support for pyton 2.7) - cd /tmp && git clone https://github.com/micafer/libcloud --branch=im_py27 && /usr/local/bin/pip install /tmp/libcloud && \ - /usr/local/bin/pip install IM==1.9.2 && \ + /usr/local/bin/pip install IM==1.9.3 && \ /usr/local/bin/pip uninstall pip -y && \ apt-get purge -y gcc git python-dev python-pip libmysqld-dev libssl-dev libffi-dev libsqlite3-dev && \ apt-get autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && rm -rf ~/.cache/ From 33463a6777e702403e431e7ae2e654e1360601a3 Mon Sep 17 00:00:00 2001 From: micafer Date: Tue, 30 Jun 2020 07:16:44 +0200 Subject: [PATCH 2/4] Fix error with zipp 3.1.0 --- docker-devel/Dockerfile | 1 + docker-py3/Dockerfile | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docker-devel/Dockerfile b/docker-devel/Dockerfile index e69f78fcc..c2927dcb4 100644 --- a/docker-devel/Dockerfile +++ b/docker-devel/Dockerfile @@ -15,6 +15,7 @@ RUN cd tmp \ # Install pip optional libraries RUN pip install MySQL-python pyOpenSSL cheroot==8.1.0 pymongo msrest msrestazure azure-common azure-mgmt-storage azure-mgmt-compute azure-mgmt-network azure-mgmt-resource azure-mgmt-dns +RUN pip install zipp==3.0.0 # Set the VM_NUM_USE_CTXT_DIST to 3 for the tests RUN sed -i -e 's/VM_NUM_USE_CTXT_DIST = 30/VM_NUM_USE_CTXT_DIST = 3/g' /etc/im/im.cfg diff --git a/docker-py3/Dockerfile b/docker-py3/Dockerfile index aa33f8940..ec55c3d0a 100644 --- a/docker-py3/Dockerfile +++ b/docker-py3/Dockerfile @@ -13,8 +13,10 @@ RUN apt-get update && apt-get install --no-install-recommends -y python3 openssh RUN apt-get update && apt-get install --no-install-recommends -y git python3-pip && \ pip3 install pip setuptools --upgrade && \ /usr/local/bin/pip3 install msrest msrestazure azure-common azure-mgmt-storage azure-mgmt-compute azure-mgmt-network azure-mgmt-resource azure-mgmt-dns && \ - /usr/local/bin/pip3 install pyOpenSSL cheroot xmltodict pymongo ansible==2.9.10 && \ + /usr/local/bin/pip3 install pyOpenSSL cheroot xmltodict pymongo ansible==2.9.10&& \ /usr/local/bin/pip3 install IM==1.9.3 && \ + # downgrade to 3.0.0 as 3.1.o fails + /usr/local/bin/pip3 install zipp==3.0.0 && \ /usr/local/bin/pip3 uninstall pip -y && \ apt-get purge -y git python3-pip && \ apt-get autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && rm -rf ~/.cache/ From a4c9e0c2322e27368a76dd5612ed5efbd300ebd0 Mon Sep 17 00:00:00 2001 From: micafer Date: Tue, 30 Jun 2020 08:08:29 +0200 Subject: [PATCH 3/4] Minor fix --- docker-py3/Dockerfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/docker-py3/Dockerfile b/docker-py3/Dockerfile index ec55c3d0a..1c90cf1ea 100644 --- a/docker-py3/Dockerfile +++ b/docker-py3/Dockerfile @@ -15,8 +15,6 @@ RUN apt-get update && apt-get install --no-install-recommends -y git python3-pip /usr/local/bin/pip3 install msrest msrestazure azure-common azure-mgmt-storage azure-mgmt-compute azure-mgmt-network azure-mgmt-resource azure-mgmt-dns && \ /usr/local/bin/pip3 install pyOpenSSL cheroot xmltodict pymongo ansible==2.9.10&& \ /usr/local/bin/pip3 install IM==1.9.3 && \ - # downgrade to 3.0.0 as 3.1.o fails - /usr/local/bin/pip3 install zipp==3.0.0 && \ /usr/local/bin/pip3 uninstall pip -y && \ apt-get purge -y git python3-pip && \ apt-get autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && rm -rf ~/.cache/ From af2dcb8a0ec1dcbd4c4c5d36c0c883231e70e3bb Mon Sep 17 00:00:00 2001 From: micafer Date: Tue, 30 Jun 2020 10:01:45 +0200 Subject: [PATCH 4/4] Improve log mess --- IM/InfrastructureInfo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IM/InfrastructureInfo.py b/IM/InfrastructureInfo.py index 6ec69e01d..fb3e4fabf 100644 --- a/IM/InfrastructureInfo.py +++ b/IM/InfrastructureInfo.py @@ -245,7 +245,7 @@ def destroy(self, auth, force=False): """ Destroy the infrastructure """ - InfrastructureInfo.logger.info("Destroying the Inf ID: " + str(self.id)) + InfrastructureInfo.logger.info("Destroying the Inf ID: %s (force=%s)" % (self.id, force)) try: # First stop ctxt processes self.stop()