summaryrefslogtreecommitdiffstats
path: root/playbooks/common
diff options
context:
space:
mode:
authorSteve Milner <smilner@redhat.com>2017-08-29 11:38:22 -0400
committerSteve Milner <smilner@redhat.com>2017-09-08 10:16:29 -0400
commitdc781f828b74a65454a94055a854da2cf26cb0db (patch)
tree1c758ce1e35a2560851b5636d832e9a94919deec /playbooks/common
parentdc0e3d218ba953e1bc1525ef337f99677deee6c3 (diff)
downloadopenshift-dc781f828b74a65454a94055a854da2cf26cb0db.tar.gz
openshift-dc781f828b74a65454a94055a854da2cf26cb0db.tar.bz2
openshift-dc781f828b74a65454a94055a854da2cf26cb0db.tar.xz
openshift-dc781f828b74a65454a94055a854da2cf26cb0db.zip
upgrade: Verify required network items are set
When upgrading osm_cluster_network_cidr, osm_host_subnet_length, and openshift_portal_net must be set to avoid SDN initialization errors. This was found when the default parameters were changed between Openshift versions. This meant users who upgraded and did not specify either mentioned variable at install/upgrade time ended up getting SDN errors post upgrade. When osm_cluster_network_cidr, osm_host_subnet_length, and openshift_portal_net are not set the upgrade will fail telling the user that the variables must be set and how to find the current values in the current install. References: https://github.com/openshift/openshift-ansible/commit/b50b4ea0b03feb9431abd7294fe4fb6b549ddfc0 Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1451023
Diffstat (limited to 'playbooks/common')
-rw-r--r--playbooks/common/openshift-cluster/upgrades/pre/verify_inventory_vars.yml15
1 files changed, 15 insertions, 0 deletions
diff --git a/playbooks/common/openshift-cluster/upgrades/pre/verify_inventory_vars.yml b/playbooks/common/openshift-cluster/upgrades/pre/verify_inventory_vars.yml
index 9a959a959..78923e04f 100644
--- a/playbooks/common/openshift-cluster/upgrades/pre/verify_inventory_vars.yml
+++ b/playbooks/common/openshift-cluster/upgrades/pre/verify_inventory_vars.yml
@@ -9,6 +9,21 @@
deployment types
when: deployment_type not in ['origin','openshift-enterprise', 'online']
+ # osm_cluster_network_cidr, osm_host_subnet_length and openshift_portal_net are
+ # required when upgrading to avoid changes that may occur between releases
+ # Reference: https://bugzilla.redhat.com/show_bug.cgi?id=1451023
+ - assert:
+ that:
+ - "osm_cluster_network_cidr is defined"
+ - "osm_host_subnet_length is defined"
+ - "openshift_portal_net is defined"
+ msg: >
+ osm_cluster_network_cidr, osm_host_subnet_length, and openshift_portal_net are required inventory
+ variables when upgrading. These variables should match what is currently used in the cluster. If
+ you don't remember what these values are you can find them in /etc/origin/master/master-config.yaml
+ on a master with the names clusterNetworkCIDR (osm_cluster_network_cidr),
+ osm_host_subnet_length (hostSubnetLength), and openshift_portal_net (hostSubnetLength).
+
# Error out in situations where the user has older versions specified in their
# inventory in any of the openshift_release, openshift_image_tag, and
# openshift_pkg_version variables. These must be removed or updated to proceed