Skip to content

Commit fc57118

Browse files
Merge pull request openshift#8107 from honza/rename-master-label
METAL-871: baremetal: bootstrap: rename master label
2 parents c07ac29 + deb484f commit fc57118

File tree

3 files changed

+26
-26
lines changed

3 files changed

+26
-26
lines changed

data/data/bootstrap/baremetal/files/usr/local/bin/master-bmh-update.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ while [ "$(oc get bmh -n openshift-machine-api -o name | wc -l)" -lt 1 ]; do
1515
sleep 20
1616
done
1717

18-
while [ "$(oc get bmh -n openshift-machine-api -l installer.openshift.io/role=master -o json | jq '.items[].status.provisioning.state' | grep -v provisioned -c)" -gt 0 ]; do
18+
while [ "$(oc get bmh -n openshift-machine-api -l installer.openshift.io/role=control-plane -o json | jq '.items[].status.provisioning.state' | grep -v provisioned -c)" -gt 0 ]; do
1919
echo "Waiting for masters to become provisioned"
2020
oc get bmh -A
2121
sleep 20

pkg/asset/machines/baremetal/hosts.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ func Hosts(config *types.InstallConfig, machines []machineapi.Machine, userDataS
144144
}
145145

146146
newHost.ObjectMeta.Labels = map[string]string{
147-
"installer.openshift.io/role": "master",
147+
"installer.openshift.io/role": "control-plane",
148148
}
149149

150150
// Link the new host to the currently available machine

pkg/asset/machines/baremetal/hosts_test.go

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ routes:
6161

6262
ExpectedSetting: settings().
6363
secrets(secret("master-0-bmc-secret").creds("usr0", "pwd0")).
64-
hosts(host("master-0").label("installer.openshift.io/role", "master").userDataRef("user-data-secret").consumerRef("machine-0").customDeploy()).build(),
64+
hosts(host("master-0").label("installer.openshift.io/role", "control-plane").userDataRef("user-data-secret").consumerRef("machine-0").customDeploy()).build(),
6565
},
6666
{
6767
Scenario: "default-norole",
@@ -70,7 +70,7 @@ routes:
7070

7171
ExpectedSetting: settings().
7272
secrets(secret("master-0-bmc-secret").creds("usr0", "pwd0")).
73-
hosts(host("master-0").label("installer.openshift.io/role", "master").userDataRef("user-data-secret").consumerRef("machine-0").customDeploy()).build(),
73+
hosts(host("master-0").label("installer.openshift.io/role", "control-plane").userDataRef("user-data-secret").consumerRef("machine-0").customDeploy()).build(),
7474
},
7575
{
7676
Scenario: "network-config",
@@ -85,7 +85,7 @@ routes:
8585
networkConfigSecrets(secret("master-0-network-config-secret").nmstate(nmstate)).
8686
hosts(
8787
host("master-0").
88-
label("installer.openshift.io/role", "master").
88+
label("installer.openshift.io/role", "control-plane").
8989
consumerRef("machine-0").
9090
userDataRef("user-data-secret").
9191
preprovisioningNetworkDataName("master-0-network-config-secret").
@@ -108,9 +108,9 @@ routes:
108108
secret("master-1-bmc-secret").creds("usr1", "pwd1"),
109109
secret("master-2-bmc-secret").creds("usr2", "pwd2")).
110110
hosts(
111-
host("master-0").label("installer.openshift.io/role", "master").userDataRef("user-data-secret").consumerRef("machine-0").customDeploy(),
112-
host("master-1").label("installer.openshift.io/role", "master").userDataRef("user-data-secret").consumerRef("machine-1").customDeploy(),
113-
host("master-2").label("installer.openshift.io/role", "master").userDataRef("user-data-secret").consumerRef("machine-2").customDeploy()).build(),
111+
host("master-0").label("installer.openshift.io/role", "control-plane").userDataRef("user-data-secret").consumerRef("machine-0").customDeploy(),
112+
host("master-1").label("installer.openshift.io/role", "control-plane").userDataRef("user-data-secret").consumerRef("machine-1").customDeploy(),
113+
host("master-2").label("installer.openshift.io/role", "control-plane").userDataRef("user-data-secret").consumerRef("machine-2").customDeploy()).build(),
114114
},
115115
{
116116
Scenario: "4-hosts-3-machines",
@@ -131,9 +131,9 @@ routes:
131131
secret("master-2-bmc-secret").creds("usr2", "pwd2"),
132132
secret("worker-0-bmc-secret").creds("usr3", "pwd3")).
133133
hosts(
134-
host("master-0").label("installer.openshift.io/role", "master").userDataRef("user-data-secret").consumerRef("machine-0").customDeploy(),
135-
host("master-1").label("installer.openshift.io/role", "master").userDataRef("user-data-secret").consumerRef("machine-1").customDeploy(),
136-
host("master-2").label("installer.openshift.io/role", "master").userDataRef("user-data-secret").consumerRef("machine-2").customDeploy(),
134+
host("master-0").label("installer.openshift.io/role", "control-plane").userDataRef("user-data-secret").consumerRef("machine-0").customDeploy(),
135+
host("master-1").label("installer.openshift.io/role", "control-plane").userDataRef("user-data-secret").consumerRef("machine-1").customDeploy(),
136+
host("master-2").label("installer.openshift.io/role", "control-plane").userDataRef("user-data-secret").consumerRef("machine-2").customDeploy(),
137137
host("worker-0").annotation("baremetalhost.metal3.io/paused", ""),
138138
).build(),
139139
},
@@ -156,9 +156,9 @@ routes:
156156
secret("master-2-bmc-secret").creds("usr2", "pwd2"),
157157
secret("worker-0-bmc-secret").creds("wrk0", "pwd0")).
158158
hosts(
159-
host("master-0").label("installer.openshift.io/role", "master").userDataRef("user-data-secret").consumerRef("machine-0").customDeploy(),
160-
host("master-1").label("installer.openshift.io/role", "master").userDataRef("user-data-secret").consumerRef("machine-1").customDeploy(),
161-
host("master-2").label("installer.openshift.io/role", "master").userDataRef("user-data-secret").consumerRef("machine-2").customDeploy(),
159+
host("master-0").label("installer.openshift.io/role", "control-plane").userDataRef("user-data-secret").consumerRef("machine-0").customDeploy(),
160+
host("master-1").label("installer.openshift.io/role", "control-plane").userDataRef("user-data-secret").consumerRef("machine-1").customDeploy(),
161+
host("master-2").label("installer.openshift.io/role", "control-plane").userDataRef("user-data-secret").consumerRef("machine-2").customDeploy(),
162162
host("worker-0").annotation("baremetalhost.metal3.io/paused", ""),
163163
).build(),
164164
},
@@ -183,9 +183,9 @@ routes:
183183
secret("worker-0-bmc-secret").creds("wrk0", "pwd0"),
184184
secret("worker-1-bmc-secret").creds("wrk1", "pwd1")).
185185
hosts(
186-
host("master-0").label("installer.openshift.io/role", "master").userDataRef("user-data-secret").consumerRef("machine-0").customDeploy(),
187-
host("master-1").label("installer.openshift.io/role", "master").userDataRef("user-data-secret").consumerRef("machine-1").customDeploy(),
188-
host("master-2").label("installer.openshift.io/role", "master").userDataRef("user-data-secret").consumerRef("machine-2").customDeploy(),
186+
host("master-0").label("installer.openshift.io/role", "control-plane").userDataRef("user-data-secret").consumerRef("machine-0").customDeploy(),
187+
host("master-1").label("installer.openshift.io/role", "control-plane").userDataRef("user-data-secret").consumerRef("machine-1").customDeploy(),
188+
host("master-2").label("installer.openshift.io/role", "control-plane").userDataRef("user-data-secret").consumerRef("machine-2").customDeploy(),
189189
host("worker-0").annotation("baremetalhost.metal3.io/paused", ""),
190190
host("worker-1").annotation("baremetalhost.metal3.io/paused", ""),
191191
).build(),
@@ -211,11 +211,11 @@ routes:
211211
secret("master-0-bmc-secret").creds("usr0", "pwd0"),
212212
secret("master-2-bmc-secret").creds("usr2", "pwd2")).
213213
hosts(
214-
host("master-1").label("installer.openshift.io/role", "master").userDataRef("user-data-secret").consumerRef("machine-0").customDeploy(),
214+
host("master-1").label("installer.openshift.io/role", "control-plane").userDataRef("user-data-secret").consumerRef("machine-0").customDeploy(),
215215
host("worker-0").annotation("baremetalhost.metal3.io/paused", ""),
216216
host("worker-1").annotation("baremetalhost.metal3.io/paused", ""),
217-
host("master-0").label("installer.openshift.io/role", "master").userDataRef("user-data-secret").consumerRef("machine-1").customDeploy(),
218-
host("master-2").label("installer.openshift.io/role", "master").userDataRef("user-data-secret").consumerRef("machine-2").customDeploy()).build(),
217+
host("master-0").label("installer.openshift.io/role", "control-plane").userDataRef("user-data-secret").consumerRef("machine-1").customDeploy(),
218+
host("master-2").label("installer.openshift.io/role", "control-plane").userDataRef("user-data-secret").consumerRef("machine-2").customDeploy()).build(),
219219
},
220220
{
221221
Scenario: "4-hosts-3-machines-norole-master",
@@ -237,9 +237,9 @@ routes:
237237
secret("master-2-bmc-secret").creds("usr2", "pwd2")).
238238
hosts(
239239
host("worker-0").annotation("baremetalhost.metal3.io/paused", ""),
240-
host("master-0").label("installer.openshift.io/role", "master").userDataRef("user-data-secret").consumerRef("machine-0").customDeploy(),
241-
host("master-1").label("installer.openshift.io/role", "master").userDataRef("user-data-secret").consumerRef("machine-1").customDeploy(),
242-
host("master-2").label("installer.openshift.io/role", "master").userDataRef("user-data-secret").consumerRef("machine-2").customDeploy()).build(),
240+
host("master-0").label("installer.openshift.io/role", "control-plane").userDataRef("user-data-secret").consumerRef("machine-0").customDeploy(),
241+
host("master-1").label("installer.openshift.io/role", "control-plane").userDataRef("user-data-secret").consumerRef("machine-1").customDeploy(),
242+
host("master-2").label("installer.openshift.io/role", "control-plane").userDataRef("user-data-secret").consumerRef("machine-2").customDeploy()).build(),
243243
},
244244
{
245245
Scenario: "4-hosts-3-machines-norole-worker",
@@ -260,9 +260,9 @@ routes:
260260
secret("master-2-bmc-secret").creds("usr2", "pwd2"),
261261
secret("worker-0-bmc-secret").creds("wrk0", "pwd0")).
262262
hosts(
263-
host("master-0").label("installer.openshift.io/role", "master").userDataRef("user-data-secret").consumerRef("machine-0").customDeploy(),
264-
host("master-1").label("installer.openshift.io/role", "master").userDataRef("user-data-secret").consumerRef("machine-1").customDeploy(),
265-
host("master-2").label("installer.openshift.io/role", "master").userDataRef("user-data-secret").consumerRef("machine-2").customDeploy(),
263+
host("master-0").label("installer.openshift.io/role", "control-plane").userDataRef("user-data-secret").consumerRef("machine-0").customDeploy(),
264+
host("master-1").label("installer.openshift.io/role", "control-plane").userDataRef("user-data-secret").consumerRef("machine-1").customDeploy(),
265+
host("master-2").label("installer.openshift.io/role", "control-plane").userDataRef("user-data-secret").consumerRef("machine-2").customDeploy(),
266266
host("worker-0").annotation("baremetalhost.metal3.io/paused", "")).build(),
267267
},
268268
}

0 commit comments

Comments
 (0)