Skip to content

Commit

Permalink
Revert removal of Ubuntu 12.04 and PostgreSQL 8.3.
Browse files Browse the repository at this point in the history
  • Loading branch information
dwsteele committed Jun 27, 2017
1 parent 001cff9 commit fdabf33
Show file tree
Hide file tree
Showing 11 changed files with 68 additions and 62 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -17,7 +17,7 @@ env:
- PGB_CI="--vm=co6 test"
- PGB_CI="--vm=u16 test"
- PGB_CI="--vm=co7 test"
- PGB_CI="--vm=u14 test"
- PGB_CI="--vm=u12 test"
- PGB_CI="doc"

before_install:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -76,9 +76,9 @@ File and directory links are supported for any file or directory in the PostgreS

pgBackRest repositories can be stored on Amazon S3 to allow for virtually unlimited capacity and retention.

### Compatibility with PostgreSQL >= 8.4
### Compatibility with PostgreSQL >= 8.3

pgBackRest includes support for versions down to 8.4, since older versions of PostgreSQL are still regularly utilized.
pgBackRest includes support for versions down to 8.3, since older versions of PostgreSQL are still regularly utilized.

## Getting Started

Expand Down
4 changes: 2 additions & 2 deletions doc/xml/index.xml
Expand Up @@ -131,9 +131,9 @@
</section>

<section id="postgres-compatibility">
<title>Compatibility with <postgres/> >= 8.4</title>
<title>Compatibility with <postgres/> >= 8.3</title>

<p><backrest/> includes support for versions down to 8.4, since older versions of PostgreSQL are still regularly utilized.</p>
<p><backrest/> includes support for versions down to 8.3, since older versions of PostgreSQL are still regularly utilized.</p>
</section>
</section>

Expand Down
12 changes: 1 addition & 11 deletions doc/xml/release.xml
Expand Up @@ -165,8 +165,6 @@
<release-list>
<release date="XXXX-XX-XX" version="1.20dev" title="UNDER DEVELOPMENT">
<release-core-list>
<p><b>IMPORTANT NOTE</b>: Support for <postgres/> 8.3 has been removed in this release as no currently supported systems include it.</p>

<release-bug-list>
<release-item>
<release-item-contributor-list>
Expand Down Expand Up @@ -204,10 +202,6 @@
<p>Rename <code>Archive</code> modules to remove redundancy.</p>
</release-item>

<release-item>
<p>Remove support for <postgres/> 8.3.</p>
</release-item>

<release-item>
<p>Improve <proper>S3</proper> error reporting.</p>
</release-item>
Expand Down Expand Up @@ -279,11 +273,7 @@
</release-item>

<release-item>
<p>Deprecate <proper>Ubuntu 12.04</proper> now that it is EOL.</p>
</release-item>

<release-item>
<p>Remove <proper>Debian 8</proper> from CI because it does not provide additional coverage over <proper>Ubuntu 14.04</proper> and <proper>Ubuntu 16.04</proper>.</p>
<p>Remove <proper>Debian 8</proper> from CI because it does not provide additional coverage over <proper>Ubuntu 12.04, 14.04, 16.04</proper>.</p>
</release-item>

<release-item>
Expand Down
1 change: 1 addition & 0 deletions lib/pgBackRest/Archive/Common.pm
Expand Up @@ -48,6 +48,7 @@ use constant PG_WAL_SEGMENT_SIZE => 16777216;
####################################################################################################################################
my $oWalMagicHash =
{
hex('0xD062') => PG_VERSION_83,
hex('0xD063') => PG_VERSION_84,
hex('0xD064') => PG_VERSION_90,
hex('0xD066') => PG_VERSION_91,
Expand Down
1 change: 1 addition & 0 deletions lib/pgBackRest/Db.pm
Expand Up @@ -41,6 +41,7 @@ use constant DB_BACKUP_ADVISORY_LOCK => '12340078
my $oPgControlVersionHash =
{
# iControlVersion => {iCatalogVersion => strDbVersion}
833 => {200711281 => PG_VERSION_83},
843 => {200904091 => PG_VERSION_84},
903 =>
{
Expand Down
6 changes: 4 additions & 2 deletions lib/pgBackRest/DbVersion.pm
Expand Up @@ -27,6 +27,8 @@ use constant PG_WAL_SIZE => 16777216;
####################################################################################################################################
# PostgreSQL version numbers
####################################################################################################################################
use constant PG_VERSION_83 => '8.3';
push @EXPORT, qw(PG_VERSION_83);
use constant PG_VERSION_84 => '8.4';
push @EXPORT, qw(PG_VERSION_84);
use constant PG_VERSION_90 => '9.0';
Expand Down Expand Up @@ -61,8 +63,8 @@ sub versionSupport
# Assign function parameters, defaults, and log debug info
my ($strOperation) = logDebugParam(__PACKAGE__ . '->versionSupport');

my @strySupportVersion = (
PG_VERSION_84, PG_VERSION_90, PG_VERSION_91, PG_VERSION_92, PG_VERSION_93, PG_VERSION_94, PG_VERSION_95, PG_VERSION_96);
my @strySupportVersion = (PG_VERSION_83, PG_VERSION_84, PG_VERSION_90, PG_VERSION_91, PG_VERSION_92, PG_VERSION_93,
PG_VERSION_94, PG_VERSION_95, PG_VERSION_96);

# Return from function and log return values if any
return logDebugReturn
Expand Down
4 changes: 2 additions & 2 deletions test/lib/pgBackRestTest/Common/ContainerTest.pm
Expand Up @@ -481,7 +481,7 @@ sub containerBuild
}

#---------------------------------------------------------------------------------------------------------------------------
if (!$bDeprecated && $strOS ne VM_CO6)
if (!$bDeprecated && $strOS ne VM_CO6 && $strOS ne VM_U12)
{
$strScript .= s3ServerSetup($strOS);
}
Expand Down Expand Up @@ -566,7 +566,7 @@ sub containerBuild
$strImage = "${strOS}-s3-server";
$strCopy = undef;

if ($strOS ne VM_CO6)
if ($strOS ne VM_CO6 && $strOS ne VM_U12)
{
$strImageParent = containerRepo() . ":${strOS}-base";
$strScript = '';
Expand Down
15 changes: 10 additions & 5 deletions test/lib/pgBackRestTest/Common/VmTest.pm
Expand Up @@ -82,7 +82,7 @@ use constant VM_HOST_DEFAULT => VM_U16;
push @EXPORT, qw(VM_HOST_DEFAULT);

# Lists valid VMs
use constant VM_LIST => (VM_CO6, VM_U16, VM_CO7, VM_U14);
use constant VM_LIST => (VM_CO6, VM_U16, VM_CO7, VM_U12);
push @EXPORT, qw(VM_LIST);

my $oyVm =
Expand Down Expand Up @@ -138,16 +138,22 @@ my $oyVm =
&VMDEF_PERL_ARCH_PATH => '/usr/local/lib/x86_64-linux-gnu/perl/5.20.2',
},

# Ubuntu 12.04 (DEPRECATED)
# Ubuntu 12.04
&VM_U12 =>
{
&VM_DEPRECATED => true,
&VM_OS_BASE => VM_OS_BASE_DEBIAN,
&VM_OS => VM_OS_UBUNTU,
&VM_OS_REPO => 'precise',
&VM_IMAGE => 'ubuntu:12.04',
&VMDEF_PGSQL_BIN => '/usr/lib/postgresql/{[version]}/bin',
&VMDEF_PERL_ARCH_PATH => '/usr/local/lib/perl/5.14.2',

&VM_DB =>
[
PG_VERSION_83,
PG_VERSION_84,
PG_VERSION_92,
],
},

# Ubuntu 14.04
Expand All @@ -162,7 +168,6 @@ my $oyVm =

&VM_DB =>
[
PG_VERSION_84,
PG_VERSION_94,
],
},
Expand All @@ -179,8 +184,8 @@ my $oyVm =

&VM_DB =>
[
PG_VERSION_92,
PG_VERSION_93,
PG_VERSION_94,
],
},
};
Expand Down
81 changes: 44 additions & 37 deletions test/lib/pgBackRestTest/Module/Storage/StorageS3CertTest.pm
Expand Up @@ -51,52 +51,59 @@ sub run
################################################################################################################################
if ($self->begin('validation'))
{
#---------------------------------------------------------------------------------------------------------------------------
if ($self->vm() eq VM_CO7)
if ($self->vm eq VM_U12)
{
# Tests fails on co7 because by default certs cannot be located. This logic may need to be changed in the future if
# this bug gets fixed by Red Hat.
$self->testResult(sub {$self->configLoadExpect(dclone($oOptionGlobal), CMD_ARCHIVE_PUSH)}, '', 'config load');
&log(INFO, 'cannot test - certificates are no longer maintained for ' . $self->vm());
}
else
{
#-----------------------------------------------------------------------------------------------------------------------
if ($self->vm() eq VM_CO7)
{
# Tests fails on co7 because by default certs cannot be located. This logic may need to be changed in the future if
# this bug gets fixed by Red Hat.
$self->testResult(sub {$self->configLoadExpect(dclone($oOptionGlobal), CMD_ARCHIVE_PUSH)}, '', 'config load');

$self->testException(
sub {storageRepo({strStanza => 'test1'})->list('/')}, ERROR_HOST_CONNECT,
'IO::Socket::IP configuration failed SSL connect attempt failed.*certificate verify failed',
'cert verify fails on ' . VM_CO7);

# It should work when verification is disabled
my $oOptionLocal = dclone($oOptionGlobal);
$self->optionBoolSetTest($oOptionLocal, OPTION_REPO_S3_VERIFY_SSL, false);
$self->testResult(sub {$self->configLoadExpect($oOptionLocal, CMD_ARCHIVE_PUSH)}, '', 'config load');

$self->testException(
sub {storageRepo({strStanza => 'test2'})->list('/')}, ERROR_PROTOCOL, 'S3 request error \[403\] Forbidden.*',
'connection succeeds with verification disabled, (expected) error on invalid access key');
}

#-----------------------------------------------------------------------------------------------------------------------
my $oOptionLocal = dclone($oOptionGlobal);

$self->testException(
sub {storageRepo({strStanza => 'test1'})->list('/')}, ERROR_HOST_CONNECT,
'IO::Socket::IP configuration failed SSL connect attempt failed.*certificate verify failed',
'cert verify fails on ' . VM_CO7);
# CO7 doesn't locate certs automatically so specify the path
if ($self->vm() eq VM_CO7)
{
$self->optionSetTest($oOptionLocal, OPTION_REPO_S3_CA_FILE, '/etc/pki/tls/certs/ca-bundle.crt');
}

# It should work when verification is disabled
my $oOptionLocal = dclone($oOptionGlobal);
$self->optionBoolSetTest($oOptionLocal, OPTION_REPO_S3_VERIFY_SSL, false);
$self->testResult(sub {$self->configLoadExpect($oOptionLocal, CMD_ARCHIVE_PUSH)}, '', 'config load');

$self->testException(
sub {storageRepo({strStanza => 'test2'})->list('/')}, ERROR_PROTOCOL, 'S3 request error \[403\] Forbidden.*',
'connection succeeds with verification disabled, (expected) error on invalid access key');
}
sub {storageRepo({strStanza => 'test3'})->list('/')}, ERROR_PROTOCOL, 'S3 request error \[403\] Forbidden.*',
'connection succeeds, (expected) error on invalid access key');

#---------------------------------------------------------------------------------------------------------------------------
my $oOptionLocal = dclone($oOptionGlobal);
#-----------------------------------------------------------------------------------------------------------------------
$oOptionLocal = dclone($oOptionGlobal);
$self->optionSetTest($oOptionLocal, OPTION_REPO_S3_CA_PATH, '/bogus');
$self->testResult(sub {$self->configLoadExpect($oOptionLocal, CMD_ARCHIVE_PUSH)}, '', 'config load');

# CO7 doesn't locate certs automatically so specify the path
if ($self->vm() eq VM_CO7)
{
$self->optionSetTest($oOptionLocal, OPTION_REPO_S3_CA_FILE, '/etc/pki/tls/certs/ca-bundle.crt');
$self->testException(
sub {storageRepo({strStanza => 'test4'})->list('/')}, ERROR_HOST_CONNECT,
$self->vm() eq VM_CO6 ? 'IO::Socket::INET configuration failed' : 'SSL_ca_path /bogus does not exist',
'invalid ca path');
}

$self->testResult(sub {$self->configLoadExpect($oOptionLocal, CMD_ARCHIVE_PUSH)}, '', 'config load');

$self->testException(
sub {storageRepo({strStanza => 'test3'})->list('/')}, ERROR_PROTOCOL, 'S3 request error \[403\] Forbidden.*',
'connection succeeds, (expected) error on invalid access key');

#---------------------------------------------------------------------------------------------------------------------------
$oOptionLocal = dclone($oOptionGlobal);
$self->optionSetTest($oOptionLocal, OPTION_REPO_S3_CA_PATH, '/bogus');
$self->testResult(sub {$self->configLoadExpect($oOptionLocal, CMD_ARCHIVE_PUSH)}, '', 'config load');

$self->testException(
sub {storageRepo({strStanza => 'test4'})->list('/')}, ERROR_HOST_CONNECT,
$self->vm() eq VM_CO6 ? 'IO::Socket::INET configuration failed' : 'SSL_ca_path /bogus does not exist',
'invalid ca path');
}
}

Expand Down
Binary file not shown.

0 comments on commit fdabf33

Please sign in to comment.