aboutsummaryrefslogtreecommitdiffstats
path: root/node-admin/src
diff options
context:
space:
mode:
authorValerij Fredriksen <freva@users.noreply.github.com>2020-03-25 21:31:18 +0100
committerGitHub <noreply@github.com>2020-03-25 21:31:18 +0100
commitb762fbccd9874241aebe3c2706a2e3acca69e2ed (patch)
tree994e47048817d0660a4ae1cb6bea9a5daaae1382 /node-admin/src
parent6c8b5de0963a90767c3752c032364a0ec48df7a2 (diff)
Revert "fix provisioning race condition"
Diffstat (limited to 'node-admin/src')
-rw-r--r--node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/yum/Yum.java18
1 files changed, 9 insertions, 9 deletions
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;
}