summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/OpenSLX/Syscall.pm34
-rw-r--r--os-plugins/plugins/syslog/OpenSLX/Distro/Base.pm15
-rw-r--r--os-plugins/plugins/syslog/OpenSLX/OSPlugin/syslog.pm37
-rw-r--r--os-plugins/plugins/vmgrid/files/vmgrid6
4 files changed, 67 insertions, 25 deletions
diff --git a/lib/OpenSLX/Syscall.pm b/lib/OpenSLX/Syscall.pm
index 172db4d0..da72ae3d 100644
--- a/lib/OpenSLX/Syscall.pm
+++ b/lib/OpenSLX/Syscall.pm
@@ -73,23 +73,25 @@ sub _loadPerlHeader
# any of these).
# If they are missing, we just have a go at creating all of them:
mkpath($phLibDir) unless -e $phLibDir;
- if (-l "/usr/include/asm" && !-e "$phLibDir/asm") {
- my $asmFolder = readlink("/usr/include/asm");
- slxsystem("cd /usr/include && h2ph -rQ -d $phLibDir $asmFolder") == 0
- or die _tr('unable to create Perl-header from "asm" folder! (%s)', $!);
- slxsystem("mv $phLibDir/$asmFolder $phLibDir/asm") == 0
- or die _tr('unable to cleanup "asm" folder for Perl headers! (%s)', $!);
- }
- elsif (-d "/usr/include/asm") {
- slxsystem("cd /usr/include && h2ph -rQ -d $phLibDir asm") == 0
- or die _tr('unable to create Perl-header from "asm" folder! (%s)', $!);
- }
- else {
- die _tr(
- 'the folder "/usr/include/asm" is required - please install kernel headers!'
- );
+ if (!-e "$phLibDir/asm") {
+ if (-l "/usr/include/asm") {
+ my $asmFolder = readlink("/usr/include/asm");
+ slxsystem("cd /usr/include && h2ph -rQ -d $phLibDir $asmFolder") == 0
+ or die _tr('unable to create Perl-header from "asm" folder! (%s)', $!);
+ slxsystem("mv $phLibDir/$asmFolder $phLibDir/asm") == 0
+ or die _tr('unable to cleanup "asm" folder for Perl headers! (%s)', $!);
+ }
+ elsif (-d "/usr/include/asm") {
+ slxsystem("cd /usr/include && h2ph -rQ -d $phLibDir asm") == 0
+ or die _tr('unable to create Perl-header from "asm" folder! (%s)', $!);
+ }
+ else {
+ die _tr(
+ 'the folder "/usr/include/asm" is required - please install kernel headers!'
+ );
+ }
}
- if (-e "usr/include/asm-generic" && !-e "$phLibDir/asm-generic") {
+ if (-e "/usr/include/asm-generic" && !-e "$phLibDir/asm-generic") {
slxsystem("cd /usr/include && h2ph -rQ -d $phLibDir asm-generic") == 0
or die _tr('unable to create Perl-header from "asm-generic" folder! (%s)', $!);
}
diff --git a/os-plugins/plugins/syslog/OpenSLX/Distro/Base.pm b/os-plugins/plugins/syslog/OpenSLX/Distro/Base.pm
index 25be964c..654d755e 100644
--- a/os-plugins/plugins/syslog/OpenSLX/Distro/Base.pm
+++ b/os-plugins/plugins/syslog/OpenSLX/Distro/Base.pm
@@ -53,6 +53,7 @@ sub runlevelInfo
my %nameMap = (
'syslogd' => 'sysklogd',
'syslog-ng' => 'syslog-ng',
+ 'rsyslog' => 'rsyslog',
);
my $rlInfo = {
scriptName => $nameMap{$kind},
@@ -71,6 +72,20 @@ sub getPackageName
my %nameMap = (
'syslogd' => 'sysklogd',
'syslog-ng' => 'syslog-ng',
+ 'rsyslog' => 'rsyslog',
+ );
+ return $nameMap{$name};
+}
+
+sub getBinaryName
+{
+ my $self = shift;
+ my $name = shift;
+
+ my %nameMap = (
+ 'syslogd' => 'sysklogd',
+ 'syslog-ng' => 'syslog-ng',
+ 'rsyslog' => 'rsyslogd',
);
return $nameMap{$name};
}
diff --git a/os-plugins/plugins/syslog/OpenSLX/OSPlugin/syslog.pm b/os-plugins/plugins/syslog/OpenSLX/OSPlugin/syslog.pm
index e3935fc7..2952f2e7 100644
--- a/os-plugins/plugins/syslog/OpenSLX/OSPlugin/syslog.pm
+++ b/os-plugins/plugins/syslog/OpenSLX/OSPlugin/syslog.pm
@@ -68,9 +68,9 @@ sub getAttrInfo
description => unshiftHereDoc(<<' End-of-Here'),
kind of syslog to use \(syslogd-ng or old-style syslog\)
End-of-Here
- content_regex => qr{^(syslog-ng|syslog)$},
- content_descr => 'allowed: syslogd-ng, syslog',
- default => 'syslog-ng',
+ content_regex => qr{^(syslog-ng|syslogd|rsyslog)$},
+ content_descr => 'allowed: syslog-ng, syslogd, rsyslog',
+ default => 'rsyslog',
},
'syslog::host' => {
applies_to_systems => 1,
@@ -126,19 +126,27 @@ sub installationPhase
my $engine = $self->{'os-plugin-engine'};
- if ($self->{kind} eq 'syslog-ng' && !isInPath('syslog-ng')) {
+ if ($self->{kind} eq 'rsyslog' && !isInPath($self->{distro}->getBinaryName('rsyslog'))) {
$engine->installPackages($self->{distro}->getPackageName('syslog-ng'));
}
+
+ if ($self->{kind} eq 'syslog-ng' && !isInPath('syslog-ng')) {
+ $engine->installPackages($self->{distro}->getPackageName($self->{distro}->getBinaryName('syslog-ng')));
+ }
+
# not sure if we ever should setup this service
- if ($self->{kind} eq 'syslogd' && !isInPath('syslog')) {
+ if ($self->{kind} eq 'syslogd' && !isInPath($self->{distro}->getBinaryName('syslogd'))) {
$engine->installPackages($self->{distro}->getPackageName('syslogd'));
}
if (!$self->{kind}) {
- if (qx{which syslog-ng}) {
+ if (qx{which $self->{distro}->getBinaryName('rsyslog')}) {
+ $self->{kind} = 'rsyslog';
+ }
+ elsif (qx{which $self->{distro}->getBinaryName('syslog-ng')}) {
$self->{kind} = 'syslog-ng';
}
- elsif (qx{which syslogd}) {
+ elsif (qx{which $self->{distro}->getBinaryName('syslogd')}) {
$self->{kind} = 'syslogd';
}
else {
@@ -150,7 +158,10 @@ sub installationPhase
}
# start to actually do something - according to current stage1 attributes
- if ($self->{kind} eq 'syslog-ng') {
+ if ($self->{kind} eq 'rsyslog') {
+ $self->_setupRsyslog($self->{attrs});
+ }
+ elsif ($self->{kind} eq 'syslog-ng') {
$self->_setupSyslogNG($self->{attrs});
}
elsif ($self->{kind} eq 'syslogd') {
@@ -158,7 +169,7 @@ sub installationPhase
}
else {
die _tr(
- 'unknown kind "%s" given, only "syslog-ng" and "syslogd" are supported!',
+ 'unknown kind "%s" given, only "rsyslog", "syslog-ng" and "syslogd" are supported!',
$self->{kind}
);
}
@@ -174,6 +185,14 @@ sub removalPhase
return;
}
+sub _setupRsyslog
+{
+ my $self = shift;
+ my $attrs = shift;
+
+ return;
+}
+
sub _setupSyslogNG
{
my $self = shift;
diff --git a/os-plugins/plugins/vmgrid/files/vmgrid b/os-plugins/plugins/vmgrid/files/vmgrid
index 77efe4e0..3b6713b8 100644
--- a/os-plugins/plugins/vmgrid/files/vmgrid
+++ b/os-plugins/plugins/vmgrid/files/vmgrid
@@ -79,6 +79,12 @@ if [ -z "${hostratio}" ]; then
exit 1
fi
+if [ -z "${hostratio}" ]; then
+ writelog "There has been an error in the memory configuration in stage 3"
+ writelog "Please check your memory ratio settings, exiting!"
+ exit 1
+fi
+
# remove blanks
vmgrid_startvms=$(echo ${vmgrid_startvms} | sed -e "s, *,,g")
vmgrid_memratio=$(echo ${vmgrid_memratio} | sed -e "s, *,,g")