From 39d40883a28b946e1cda0f465f30f0b90868b48c Mon Sep 17 00:00:00 2001 From: Carlos Camacho Date: Wed, 14 Sep 2016 11:00:55 +0200 Subject: [PATCH] Fix puppet-lint before upgrading gem Removing 140 chars limit exeeded in favor of upgrading puppet-lint 2016-09-13 21:04:51.478751 | manifests/init.pp:176:WARNING: line has more than 140 characters 2016-09-13 21:04:51.478833 | manifests/mon.pp:141:WARNING: line has more than 140 characters 2016-09-13 21:04:51.478857 | manifests/params.pp:71:WARNING: line has more than 140 characters 2016-09-13 21:04:51.478877 | manifests/repo.pp:125:WARNING: line has more than 140 characters 2016-09-13 21:04:51.478897 | manifests/repo.pp:138:WARNING: line has more than 140 characters 2016-09-13 21:04:51.478917 | manifests/repo.pp:230:WARNING: line has more than 140 characters 2016-09-13 21:04:51.478940 | manifests/rgw/apache_fastcgi.pp:109:WARNING: line has more than 140 characters 2016-09-13 21:04:51.478965 | manifests/rgw/apache_fastcgi.pp:143:WARNING: line has more than 140 characters Change-Id: I090ae328633b00ffc5948285df76eafa2d99f6e6 --- manifests/init.pp | 3 ++- manifests/mon.pp | 3 ++- manifests/params.pp | 3 ++- manifests/repo.pp | 9 ++++++--- manifests/rgw/apache_fastcgi.pp | 10 ++++++++-- spec/defines/ceph_mon_spec.rb | 9 ++++++--- 6 files changed, 26 insertions(+), 11 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index 348b5006..d57e516e 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -173,7 +173,8 @@ class ceph ( include ::ceph::params if $set_osd_params { - warning('set_osd_params is deprecated. It is here to allow a transition to using this module to assign values and will be removed in a future release.') + warning('set_osd_params is deprecated. It is here to allow a transition to using \ +this module to assign values and will be removed in a future release.') } package { $::ceph::params::packages : diff --git a/manifests/mon.pp b/manifests/mon.pp index 6cad7298..a6b57126 100644 --- a/manifests/mon.pp +++ b/manifests/mon.pp @@ -132,7 +132,8 @@ chmod 0444 ${keyring_path} ", unless => "/bin/true # comment to satisfy puppet syntax requirements set -ex -mon_data=\$(ceph-mon ${cluster_option} --id ${id} --show-config-value mon_data) || exit 1 # if ceph-mon fails then the mon is probably not configured yet +mon_data=\$(ceph-mon ${cluster_option} --id ${id} --show-config-value mon_data) || exit 1 +# if ceph-mon fails then the mon is probably not configured yet test -e \$mon_data/done ", } diff --git a/manifests/params.pp b/manifests/params.pp index 381abe21..5bbaf207 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -68,7 +68,8 @@ class ceph::params ( } default: { - fail("Unsupported osfamily: ${::osfamily} operatingsystem: ${::operatingsystem}, module ${module_name} only supports osfamily Debian or RedHat") + fail("Unsupported osfamily: ${::osfamily} operatingsystem: ${::operatingsystem}, \ +module ${module_name} only supports osfamily Debian or RedHat") } } } diff --git a/manifests/repo.pp b/manifests/repo.pp index 51f8602e..04568d78 100644 --- a/manifests/repo.pp +++ b/manifests/repo.pp @@ -122,7 +122,8 @@ class ceph::repo ( # https://wiki.centos.org/SpecialInterestGroup/Storage/ if $enable_sig { if $::operatingsystem != 'CentOS' { - warning("CentOS SIG repository is only supported on CentOS operating system, not on ${::operatingsystem}, which can lead to packaging issues.") + warning("CentOS SIG repository is only supported on CentOS operating system, \ +not on ${::operatingsystem}, which can lead to packaging issues.") } yumrepo { 'ceph-jewel-sig': enabled => '1', @@ -135,7 +136,8 @@ class ceph::repo ( Yumrepo['ceph-jewel-sig'] -> Package<| tag == 'ceph' |> } else { # If you want to deploy Ceph using packages provided by ceph.com repositories. - if ((($::operatingsystem == 'RedHat' or $::operatingsystem == 'CentOS') and (versioncmp($::operatingsystemmajrelease, '7') < 0)) or ($::operatingsystem == 'Fedora' and (versioncmp($::operatingsystemmajrelease, '19') < 0))) { + if ((($::operatingsystem == 'RedHat' or $::operatingsystem == 'CentOS') and (versioncmp($::operatingsystemmajrelease, '7') < 0)) + or ($::operatingsystem == 'Fedora' and (versioncmp($::operatingsystemmajrelease, '19') < 0))) { $el = '6' } else { $el = '7' @@ -227,7 +229,8 @@ class ceph::repo ( } default: { - fail("Unsupported osfamily: ${::osfamily} operatingsystem: ${::operatingsystem}, module ${module_name} only supports osfamily Debian and RedHat") + fail("Unsupported osfamily: ${::osfamily} operatingsystem: ${::operatingsystem}, \ +module ${module_name} only supports osfamily Debian and RedHat") } } } diff --git a/manifests/rgw/apache_fastcgi.pp b/manifests/rgw/apache_fastcgi.pp index 7aa20d22..3c1eed1e 100644 --- a/manifests/rgw/apache_fastcgi.pp +++ b/manifests/rgw/apache_fastcgi.pp @@ -101,12 +101,17 @@ define ceph::rgw::apache_fastcgi ( include ::apache::mod::mime include ::apache::mod::rewrite + #Rewrite rule + #Variable name shrinked in favor of not having + #more than 140 chars per line + $rr = '^/([a-zA-Z0-9-_.]*)([/]?.*) /s3gw.fcgi?page=$1¶ms=$2&%{QUERY_STRING} [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]' + apache::vhost { "${rgw_dns_name}-radosgw": servername => $rgw_dns_name, serveradmin => $admin_email, port => $rgw_port, docroot => $docroot, - rewrite_rule => '^/([a-zA-Z0-9-_.]*)([/]?.*) /s3gw.fcgi?page=$1¶ms=$2&%{QUERY_STRING} [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]', + rewrite_rule => $rr, access_log => $syslog, error_log => $syslog, fastcgi_server => $fcgi_file, @@ -140,7 +145,8 @@ exec /usr/bin/radosgw -c /etc/ceph/ceph.conf -n ${name}", -> Package[$pkg_fastcgi] } default: { - fail("Unsupported osfamily: ${::osfamily} operatingsystem: ${::operatingsystem}, module ${module_name} only supports osfamily Debian and RedHat") + fail("Unsupported osfamily: ${::osfamily} operatingsystem: ${::operatingsystem}, \ +module ${module_name} only supports osfamily Debian and RedHat") } } } diff --git a/spec/defines/ceph_mon_spec.rb b/spec/defines/ceph_mon_spec.rb index b610cc0c..8b431c22 100644 --- a/spec/defines/ceph_mon_spec.rb +++ b/spec/defines/ceph_mon_spec.rb @@ -72,7 +72,8 @@ chmod 0444 /tmp/ceph-mon-keyring-A ', 'unless' => '/bin/true # comment to satisfy puppet syntax requirements set -ex -mon_data=$(ceph-mon --id A --show-config-value mon_data) || exit 1 # if ceph-mon fails then the mon is probably not configured yet +mon_data=$(ceph-mon --id A --show-config-value mon_data) || exit 1 +# if ceph-mon fails then the mon is probably not configured yet test -e $mon_data/done ') } it { is_expected.to contain_exec('ceph-mon-ceph.client.admin.keyring-A').with( @@ -301,7 +302,8 @@ chmod 0444 /tmp/ceph-mon-keyring-A ', 'unless' => '/bin/true # comment to satisfy puppet syntax requirements set -ex -mon_data=$(ceph-mon --id A --show-config-value mon_data) || exit 1 # if ceph-mon fails then the mon is probably not configured yet +mon_data=$(ceph-mon --id A --show-config-value mon_data) || exit 1 +# if ceph-mon fails then the mon is probably not configured yet test -e $mon_data/done ') } it { is_expected.to contain_exec('ceph-mon-ceph.client.admin.keyring-A').with( @@ -529,7 +531,8 @@ chmod 0444 /tmp/ceph-mon-keyring-A ', 'unless' => '/bin/true # comment to satisfy puppet syntax requirements set -ex -mon_data=$(ceph-mon --id A --show-config-value mon_data) || exit 1 # if ceph-mon fails then the mon is probably not configured yet +mon_data=$(ceph-mon --id A --show-config-value mon_data) || exit 1 +# if ceph-mon fails then the mon is probably not configured yet test -e $mon_data/done ') } it { is_expected.to contain_exec('ceph-mon-ceph.client.admin.keyring-A').with(