Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.

Commit a52eeb6

Browse files
committed
Merge pull request #6 from rwf14f/ps-update-fixes
PS Update Fixes
2 parents d088f61 + 9cc68d8 commit a52eeb6

5 files changed

Lines changed: 26 additions & 33 deletions

File tree

manifests/esmond.pp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
$dbname = $::perfsonar::params::esmond_dbname,
44
$dbuser = $::perfsonar::params::esmond_dbuser,
55
$dbpassword = $::perfsonar::params::esmond_dbpass,
6+
$esmondroot = $::perfsonar::params::esmond_root,
7+
$esmondconf = $::perfsonar::params::esmond_conf_path,
68
) inherits perfsonar::params {
79
if $use_db_module {
810
class { 'postgresql::server': }
@@ -25,9 +27,7 @@
2527
order => '002',
2628
before => Exec['run esmond configuration script'],
2729
}
28-
}
29-
else
30-
{
30+
} else {
3131
# the sudo rule is only required if postgresql is configured by the script
3232
file { '/etc/sudoers.d/perfsonar_esmond':
3333
ensure => 'file',

manifests/mesh_config/config.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@
2727
owner => 'root',
2828
group => 'root',
2929
mode => '0440',
30-
content => "Defaults!/opt/perfsonar_ps/mesh_config/bin/generate_configuration !requiretty\n",
30+
content => "Defaults!/usr/lib/perfsonar/bin/generate_configuration !requiretty\n",
3131
}
3232
}

manifests/params.pp

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
'nscd',
8282
'cassandra20',
8383
$modssl_package,
84-
# don't want to install SystemEnvironment because it keeps overwriting my configurations during updates
84+
# don't want to install perfsonar-toolkit-systemenv because it keeps overwriting my configurations during updates
8585
# 'perfsonar-toolkit-systemenv',
8686
# packages that are installed by perfsonar-toolkit-systemenv:
8787
# perfsonar-toolkit-ntp
@@ -93,22 +93,13 @@
9393
# according to /opt/perfsonar_ps/toolkit/lib/perfSONAR_PS/NPToolkit/Services/*.pm, the following services need regular restarts: OWAMP, RegularTesting
9494
# perfsonar-toolkit-sysctl
9595
# configures /etc/sysctl.conf (appends values)
96-
# don't want to install gcc and mysql, it's not required
97-
# 'gcc',
98-
# 'mysql-devel',
99-
# is this for the web100 kernel only ??
100-
# 'kmod-sk98lin',
96+
# unfortunately, with ps 3.5.1.x the main perfsonar-toolkit depends on perfsonar-toolkit-systemenv
97+
# perfsonar-toolkit is also not a meta package, it contains necessary files, so it has to be installed
98+
# the easiest option to avoid the systemenv package is to create dummy rpm with the same name and a higher version number
99+
101100
# are the ones below still required ?
102101
'device-mapper-multipath',
103-
# 'php-gd',
104-
# 'php-xml',
105-
# 'syslinux',
106-
# 'xplot-tcptrace',
107102
]
108-
# other packages in the original kickstart, but left out
109-
# 'perl-DBD-mysql' doesn't exist, it's called perl-DBD-MySQL
110-
# 'xkeyboard-config' do we need it, we don't run X ??
111-
# 'comps-extras' contains images only, do we need it ??
112103

113104
$regular_testing_packages = [
114105
'perfsonar-regulartesting',

manifests/patches.pp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,21 @@
1212
$patchpackage_require = undef
1313
}
1414
case $perfsonar_version {
15-
/^3\.5\.0/: {
15+
/^3\.5\.1/: {
1616
$patches = {
1717
'01_perfsonar_webservice_auth.patch.3.5.0' => {
18-
path => '/opt/perfsonar_ps/toolkit/lib/perfSONAR_PS/NPToolkit/WebService',
18+
path => '/usr/lib/perfsonar/lib/perfSONAR_PS/NPToolkit/WebService',
1919
strip => 1,
20-
# file itself is part of perfsonar-toolkit-library
21-
# which is installed as a dependency of perfsonar-toolkit
22-
# therefore we use the latter as a dependency for the patch
20+
# file itself is part of perfsonar-toolkit-library
21+
# which is installed as a dependency of perfsonar-toolkit
22+
# therefore we use the latter as a dependency for the patch
23+
# need to remove perfsonar-toolkit due to dependency issues in 3.5.1,
24+
# which means the dependency needs updating (to libperfsonar-toolkit-perl)
2325
deps => Package['perfsonar-toolkit'],
2426
checkfile => 'Auth.pm', # relative to path
2527
},
2628
'02_perfsonar_webservice_pageauth.patch.3.5.0' => {
27-
path => '/opt/perfsonar_ps/toolkit/web-ng/root',
29+
path => '/usr/lib/perfsonar/web-ng/root',
2830
strip => 1,
2931
deps => Package['perfsonar-toolkit'],
3032
checkfile => 'index.cgi', # relative to path

templates/configure_esmond.erb

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,25 @@ if [ -z "$(ls -A /var/lib/pgsql/data)" ]; then
1010
sudo -u postgres psql -c "CREATE USER <%= @dbuser %> WITH PASSWORD '<%= @dbpassword %>'"
1111
sudo -u postgres psql -c "CREATE DATABASE <%= @dbname %>"
1212
sudo -u postgres psql -c "GRANT ALL ON DATABASE <%= @dbname %> to <%= @dbuser %>"
13-
cp -f /opt/perfsonar_ps/toolkit/etc/default_service_configs/pg_hba.conf /var/lib/pgsql/data/pg_hba.conf
13+
cp -f /etc/perfsonar/toolkit/default_service_configs/pg_hba.conf /var/lib/pgsql/data/pg_hba.conf
1414
/sbin/service postgresql restart
15-
# sed -i "s/sql_db_name = .*/sql_db_name = esmond/g" /opt/esmond/esmond.conf
16-
# sed -i "s/sql_db_user = .*/sql_db_user = esmond/g" /opt/esmond/esmond.conf
17-
# sed -i "s/sql_db_password = .*/sql_db_password = 7hc4m1/g" /opt/esmond/esmond.conf
15+
# sed -i "s/sql_db_name = .*/sql_db_name = esmond/g" /etc/esmond/esmond.conf
16+
# sed -i "s/sql_db_user = .*/sql_db_user = esmond/g" /etc/esmond/esmond.conf
17+
# sed -i "s/sql_db_password = .*/sql_db_password = 7hc4m1/g" /etc/esmond/esmond.conf
1818
fi
1919

2020
<% end -%>
21-
#disable JMX in cassandra so will start even if /etc/sysconfig/network HOSTNAME does not resolve
21+
#disable JMX in cassandra so it will start even if /etc/sysconfig/network HOSTNAME does not resolve
2222
sed -i '/^JVM_OPTS="\$JVM_OPTS -Dcom.sun.management.jmx/ s/^/#/' /etc/cassandra/conf/cassandra-env.sh
2323

2424
#set esmond env variables
25-
export ESMOND_ROOT=/opt/esmond
26-
export ESMOND_CONF=$ESMOND_ROOT/esmond.conf
25+
export ESMOND_ROOT=<%= @esmondroot %>
26+
export ESMOND_CONF=<%= @esmondconf -%>/esmond.conf
2727
export DJANGO_SETTINGS_MODULE=esmond.settings
2828

2929
#initialize python
30-
cd /opt/esmond
31-
source /opt/rh/python27/enable
30+
cd $ESMOND_ROOT
31+
. /opt/rh/python27/enable
3232
/opt/rh/python27/root/usr/bin/virtualenv --prompt="(esmond)" .
3333
. bin/activate
3434

0 commit comments

Comments
 (0)