From 9abb703a41a48fc16bc8153451b3c403d4522454 Mon Sep 17 00:00:00 2001 From: Khachatur Nazaretyan Date: Fri, 6 Mar 2020 14:13:15 +0100 Subject: [PATCH 1/2] Fix simulator docker db deploy issue (apache#3397) (#3651) Signed-off-by: Khachatur Nazaretyan --- tools/docker/Dockerfile | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/tools/docker/Dockerfile b/tools/docker/Dockerfile index 5c8b5332443..8a0e4097723 100644 --- a/tools/docker/Dockerfile +++ b/tools/docker/Dockerfile @@ -22,6 +22,8 @@ FROM ubuntu:16.04 MAINTAINER "Apache CloudStack" LABEL Vendor="Apache.org" License="ApacheV2" Version="4.13.1.0-SNAPSHOT" +ARG DEBIAN_FRONTEND=noninteractive + RUN apt-get -y update && apt-get install -y \ genisoimage \ libffi-dev \ @@ -37,18 +39,12 @@ RUN apt-get -y update && apt-get install -y \ python-mysql.connector \ supervisor -RUN echo 'mysql-server mysql-server/root_password password root' | debconf-set-selections; \ - echo 'mysql-server mysql-server/root_password_again password root' | debconf-set-selections; - RUN apt-get install -qqy mysql-server && \ apt-get clean all && \ mkdir /var/run/mysqld; \ chown mysql /var/run/mysqld RUN echo '''sql_mode = "STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"''' >> /etc/mysql/mysql.conf.d/mysqld.cnf -RUN (/usr/bin/mysqld_safe &); sleep 5; mysqladmin -u root -proot password '' - -#RUN pip install --allow-external mysql-connector-python mysql-connector-python COPY tools/docker/supervisord.conf /etc/supervisor/conf.d/supervisord.conf COPY . ./root @@ -56,13 +52,16 @@ WORKDIR /root RUN mvn -Pdeveloper -Dsimulator -DskipTests clean install -RUN (/usr/bin/mysqld_safe &); \ +RUN find /var/lib/mysql -type f -exec touch {} \; && \ + (/usr/bin/mysqld_safe &) && \ sleep 5; \ mvn -Pdeveloper -pl developer -Ddeploydb; \ mvn -Pdeveloper -pl developer -Ddeploydb-simulator; \ MARVIN_FILE=`find /root/tools/marvin/dist/ -name "Marvin*.tar.gz"`; \ pip install $MARVIN_FILE +VOLUME /var/lib/mysql + EXPOSE 8080 8096 CMD ["/usr/bin/supervisord"] From 7d0fd9fa3fbed8375a35b8721544be9a5bd05380 Mon Sep 17 00:00:00 2001 From: Wei Zhou Date: Mon, 9 Mar 2020 10:35:56 +0100 Subject: [PATCH 2/2] =?UTF-8?q?vr:=20fix=20password=20server=20run=20with?= =?UTF-8?q?=20empty=20gateway=20in=20isolated=20netw=E2=80=A6=20(#3943)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- systemvm/debian/opt/cloud/bin/cs/CsAddress.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/systemvm/debian/opt/cloud/bin/cs/CsAddress.py b/systemvm/debian/opt/cloud/bin/cs/CsAddress.py index 5b0c0577489..3eca4a78b43 100755 --- a/systemvm/debian/opt/cloud/bin/cs/CsAddress.py +++ b/systemvm/debian/opt/cloud/bin/cs/CsAddress.py @@ -583,9 +583,9 @@ class CsIP: CsPasswdSvc(self.address['public_ip']).stop() elif cmdline.is_master(): if method == "add": - CsPasswdSvc(self.address['gateway'] + "," + self.address['public_ip']).start() + CsPasswdSvc(self.get_gateway() + "," + self.address['public_ip']).start() elif method == "delete": - CsPasswdSvc(self.address['gateway'] + "," + self.address['public_ip']).stop() + CsPasswdSvc(self.get_gateway() + "," + self.address['public_ip']).stop() if self.get_type() == "public" and self.config.is_vpc() and method == "add": if self.address["source_nat"]: