This repository was archived by the owner on Mar 23, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Original file line number Diff line number Diff line change @@ -154,3 +154,47 @@ metadata:
154
154
namespace: "${TARGET_NAMESPACE} "
155
155
spec: {}
156
156
EOF
157
+
158
+ echo " Waiting for HCO to get fully deployed"
159
+ oc wait -n ${TARGET_NAMESPACE} hyperconverged hyperconverged-cluster --for condition=Available --timeout=10m
160
+
161
+ echo " Configuring network on nodes"
162
+
163
+ echo " Detecting the default interface"
164
+ machineCIDR=$( grep ' machineCIDR' ../OpenShift/install-config.yaml | sed ' s/\(.*\): *\(.*\)/\2/' )
165
+ while ! default_iface=$( oc get nodenetworkstate ${node} -o jsonpath=" {.items[0].status.currentState.routes.running[?(@.destination==\" ${machineCIDR} \" )].next-hop-interface}" | cut -d " " -f 1) ; do
166
+ sleep 10
167
+ done
168
+
169
+ echo " Applying node network configuration policy"
170
+ cat << EOF | oc apply -f -
171
+ apiVersion: nmstate.io/v1alpha1
172
+ kind: NodeNetworkConfigurationPolicy
173
+ metadata:
174
+ name: kni-policy
175
+ spec:
176
+ desiredState:
177
+ interfaces:
178
+ - name: brext
179
+ type: linux-bridge
180
+ state: up
181
+ ipv4:
182
+ dhcp: true
183
+ enabled: true
184
+ ipv6:
185
+ dhcp: true
186
+ enabled: true
187
+ bridge:
188
+ options:
189
+ stp:
190
+ enabled: false
191
+ port:
192
+ - name: ${default_iface}
193
+ EOF
194
+
195
+ echo " Waiting until the configuration is done"
196
+ nodes=$( oc get nodes -o jsonpath=' {range .items[*]}{.metadata.name} {end}' )
197
+ for node in $nodes ; do
198
+ until [ " $( oc get nodenetworkstate ${node} -o jsonpath=" {.status.currentState.routes.running[?(@.destination==\" ${machineCIDR} \" )].next-hop-interface}" ) " == " brext" ]; do sleep 10; done
199
+ done
200
+ oc wait node --all --for condition=Ready --timeout=10m
You can’t perform that action at this time.
0 commit comments