Repository: metal3-io/baremetal-operator
Pull request #684 (2020-10-15 13:14:39)

Re-enable FAST_TRACK and set Online to true when rendering BMH CRs
This PR is another try to get benefits of fast-track provisioning feature.

Reverts back: #579 and #632 


Patch:
diff --git a/cmd/make-bm-worker/templates/templates.go b/cmd/make-bm-worker/templates/templates.go
index f3477154..90d7bc83 100644
--- a/cmd/make-bm-worker/templates/templates.go
+++ b/cmd/make-bm-worker/templates/templates.go
@@ -22,7 +22,7 @@ kind: BareMetalHost
 metadata:
   name: {{ .Name }}
 spec:
-  online: false
+  online: true
 {{- if .HardwareProfile }}
   hardwareProfile: {{ .HardwareProfile }}
 {{- end }}
diff --git a/cmd/make-virt-host/main.go b/cmd/make-virt-host/main.go
index 41b86070..140382b0 100644
--- a/cmd/make-virt-host/main.go
+++ b/cmd/make-virt-host/main.go
@@ -68,7 +68,7 @@ kind: BareMetalHost
 metadata:
   name: {{ .Domain }}
 spec:
-  online: false
+  online: true
   bmc:
     address: libvirt://192.168.122.1:{{ .BMCPort }}/
     credentialsName: {{ .Domain }}-bmc-secret
diff --git a/config/default/ironic.env b/config/default/ironic.env
index 7bbc28b7..5e512f6d 100644
--- a/config/default/ironic.env
+++ b/config/default/ironic.env
@@ -6,4 +6,4 @@ DEPLOY_RAMDISK_URL=http://172.22.0.2:6180/images/ironic-python-agent.initramfs
 IRONIC_ENDPOINT=http://172.22.0.2:6385/v1/
 IRONIC_INSPECTOR_ENDPOINT=http://172.22.0.2:5050/v1/
 CACHEURL=http://172.22.0.1/images
-IRONIC_FAST_TRACK=false
+IRONIC_FAST_TRACK=true
diff --git a/config/render/capm3.yaml b/config/render/capm3.yaml
index d1c1fb1c..8af8e360 100644
--- a/config/render/capm3.yaml
+++ b/config/render/capm3.yaml
@@ -796,7 +796,7 @@ data:
   DHCP_RANGE: 172.22.0.10,172.22.0.100
   HTTP_PORT: "6180"
   IRONIC_ENDPOINT: http://172.22.0.2:6385/v1/
-  IRONIC_FAST_TRACK: "false"
+  IRONIC_FAST_TRACK: "true"
   IRONIC_INSPECTOR_ENDPOINT: http://172.22.0.2:5050/v1/
   PROVISIONING_INTERFACE: eth2
 kind: ConfigMap
diff --git a/docs/dev-setup.md b/docs/dev-setup.md
index 9d8c5bd1..5e717e24 100644
--- a/docs/dev-setup.md
+++ b/docs/dev-setup.md
@@ -79,7 +79,7 @@ The following environment variables can be passed to configure the ironic:
 - IRONIC_INSPECTOR_ENDPOINT - the endpoint of the ironic inspector
 - CACHEURL - the URL of the cached images
 - IRONIC_FAST_TRACK - whether to enable fast_track provisioning or not
-  (default false)
+  (default true)
 
 ## Using Tilt for development
 
diff --git a/hack/ironic_ci.env b/hack/ironic_ci.env
index 2ca15298..2c4c5e99 100644
--- a/hack/ironic_ci.env
+++ b/hack/ironic_ci.env
@@ -8,4 +8,4 @@ DEPLOY_RAMDISK_URL=http://172.22.0.2:6180/images/ironic-python-agent.initramfs
 IRONIC_ENDPOINT=http://172.22.0.2:6385/v1/
 IRONIC_INSPECTOR_ENDPOINT=http://172.22.0.2:5050/v1/
 CACHEURL=http://172.22.0.1/images
-IRONIC_FAST_TRACK=false
\ No newline at end of file
+IRONIC_FAST_TRACK=true
\ No newline at end of file
diff --git a/ironic-deployment/default/ironic_bmo_configmap.env b/ironic-deployment/default/ironic_bmo_configmap.env
index 7bbc28b7..5e512f6d 100644
--- a/ironic-deployment/default/ironic_bmo_configmap.env
+++ b/ironic-deployment/default/ironic_bmo_configmap.env
@@ -6,4 +6,4 @@ DEPLOY_RAMDISK_URL=http://172.22.0.2:6180/images/ironic-python-agent.initramfs
 IRONIC_ENDPOINT=http://172.22.0.2:6385/v1/
 IRONIC_INSPECTOR_ENDPOINT=http://172.22.0.2:5050/v1/
 CACHEURL=http://172.22.0.1/images
-IRONIC_FAST_TRACK=false
+IRONIC_FAST_TRACK=true
diff --git a/ironic-deployment/keepalived/ironic_bmo_configmap.env b/ironic-deployment/keepalived/ironic_bmo_configmap.env
index 679d34ef..01d249fb 100644
--- a/ironic-deployment/keepalived/ironic_bmo_configmap.env
+++ b/ironic-deployment/keepalived/ironic_bmo_configmap.env
@@ -8,4 +8,4 @@ DEPLOY_RAMDISK_URL=http://172.22.0.2:6180/images/ironic-python-agent.initramfs
 IRONIC_ENDPOINT=http://172.22.0.2:6385/v1/
 IRONIC_INSPECTOR_ENDPOINT=http://172.22.0.2:5050/v1/
 CACHEURL=http://172.22.0.1/images
-IRONIC_FAST_TRACK=false
+IRONIC_FAST_TRACK=true
diff --git a/tools/run_local_ironic.sh b/tools/run_local_ironic.sh
index 8ada3ff3..5170bb81 100755
--- a/tools/run_local_ironic.sh
+++ b/tools/run_local_ironic.sh
@@ -39,7 +39,7 @@ DEPLOY_RAMDISK_URL="${DEPLOY_RAMDISK_URL:-"http://${CLUSTER_PROVISIONING_IP}:${H
 IRONIC_ENDPOINT="${IRONIC_ENDPOINT:-"${IRONIC_BASE_URL}:6385/v1/"}"
 IRONIC_INSPECTOR_ENDPOINT="${IRONIC_INSPECTOR_ENDPOINT:-"${IRONIC_BASE_URL}:5050/v1/"}"
 CACHEURL="${CACHEURL:-"http://${PROVISIONING_IP}/images"}"
-IRONIC_FAST_TRACK="${IRONIC_FAST_TRACK:-"false"}"
+IRONIC_FAST_TRACK="${IRONIC_FAST_TRACK:-"true"}"
 
 sudo mkdir -p "${IRONIC_DATA_DIR}"
 sudo mkdir -p "${IRONIC_DATA_DIR}/auth"


Test patch:
diff --git a/cmd/make-bm-worker/templates/templates_test.go b/cmd/make-bm-worker/templates/templates_test.go
index c3784620..92a6aa32 100644
--- a/cmd/make-bm-worker/templates/templates_test.go
+++ b/cmd/make-bm-worker/templates/templates_test.go
@@ -51,7 +51,7 @@ kind: BareMetalHost
 metadata:
   name: hostname
 spec:
-  online: false
+  online: true
   hardwareProfile: hardware profile
   bmc:
     address: bmcAddress
@@ -86,7 +86,7 @@ kind: BareMetalHost
 metadata:
   name: hostname
 spec:
-  online: false
+  online: true
   bmc:
     address: bmcAddress
     credentialsName: hostname-bmc-secret
@@ -122,7 +122,7 @@ kind: BareMetalHost
 metadata:
   name: hostname
 spec:
-  online: false
+  online: true
   bmc:
     address: bmcAddress
     credentialsName: hostname-bmc-secret