Fix previous commit, log node names as well
Change-Id: I10c3deae364960d28316c6805fe2f499d72c675a
This commit is contained in:
parent
86a473a7d3
commit
4e4d8e11e8
@ -206,8 +206,7 @@ public class NebulousAppDeployer {
|
||||
* Add affinities trait to all components, except for those with a replica
|
||||
* count of 0.
|
||||
*
|
||||
* <pre>
|
||||
* {@code
|
||||
* <pre>{@code
|
||||
* traits:
|
||||
* - type: affinity
|
||||
* properties:
|
||||
@ -356,9 +355,9 @@ public class NebulousAppDeployer {
|
||||
String componentName = e.getKey();
|
||||
int numberOfNodes = nodeCounts.get(e.getKey());
|
||||
Set<String> nodeNames = new HashSet<>();
|
||||
IntStream.rangeClosed(1, numberOfNodes)
|
||||
.mapToObj(i -> nodeNames.add(String.format("%s-%s",
|
||||
componentName, i)));
|
||||
for (int i = 1; i <= numberOfNodes; i++){
|
||||
nodeNames.add(String.format("%s-%s", componentName, i));
|
||||
}
|
||||
app.getComponentMachineNames().put(componentName, nodeNames);
|
||||
if (numberOfNodes == 0) {
|
||||
// Do not ask for node candidates if this component's replica
|
||||
@ -381,7 +380,7 @@ public class NebulousAppDeployer {
|
||||
log.error("Failed to add nodes for component {}", componentName);
|
||||
}
|
||||
}
|
||||
|
||||
Main.logFile("nodenames-" + appUUID + ".txt", app.getComponentMachineNames());
|
||||
// ------------------------------------------------------------
|
||||
// 7. Rewrite KubeVela file, based on running node names
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user