upgrade_priorities.yml 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. ---
  2. # Handle case where openshift_master_priorities is defined
  3. - when: openshift_master_scheduler_priorities | default(none) is not none
  4. block:
  5. - name: openshift_master_scheduler_priorities is defined
  6. debug:
  7. msg: "openshift_master_scheduler_priorities is defined"
  8. - name: openshift_master_scheduler_priorities is set to defaults from an earlier release of OpenShift
  9. debug:
  10. msg: "WARNING: openshift_master_scheduler_priorities is set to defaults from an earlier release of OpenShift current defaults are: {{ openshift_master_scheduler_default_priorities }}"
  11. when: openshift_master_scheduler_priorities in osm_older_priorities + osm_older_priorities_no_zone + [osm_prev_priorities] + [osm_prev_priorities_no_zone]
  12. - name: openshift_master_scheduler_priorities does not match current defaults
  13. debug:
  14. msg: "WARNING: openshift_master_scheduler_priorities does not match current defaults of: {{ openshift_master_scheduler_default_priorities }}"
  15. when: openshift_master_scheduler_priorities != openshift_master_scheduler_default_priorities
  16. # Handle cases where openshift_master_priorities is not defined
  17. - when: openshift_master_scheduler_priorities | default(none) is none
  18. block:
  19. - name: openshift_master_scheduler_priorities is not defined
  20. debug:
  21. msg: "openshift_master_scheduler_priorities is not defined"
  22. - name: existing scheduler config does not match previous known defaults
  23. debug:
  24. msg: "WARNING: existing scheduler config does not match previous known defaults automated upgrade of scheduler config is disabled.\nexisting scheduler priorities: {{ openshift_master_scheduler_current_priorities }}\ncurrent scheduler default priorities are: {{ openshift_master_scheduler_default_priorities }}"
  25. when:
  26. - openshift_master_scheduler_current_priorities != openshift_master_scheduler_default_priorities
  27. - openshift_master_scheduler_current_priorities not in osm_older_priorities + [osm_prev_priorities]
  28. - name: set_fact openshift_upgrade_scheduler_priorities 1
  29. set_fact:
  30. openshift_upgrade_scheduler_priorities: "{{ openshift_master_scheduler_default_priorities }}"
  31. when:
  32. - openshift_master_scheduler_current_priorities != openshift_master_scheduler_default_priorities
  33. - openshift_master_scheduler_current_priorities in osm_older_priorities + [osm_prev_priorities]
  34. - name: set_fact openshift_upgrade_scheduler_priorities 2
  35. set_fact:
  36. openshift_upgrade_scheduler_priorities: "{{ osm_default_priorities_no_zone }}"
  37. when:
  38. - openshift_master_scheduler_current_priorities != osm_default_priorities_no_zone
  39. - openshift_master_scheduler_current_priorities in osm_older_priorities_no_zone + [osm_prev_priorities_no_zone]