diff --git a/automation/test.sh b/automation/test.sh index 47b7ca2a..d9d8c2d8 100755 --- a/automation/test.sh +++ b/automation/test.sh @@ -165,6 +165,11 @@ git submodule update --init make generate +#set terminationGracePeriodSeconds to 0 +for filename in dist/templates/*; do + sed -i -e 's/^\(\s*terminationGracePeriodSeconds\s*:\s*\).*/\10/' $filename +done + cp automation/connect_to_rhel_console.exp automation/kubevirtci/connect_to_rhel_console.exp cd automation/kubevirtci diff --git a/templates/README.md b/templates/README.md index 875a186e..9f070b73 100644 --- a/templates/README.md +++ b/templates/README.md @@ -274,6 +274,9 @@ status: mac-address: AA:BB:CC:DD:EE:FF ``` +## terminationGracePeriodSeconds +All linux templates have terminationGracePeriodSeconds set to 180 seconds, in windows templates it is set to 3600 seconds. + ## Future enhancements - Parameter replacement could support numerical expressions (either in the template or during parameter definition - one parameter building on top of another) diff --git a/templates/_linux.yaml b/templates/_linux.yaml index 8adc2561..0ca5f9a8 100644 --- a/templates/_linux.yaml +++ b/templates/_linux.yaml @@ -91,7 +91,7 @@ objects: interfaces: - masquerade: {} name: default - terminationGracePeriodSeconds: 0 + terminationGracePeriodSeconds: 180 networks: - name: default pod: {} diff --git a/templates/centos6.tpl.yaml b/templates/centos6.tpl.yaml index ef82a88a..714ac338 100644 --- a/templates/centos6.tpl.yaml +++ b/templates/centos6.tpl.yaml @@ -1,4 +1,4 @@ -{% set version = "0.7.0" %} +{% set version = "0.11.3" %} apiVersion: template.openshift.io/v1 kind: Template metadata: diff --git a/templates/centos7.tpl.yaml b/templates/centos7.tpl.yaml index e20ba8f2..6f88b9d5 100644 --- a/templates/centos7.tpl.yaml +++ b/templates/centos7.tpl.yaml @@ -1,4 +1,4 @@ -{% set version = "0.7.0" %} +{% set version = "0.11.3" %} apiVersion: template.openshift.io/v1 kind: Template metadata: diff --git a/templates/centos8.tpl.yaml b/templates/centos8.tpl.yaml index 9680e184..20a041b3 100644 --- a/templates/centos8.tpl.yaml +++ b/templates/centos8.tpl.yaml @@ -1,4 +1,4 @@ -{% set version = "0.11.0" %} +{% set version = "0.11.3" %} apiVersion: template.openshift.io/v1 kind: Template metadata: diff --git a/templates/fedora.tpl.yaml b/templates/fedora.tpl.yaml index bb18b938..49def57a 100644 --- a/templates/fedora.tpl.yaml +++ b/templates/fedora.tpl.yaml @@ -1,4 +1,4 @@ -{% set version = "0.7.0" %} +{% set version = "0.11.3" %} apiVersion: template.openshift.io/v1 kind: Template metadata: diff --git a/templates/opensuse.tpl.yaml b/templates/opensuse.tpl.yaml index e584e725..0787b54d 100644 --- a/templates/opensuse.tpl.yaml +++ b/templates/opensuse.tpl.yaml @@ -1,4 +1,4 @@ -{% set version = "0.7.0" %} +{% set version = "0.11.3" %} apiVersion: template.openshift.io/v1 kind: Template metadata: diff --git a/templates/rhel6.tpl.yaml b/templates/rhel6.tpl.yaml index d62c7e63..bda0d4a3 100644 --- a/templates/rhel6.tpl.yaml +++ b/templates/rhel6.tpl.yaml @@ -1,4 +1,4 @@ -{% set version = "0.7.0" %} +{% set version = "0.11.3" %} apiVersion: template.openshift.io/v1 kind: Template metadata: diff --git a/templates/rhel7.tpl.yaml b/templates/rhel7.tpl.yaml index 6cf0c730..860794cc 100644 --- a/templates/rhel7.tpl.yaml +++ b/templates/rhel7.tpl.yaml @@ -1,4 +1,4 @@ -{% set version = "0.7.0" %} +{% set version = "0.11.3" %} apiVersion: template.openshift.io/v1 kind: Template metadata: diff --git a/templates/rhel8.tpl.yaml b/templates/rhel8.tpl.yaml index ea377d36..f8ecaab0 100644 --- a/templates/rhel8.tpl.yaml +++ b/templates/rhel8.tpl.yaml @@ -1,4 +1,4 @@ -{% set version = "0.10.0" %} +{% set version = "0.11.3" %} apiVersion: template.openshift.io/v1 kind: Template metadata: diff --git a/templates/ubuntu.tpl.yaml b/templates/ubuntu.tpl.yaml index cba165ce..b696d494 100644 --- a/templates/ubuntu.tpl.yaml +++ b/templates/ubuntu.tpl.yaml @@ -1,4 +1,4 @@ -{% set version = "0.11.0" %} +{% set version = "0.11.3" %} apiVersion: template.openshift.io/v1 kind: Template metadata: diff --git a/templates/win2k12r2-deprecated.tpl.yaml b/templates/win2k12r2-deprecated.tpl.yaml index e2651c2b..d50d8de3 100644 --- a/templates/win2k12r2-deprecated.tpl.yaml +++ b/templates/win2k12r2-deprecated.tpl.yaml @@ -1,4 +1,4 @@ -{% set version = "0.7.0" %} +{% set version = "0.11.3" %} apiVersion: template.openshift.io/v1 kind: Template metadata: @@ -132,7 +132,7 @@ objects: bus: usb name: tablet {% endif %} - terminationGracePeriodSeconds: 0 + terminationGracePeriodSeconds: 3600 volumes: - name: rootdisk persistentVolumeClaim: diff --git a/templates/windows.tpl.yaml b/templates/windows.tpl.yaml index 892ef609..700ac4ed 100644 --- a/templates/windows.tpl.yaml +++ b/templates/windows.tpl.yaml @@ -1,4 +1,4 @@ -{% set version = "0.7.0" %} +{% set version = "0.11.3" %} apiVersion: template.openshift.io/v1 kind: Template metadata: @@ -130,7 +130,7 @@ objects: bus: usb name: tablet {% endif %} - terminationGracePeriodSeconds: 0 + terminationGracePeriodSeconds: 3600 volumes: - name: rootdisk persistentVolumeClaim: diff --git a/templates/windows10.tpl.yaml b/templates/windows10.tpl.yaml index dd22e77f..8fc9c41d 100644 --- a/templates/windows10.tpl.yaml +++ b/templates/windows10.tpl.yaml @@ -1,4 +1,4 @@ -{% set version = "0.7.0" %} +{% set version = "0.11.3" %} apiVersion: template.openshift.io/v1 kind: Template metadata: @@ -126,7 +126,7 @@ objects: bus: usb name: tablet {% endif %} - terminationGracePeriodSeconds: 0 + terminationGracePeriodSeconds: 3600 volumes: - name: rootdisk persistentVolumeClaim: diff --git a/travis_ci/test.sh b/travis_ci/test.sh index 7487e11b..92bef8de 100755 --- a/travis_ci/test.sh +++ b/travis_ci/test.sh @@ -41,6 +41,11 @@ make generate # Limit required memory of large templates bash automation/x-limit-ram-size.sh +#set terminationGracePeriodSeconds to 0 +for filename in dist/templates/*; do + sed -i -e 's/^\(\s*terminationGracePeriodSeconds\s*:\s*\).*/\10/' $filename +done + # Download images case "$name" in "fedora")