From b762fbccd9874241aebe3c2706a2e3acca69e2ed Mon Sep 17 00:00:00 2001 From: Valerij Fredriksen Date: Wed, 25 Mar 2020 21:31:18 +0100 Subject: Revert "fix provisioning race condition" --- .../vespa/hosted/node/admin/task/util/yum/Yum.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'node-admin/src') diff --git a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/yum/Yum.java b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/yum/Yum.java index 5f7fbdd0d69..a4138b215c4 100644 --- a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/yum/Yum.java +++ b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/yum/Yum.java @@ -69,7 +69,7 @@ public class Yum { * * @return false only if the package was already locked and installed at the given version (no-op) */ - public boolean installFixedVersion(TaskContext context, YumPackageName yumPackage, String... repos) { + public boolean installFixedVersion(TaskContext context, YumPackageName yumPackage) { String targetVersionLockName = yumPackage.toVersionLockName(); boolean alreadyLocked = terminal @@ -118,25 +118,25 @@ public class Yum { // - "Nothing to do" // And in case we need to downgrade and return true from converge() - var installCommand = terminal.newCommandLine(context).add("yum", "install"); - for (String repo : repos) installCommand.add("--enablerepo=" + repo); - installCommand.add("--assumeyes", yumPackage.toName()); + CommandLine commandLine = terminal + .newCommandLine(context) + .add("yum", "install", "--assumeyes", yumPackage.toName()); - String output = installCommand.executeSilently().getUntrimmedOutput(); + String output = commandLine.executeSilently().getUntrimmedOutput(); if (NOTHING_TO_DO_PATTERN.matcher(output).find()) { if (CHECKING_FOR_UPDATE_PATTERN.matcher(output).find()) { // case 3. - var upgradeCommand = terminal.newCommandLine(context).add("yum", "downgrade", "--assumeyes"); - for (String repo : repos) upgradeCommand.add("--enablerepo=" + repo); - upgradeCommand.add(yumPackage.toName()).execute(); + terminal.newCommandLine(context) + .add("yum", "downgrade", "--assumeyes", yumPackage.toName()) + .execute(); modified = true; } else { // case 2. } } else { // case 1. - installCommand.recordSilentExecutionAsSystemModification(); + commandLine.recordSilentExecutionAsSystemModification(); modified = true; } -- cgit v1.2.3