From 634d25d547d7e0e286ab675e215ae9cc1de079bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Otto=20Kek=C3=A4l=C3=A4inen?= Date: Tue, 16 Apr 2019 11:05:50 +0300 Subject: [PATCH] Enable automatic restarts from maint scripts in gitlab-ci.yml By default the policy-rc.d exits with code 101 and prevents from services inside Docker to start with the rationale that it is not needed as the services will not run by default when a Docker container is started anyway, but we want the mysql/mariadb service to run so that we can simulate real install/upgrade scenarios. --- debian/gitlab-ci.yml | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/debian/gitlab-ci.yml b/debian/gitlab-ci.yml index ef539623e..f86d36d9f 100644 --- a/debian/gitlab-ci.yml +++ b/debian/gitlab-ci.yml @@ -62,6 +62,7 @@ fresh install: paths: - ${WORKING_DIR}/debug script: + - sed -i "s/101/0/g" -i /usr/sbin/policy-rc.d # Enable automatic restarts from maint scripts - cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output - apt-get update # Install MariaDB built in this commit @@ -69,8 +70,7 @@ fresh install: # Verify installation of MariaDB built in this commit - dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed - mariadb --version # Client version - - service mysql restart || true # Always proceed even if init failed - - service mysql status || true + - service mysql status - mkdir -p debug # Ensure dir exists before using it - find /var/lib/mysql -ls > debug/var-lib-mysql.list - cp -ra /etc/mysql debug/etc-mysql @@ -92,6 +92,7 @@ test basic features: paths: - ${WORKING_DIR}/debug script: + - sed -i "s/101/0/g" -i /usr/sbin/policy-rc.d # Enable automatic restarts from maint scripts - cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output - apt-get update # Install MariaDB built in this commit @@ -99,8 +100,7 @@ test basic features: # Verify installation of MariaDB built in this commit - dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed - mariadb --version # Client version - - service mysql restart || true # Always proceed even if init failed - - service mysql status || true + - service mysql status - mkdir -p debug # Ensure dir exists before using it - find /var/lib/mysql -ls > debug/var-lib-mysql.list - cp -ra /etc/mysql debug/etc-mysql @@ -181,14 +181,14 @@ mariadb-10.1.x to mariadb-10.1.y upgrade: paths: - ${WORKING_DIR}/debug script: + - sed -i "s/101/0/g" -i /usr/sbin/policy-rc.d # Enable automatic restarts from maint scripts - cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output - apt-get update # Install almost everything currently in Debian Stretch - apt-get install -y 'default-mysql*' 'mariadb-*' 'libmariadbd*' 'libmariadbclient*' # Verify installation of MariaDB currently in Debian Stretch - dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed - - service mysql status || true # Always proceed even if init failed - - service mysql restart || true + - service mysql status - mariadb --skip-column-names -e "select @@version, @@version_comment" - echo 'SHOW DATABASES;' | mysql # Install MariaDB built in this commit @@ -196,8 +196,7 @@ mariadb-10.1.x to mariadb-10.1.y upgrade: # Verify installation of MariaDB built in this commit - dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed - mariadb --version # Client version - - service mysql restart || true # Always proceed even if init failed - - service mysql status || true + - service mysql status - mkdir -p debug # Ensure dir exists before using it - find /var/lib/mysql -ls > debug/var-lib-mysql.list - cp -ra /etc/mysql debug/etc-mysql @@ -219,14 +218,14 @@ mariadb-10.0 to mariadb-10.1 upgrade: paths: - ${WORKING_DIR}/debug script: + - sed -i "s/101/0/g" -i /usr/sbin/policy-rc.d # Enable automatic restarts from maint scripts - cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output - apt-get update # Install almost everything currently in Debian Jessie - apt-get install -y 'mariadb-*' 'libmariadb*' # Verify installation of MariaDB from Jessie - dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed - - service mysql status || true # Always proceed even if init failed - - service mysql restart || true + - service mysql status - mysql --skip-column-names -e "select @@version, @@version_comment" - echo 'SHOW DATABASES;' | mysql # Install MariaDB built in this commit @@ -236,8 +235,7 @@ mariadb-10.0 to mariadb-10.1 upgrade: # Verify installation of MariaDB built in this commit - dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed - mariadb --version # Client version - - service mysql restart || true # Always proceed even if init failed - - service mysql status || true + - service mysql status - mkdir -p debug # Ensure dir exists before using it - find /var/lib/mysql -ls > debug/var-lib-mysql.list - cp -ra /etc/mysql debug/etc-mysql @@ -259,13 +257,13 @@ mysql-5.5 to mariadb-10.1 upgrade: paths: - ${WORKING_DIR}/debug script: + - sed -i "s/101/0/g" -i /usr/sbin/policy-rc.d # Enable automatic restarts from maint scripts - cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output - apt-get update - apt-get install -y mysql-server # Verify installation of MySQL from Jessie - dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed - - service mysql status || true # Always proceed even if init failed - - service mysql restart || true + - service mysql status - mysql --skip-column-names -e "select @@version, @@version_comment" - echo 'SHOW DATABASES;' | mysql # Install MariaDB built in this commit @@ -275,8 +273,7 @@ mysql-5.5 to mariadb-10.1 upgrade: # Verify installation of MariaDB built in this commit - dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed - mariadb --version # Client version - - service mysql restart || true # Always proceed even if init failed - - service mysql status || true + - service mysql status - mkdir -p debug # Ensure dir exists before using it - find /var/lib/mysql -ls > debug/var-lib-mysql.list - cp -ra /etc/mysql debug/etc-mysql -- GitLab