1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-09-16 09:06:18 +02:00

Remove mount and user from host cache-key because it can vary by system.

This commit is contained in:
David Steele
2017-06-27 22:27:48 -04:00
parent 7759a94fa2
commit 884413b251
3 changed files with 11 additions and 10 deletions

View File

@@ -29,7 +29,7 @@ use BackRestDoc::Common::DocManifest;
####################################################################################################################################
# User that's building the docs
####################################################################################################################################
use constant DOC_USER => getpwuid($UID) . '';
use constant DOC_USER => getpwuid($UID) eq 'root' ? 'ubuntu' : getpwuid($UID) . '';
####################################################################################################################################
# CONSTRUCTOR
@@ -769,7 +769,6 @@ sub hostKey
my $hCacheKey =
{
name => $self->{oManifest}->variableReplace($oHost->paramGet('name')),
user => $self->{oManifest}->variableReplace($oHost->paramGet('user')),
image => $self->{oManifest}->variableReplace($oHost->paramGet('image')),
};
@@ -783,11 +782,6 @@ sub hostKey
$$hCacheKey{os} = $self->{oManifest}->variableReplace($oHost->paramGet('os'));
}
if (defined($oHost->paramGet('mount', false)))
{
$$hCacheKey{mount} = $self->{oManifest}->variableReplace($oHost->paramGet('mount'));
}
# Return from function and log return values if any
return logDebugReturn
(
@@ -971,8 +965,11 @@ sub sectionChildProcess
executeTest("mkdir -p ~/data/$$hCacheKey{name}/etc");
my $oHost = new pgBackRestTest::Common::HostTest(
$$hCacheKey{name}, "doc-$$hCacheKey{name}", $$hCacheKey{image}, $$hCacheKey{user}, $$hCacheKey{os},
defined($$hCacheKey{mount}) ? [$$hCacheKey{mount}] : undef, $$hCacheKey{option});
$$hCacheKey{name}, "doc-$$hCacheKey{name}", $$hCacheKey{image},
$self->{oManifest}->variableReplace($oChild->paramGet('user')), $$hCacheKey{os},
defined($oChild->paramGet('mount', false)) ?
[$self->{oManifest}->variableReplace($oChild->paramGet('mount'))] : undef,
$$hCacheKey{option});
$self->{host}{$$hCacheKey{name}} = $oHost;
$self->{oManifest}->variableSet("host-$$hCacheKey{name}-ip", $oHost->{strIP}, true);

View File

@@ -235,6 +235,10 @@
<release-item>
<p>Update <proper>CentOS 6</proper> documentation to build on <postgres/> 9.5.</p>
</release-item>
<release-item>
<p>Remove <id>mount</id> and <id>user</id> from host <code>cache-key</code> because it can vary by system.</p>
</release-item>
</release-refactor-list>
</release-doc-list>

View File

@@ -70,7 +70,7 @@
<variable key="host-os" keyword="default">u14</variable>
<variable key="host-os" keyword="co6">co6</variable>
<variable key="host-user" eval="y">use English; getpwuid($UID) . ''</variable>
<variable key="host-user" eval="y">use English; getpwuid($UID) eq 'root' ? 'ubuntu' : getpwuid($UID) . ''</variable>
<variable key="host-mount">{[pgbackrest-base-dir]}:/backrest</variable>
<variable key="image-repo">pgbackrest/test</variable>