From eaace5db906223721c5481b7896cb668453b6845 Mon Sep 17 00:00:00 2001 From: Robbie Zhang Date: Tue, 25 Oct 2016 15:55:04 -0700 Subject: [PATCH] Do Not Install the MySQL2 Gem in the OMSAgent Installation --- build/buildRuby.sh | 3 --- installer/bundle/bundle_skel.sh | 12 ------------ installer/datafiles/base_omsagent.data | 12 ------------ 3 files changed, 27 deletions(-) diff --git a/build/buildRuby.sh b/build/buildRuby.sh index c0af90ca1..63fb14903 100755 --- a/build/buildRuby.sh +++ b/build/buildRuby.sh @@ -241,9 +241,6 @@ if [ $RUNNING_FOR_TEST -eq 0 ]; then # Pacify Make (Make doesn't know that the generated Ruby directory can vary) mkdir -p ${BASE_DIR}/intermediate/${BUILD_CONFIGURATION}/ruby -else - echo "Installing MySQL gem into Test Ruby under: ${RUBY_DESTDIR} ..." - elevate ${RUBY_DESTDIR}/bin/gem install mysql2 fi exit 0 diff --git a/installer/bundle/bundle_skel.sh b/installer/bundle/bundle_skel.sh index ade6f4fb0..5ec1da8ed 100644 --- a/installer/bundle/bundle_skel.sh +++ b/installer/bundle/bundle_skel.sh @@ -841,18 +841,6 @@ case "$installMode" in echo "----- No base kits to update -----" fi - # These steps are required to fix mysql2 gem compatibility issue on latest Ubuntu distros and can be removed after any release >2016_v1.2.0-75 - if ${OMS_RUBY_DIR}/gem list | grep -q "mysql2" ; then - # Cleans up static mysql2 ruby gem if it exists in omsagent ruby path - echo "Removing MySQL2 ruby gem." - ${OMS_RUBY_DIR}/gem uninstall mysql2 2>/dev/null - fi - echo "----- Installing MySQL2 ruby gem -----" - if ! ${OMS_RUBY_DIR}/gem install mysql2; then - echo "MySQL2 ruby gem was not installed. MySQL ruby fluentd plugin would be disabled." - echo "Fix the dependencies and run '${OMS_RUBY_DIR}/ruby/bin/gem install mysql2' after omsagent installation to enable MySQL plugin." - fi - if [ $KIT_STATUS -eq 0 ]; then # These conditionals exist due to some upgrade bugs in the postuninstall scripts of previous kits. These can be removed after GA. if [ -d /opt/microsoft/omsconfig ]; then diff --git a/installer/datafiles/base_omsagent.data b/installer/datafiles/base_omsagent.data index bdd0f5f2d..eb83c120e 100644 --- a/installer/datafiles/base_omsagent.data +++ b/installer/datafiles/base_omsagent.data @@ -182,18 +182,6 @@ fi # The real conf directory has to be owned by omsagent to be readable by the omsagent daemon chown -R omsagent:omsagent ${{CONF_DIR}} -# Should run before onboarding script(Postinstall_300) and enabling OMS service(%Postinstall_500) -%Postinstall_290 -if ${{OMSHOME}}/ruby/bin/gem list | grep -q "mysql2" ; then - echo "Skipping MySQL2 ruby gem installation since it is already installed." -else - echo "----- Installing MySQL ruby gem -----" - if ! ${{OMSHOME}}/ruby/bin/gem install mysql2; then - echo "MySQL2 ruby gem was not installed. MySQL ruby plugin would be disabled." - echo "Fix the dependencies and run '${OMS_RUBY_DIR}/ruby/bin/gem install mysql2' after omsagent installation to enable MySQL plugin." - fi -fi - %Postinstall_300 if [ -f /etc/omsagent-onboard.conf ]; then /opt/microsoft/omsagent/bin/omsadmin.sh