From 168a09dee8dcf43fa6117a7c3d742de7073fda45 Mon Sep 17 00:00:00 2001 From: Robert Frank Date: Fri, 1 Apr 2016 15:46:46 +0100 Subject: [PATCH 1/5] updated version and file locations for patches * tested that 3.5.0 patches still work with 3.5.1 * fixed location of patched files * patches applied on 3.5.1, rather than 3.5.0, as the current module is not compatible with 3.5.0, so no need to be backwards compatible --- manifests/patches.pp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/manifests/patches.pp b/manifests/patches.pp index e1118ae..d930db7 100644 --- a/manifests/patches.pp +++ b/manifests/patches.pp @@ -12,19 +12,21 @@ $patchpackage_require = undef } case $perfsonar_version { - /^3\.5\.0/: { + /^3\.5\.1/: { $patches = { '01_perfsonar_webservice_auth.patch.3.5.0' => { - path => '/opt/perfsonar_ps/toolkit/lib/perfSONAR_PS/NPToolkit/WebService', + path => '/usr/lib/perfsonar/lib/perfSONAR_PS/NPToolkit/WebService', strip => 1, - # file itself is part of perfsonar-toolkit-library - # which is installed as a dependency of perfsonar-toolkit - # therefore we use the latter as a dependency for the patch + # file itself is part of perfsonar-toolkit-library + # which is installed as a dependency of perfsonar-toolkit + # therefore we use the latter as a dependency for the patch + # need to remove perfsonar-toolkit due to dependency issues in 3.5.1, + # which means the dependency needs updating (to libperfsonar-toolkit-perl) deps => Package['perfsonar-toolkit'], checkfile => 'Auth.pm', # relative to path }, '02_perfsonar_webservice_pageauth.patch.3.5.0' => { - path => '/opt/perfsonar_ps/toolkit/web-ng/root', + path => '/usr/lib/perfsonar/web-ng/root', strip => 1, deps => Package['perfsonar-toolkit'], checkfile => 'index.cgi', # relative to path From 674db719c06c4805386c00b0ba8e4a8b74a434c7 Mon Sep 17 00:00:00 2001 From: Robert Frank Date: Tue, 5 Apr 2016 14:26:22 +0100 Subject: [PATCH 2/5] removed old packages and updated comments --- manifests/params.pp | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/manifests/params.pp b/manifests/params.pp index b96785a..0c01515 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -81,7 +81,7 @@ 'nscd', 'cassandra20', $modssl_package, -# don't want to install SystemEnvironment because it keeps overwriting my configurations during updates +# don't want to install perfsonar-toolkit-systemenv because it keeps overwriting my configurations during updates # 'perfsonar-toolkit-systemenv', # packages that are installed by perfsonar-toolkit-systemenv: # perfsonar-toolkit-ntp @@ -93,22 +93,13 @@ # according to /opt/perfsonar_ps/toolkit/lib/perfSONAR_PS/NPToolkit/Services/*.pm, the following services need regular restarts: OWAMP, RegularTesting # perfsonar-toolkit-sysctl # configures /etc/sysctl.conf (appends values) -# don't want to install gcc and mysql, it's not required -# 'gcc', -# 'mysql-devel', -# is this for the web100 kernel only ?? -# 'kmod-sk98lin', +# unfortunately, with ps 3.5.1.x the main perfsonar-toolkit depends on perfsonar-toolkit-systemenv +# perfsonar-toolkit is also not a meta package, it contains necessary files, so it has to be installed +# the easiest option to avoid the systemenv package is to create dummy rpm with the same name and a higher version number + # are the ones below still required ? 'device-mapper-multipath', -# 'php-gd', -# 'php-xml', -# 'syslinux', -# 'xplot-tcptrace', ] - # other packages in the original kickstart, but left out - # 'perl-DBD-mysql' doesn't exist, it's called perl-DBD-MySQL - # 'xkeyboard-config' do we need it, we don't run X ?? - # 'comps-extras' contains images only, do we need it ?? $regular_testing_packages = [ 'perfsonar-regulartesting', From ccea7d7486d0e17e26d3681abcdacbdf8cff151b Mon Sep 17 00:00:00 2001 From: Robert Frank Date: Wed, 6 Apr 2016 09:49:44 +0100 Subject: [PATCH 3/5] fixed issues with esmond introduced in 3.5.1 * fixed paths to esmond locations --- manifests/esmond.pp | 4 +--- templates/configure_esmond.erb | 21 +++++++++++---------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/manifests/esmond.pp b/manifests/esmond.pp index f8206b1..dbce927 100644 --- a/manifests/esmond.pp +++ b/manifests/esmond.pp @@ -25,9 +25,7 @@ order => '002', before => Exec['run esmond configuration script'], } - } - else - { + } else { # the sudo rule is only required if postgresql is configured by the script file { '/etc/sudoers.d/perfsonar_esmond': ensure => 'file', diff --git a/templates/configure_esmond.erb b/templates/configure_esmond.erb index 0c91657..ce65d50 100644 --- a/templates/configure_esmond.erb +++ b/templates/configure_esmond.erb @@ -10,25 +10,26 @@ if [ -z "$(ls -A /var/lib/pgsql/data)" ]; then sudo -u postgres psql -c "CREATE USER <%= @dbuser %> WITH PASSWORD '<%= @dbpassword %>'" sudo -u postgres psql -c "CREATE DATABASE <%= @dbname %>" sudo -u postgres psql -c "GRANT ALL ON DATABASE <%= @dbname %> to <%= @dbuser %>" - cp -f /opt/perfsonar_ps/toolkit/etc/default_service_configs/pg_hba.conf /var/lib/pgsql/data/pg_hba.conf + cp -f /etc/perfsonar/toolkit/default_service_configs/pg_hba.conf /var/lib/pgsql/data/pg_hba.conf /sbin/service postgresql restart -# sed -i "s/sql_db_name = .*/sql_db_name = esmond/g" /opt/esmond/esmond.conf -# sed -i "s/sql_db_user = .*/sql_db_user = esmond/g" /opt/esmond/esmond.conf -# sed -i "s/sql_db_password = .*/sql_db_password = 7hc4m1/g" /opt/esmond/esmond.conf +# sed -i "s/sql_db_name = .*/sql_db_name = esmond/g" /etc/esmond/esmond.conf +# sed -i "s/sql_db_user = .*/sql_db_user = esmond/g" /etc/esmond/esmond.conf +# sed -i "s/sql_db_password = .*/sql_db_password = 7hc4m1/g" /etc/esmond/esmond.conf fi <% end -%> -#disable JMX in cassandra so will start even if /etc/sysconfig/network HOSTNAME does not resolve +#disable JMX in cassandra so it will start even if /etc/sysconfig/network HOSTNAME does not resolve sed -i '/^JVM_OPTS="\$JVM_OPTS -Dcom.sun.management.jmx/ s/^/#/' /etc/cassandra/conf/cassandra-env.sh #set esmond env variables -export ESMOND_ROOT=/opt/esmond -export ESMOND_CONF=$ESMOND_ROOT/esmond.conf -export DJANGO_SETTINGS_MODULE=esmond.settings +#export ESMOND_ROOT=/usr/lib/esmond +#export ESMOND_CONF=/etc/esmond/esmond.conf +#export DJANGO_SETTINGS_MODULE=esmond.settings +. /etc/profile.d/esmond.sh #initialize python -cd /opt/esmond -source /opt/rh/python27/enable +cd $ESMOND_ROOT +. /opt/rh/python27/enable /opt/rh/python27/root/usr/bin/virtualenv --prompt="(esmond)" . . bin/activate From 6b74671733588e04dc48ce9e8e26c2ffe25af060 Mon Sep 17 00:00:00 2001 From: Robert Frank Date: Wed, 6 Apr 2016 09:56:14 +0100 Subject: [PATCH 4/5] fixed issue caused by changed paths in 3.5.1 * updated path to mesh configuration binary in sudoers file --- manifests/mesh_config/config.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/mesh_config/config.pp b/manifests/mesh_config/config.pp index 4943181..ff7cf25 100644 --- a/manifests/mesh_config/config.pp +++ b/manifests/mesh_config/config.pp @@ -27,6 +27,6 @@ owner => 'root', group => 'root', mode => '0440', - content => "Defaults!/opt/perfsonar_ps/mesh_config/bin/generate_configuration !requiretty\n", + content => "Defaults!/usr/lib/perfsonar/bin/generate_configuration !requiretty\n", } } From 9cc68d8e168eda35264a7aa11abbb4f9a1ee3115 Mon Sep 17 00:00:00 2001 From: Robert Frank Date: Wed, 6 Apr 2016 09:58:50 +0100 Subject: [PATCH 5/5] updated the esmond paths in configuration script * updated the esmond paths to use the same puppet variables as the regular testing class --- manifests/esmond.pp | 2 ++ templates/configure_esmond.erb | 7 +++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/manifests/esmond.pp b/manifests/esmond.pp index dbce927..f5d42a1 100644 --- a/manifests/esmond.pp +++ b/manifests/esmond.pp @@ -3,6 +3,8 @@ $dbname = $::perfsonar::params::esmond_dbname, $dbuser = $::perfsonar::params::esmond_dbuser, $dbpassword = $::perfsonar::params::esmond_dbpass, + $esmondroot = $::perfsonar::params::esmond_root, + $esmondconf = $::perfsonar::params::esmond_conf_path, ) inherits perfsonar::params { if $use_db_module { class { 'postgresql::server': } diff --git a/templates/configure_esmond.erb b/templates/configure_esmond.erb index ce65d50..74a831c 100644 --- a/templates/configure_esmond.erb +++ b/templates/configure_esmond.erb @@ -22,10 +22,9 @@ fi sed -i '/^JVM_OPTS="\$JVM_OPTS -Dcom.sun.management.jmx/ s/^/#/' /etc/cassandra/conf/cassandra-env.sh #set esmond env variables -#export ESMOND_ROOT=/usr/lib/esmond -#export ESMOND_CONF=/etc/esmond/esmond.conf -#export DJANGO_SETTINGS_MODULE=esmond.settings -. /etc/profile.d/esmond.sh +export ESMOND_ROOT=<%= @esmondroot %> +export ESMOND_CONF=<%= @esmondconf -%>/esmond.conf +export DJANGO_SETTINGS_MODULE=esmond.settings #initialize python cd $ESMOND_ROOT