From fdfb8d4b79b5de014b9879a9f9bed97d8279814a Mon Sep 17 00:00:00 2001 From: Jake Yip Date: Wed, 16 Mar 2022 14:46:25 +1100 Subject: [PATCH] Deprecated fedora_atomic driver Log a warning about fedora-atomic driver deprecation this cycle, so that users can start migrating to using fedora-coreos. fedora-atomic driver will be removed in a future cycle. Change-Id: I026d4fa722cd132e5989998bf902b8a2c73c5a8d --- magnum/api/controllers/v1/cluster_template.py | 11 +++++++++++ .../deprecate-fedora-atomic-a5e7e361053253b7.yaml | 8 ++++++++ 2 files changed, 19 insertions(+) create mode 100644 releasenotes/notes/deprecate-fedora-atomic-a5e7e361053253b7.yaml diff --git a/magnum/api/controllers/v1/cluster_template.py b/magnum/api/controllers/v1/cluster_template.py index 7e624af6b5..dd499840e8 100644 --- a/magnum/api/controllers/v1/cluster_template.py +++ b/magnum/api/controllers/v1/cluster_template.py @@ -267,6 +267,11 @@ class ClusterTemplatesController(base.Controller): "different storage driver, such as overlay2. overlay2 will be set " "as the default storage driver from Victoria cycle in Magnum.") + _fedora_atomic_deprecation_note = ( + "The fedora_atomic driver is deprecated in favor of the fedora_coreos " + "driver. Please migrate to the fedora_coreos driver. fedora_atomic " + "driver will be remove in a future Magnum version.") + def _generate_name_for_cluster_template(self, context): """Generate a random name like: zeta-22-model.""" @@ -421,6 +426,12 @@ class ClusterTemplatesController(base.Controller): DeprecationWarning) LOG.warning(self._devicemapper_overlay_deprecation_note) + if (cluster_template_dict['coe'] == 'kubernetes' and + cluster_template_dict['cluster_distro'] == 'fedora-atomic'): + warnings.warn(self._fedora_atomic_deprecation_note, + DeprecationWarning) + LOG.warning(self._fedora_atomic_deprecation_note) + # NOTE(yuywz): We will generate a random human-readable name for # cluster_template if the name is not specified by user. arg_name = cluster_template_dict.get('name') diff --git a/releasenotes/notes/deprecate-fedora-atomic-a5e7e361053253b7.yaml b/releasenotes/notes/deprecate-fedora-atomic-a5e7e361053253b7.yaml new file mode 100644 index 0000000000..377b162079 --- /dev/null +++ b/releasenotes/notes/deprecate-fedora-atomic-a5e7e361053253b7.yaml @@ -0,0 +1,8 @@ +--- +deprecations: + - | + Deprecate the use of os_distro 'fedora-atomic' with COE 'kubernetes'. + Fedora Atomic OS has been EOL since 2019-11-26. Users using COE + 'kubernetes' are encouraged to migrate to Fedora CoreOS and the + 'fedora-coreos' driver. 'fedora-atomic' driver will be removed in a future + Magnum verison.