Skip to content

Commit 9fc2d76

Browse files
Merge pull request #15814 from mantis-toboggan-md/15538-custom-cluster-creation
Fix error during custom cluster creation with slow network speeds
2 parents d7f7017 + 37c9a26 commit 9fc2d76

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

shell/models/provisioning.cattle.io.cluster.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,11 @@ export default class ProvCluster extends SteveModel {
369369
}
370370

371371
get mgmtClusterId() {
372-
return this.status?.clusterName;
372+
// when a cluster is created `this` instance isn't immediately updated with `status.clusterName`
373+
// Workaround - Get fresh copy from the store
374+
const pCluster = this.$rootGetters['management/byId'](CAPI.RANCHER_CLUSTER, this.id);
375+
376+
return this.status?.clusterName || pCluster?.status?.clusterName;
373377
}
374378

375379
get mgmt() {

0 commit comments

Comments
 (0)