From 449bc1a8255bd44e1cc4aa9f5ca9c168d75a6215 Mon Sep 17 00:00:00 2001
From: Julia Kreger <juliaashleykreger@gmail.com>
Date: Tue, 18 Feb 2025 08:18:39 -0800
Subject: [PATCH] deprecate shellinabox

Shellinabox hasn't received an update in 7 years.
Debian recently asked for maintainership to be handed over due to
open issue counts and lack of responses.

All sorts of open issues exist. It appears branches were deleted
in late 2024, forks still have them though.

Basically, looks like shellinabox is abandoned, and we should
treat it as such and abandon support in Ironic.

Change-Id: I5704e1a6a6a816e1cca3b5d0c791eed030cfc563
---
 doc/source/admin/console.rst                         | 12 +++++++-----
 ironic/drivers/modules/ipmitool.py                   |  8 ++++++++
 .../deprecate-shell-in-a-box-eef2ec4a96683e19.yaml   |  8 ++++++++
 3 files changed, 23 insertions(+), 5 deletions(-)
 create mode 100644 releasenotes/notes/deprecate-shell-in-a-box-eef2ec4a96683e19.yaml

diff --git a/doc/source/admin/console.rst b/doc/source/admin/console.rst
index 23c09744d1..2acbcf55db 100644
--- a/doc/source/admin/console.rst
+++ b/doc/source/admin/console.rst
@@ -20,12 +20,14 @@ The web console can be configured in Bare Metal service in the following way:
   is not present in base repositories, the user must enable EPEL repository, you can
   find more from `FedoraProject page`_.
 
-  .. note::
+  .. warning::
 
-     shellinabox is no longer maintained by the authorized author.
-     `This <https://github.com/shellinabox/shellinabox>`_ is a fork of the
-     project on GitHub that aims to continue with the maintenance of the
-     shellinabox project.
+     Shell In A Box is considered abandoned by the Ironic community. The
+     original maintainer stopped maintaining the project and the project
+     was thus forked. The resulting
+     `fork <https://github.com/shellinabox/shellinabox>`_ has not received
+     updates in a number of years and is considered abandoned.
+     As such, shellinabox support has been deprecated by the Ironic community.
 
   Installation example:
 
diff --git a/ironic/drivers/modules/ipmitool.py b/ironic/drivers/modules/ipmitool.py
index 66b2cc269e..77e323521a 100644
--- a/ironic/drivers/modules/ipmitool.py
+++ b/ironic/drivers/modules/ipmitool.py
@@ -1606,6 +1606,14 @@ class IPMIConsole(base.ConsoleInterface):
 class IPMIShellinaboxConsole(IPMIConsole):
     """A ConsoleInterface that uses ipmitool and shellinabox."""
 
+    # TODO(TheJulia): This interface is deprecated due to the shellinabox
+    # project being abandoned. It should be removed after the release of
+    # 2025.2 in advance of 2026.1's release.
+    # https://github.com/shellinabox/shellinabox
+    # https://github.com/shellinabox/shellinabox/issues/531
+
+    supported = False
+
     def _get_ipmi_cmd(self, driver_info, pw_file):
         """Get ipmi command for ipmitool usage.
 
diff --git a/releasenotes/notes/deprecate-shell-in-a-box-eef2ec4a96683e19.yaml b/releasenotes/notes/deprecate-shell-in-a-box-eef2ec4a96683e19.yaml
new file mode 100644
index 0000000000..0a01f5e34d
--- /dev/null
+++ b/releasenotes/notes/deprecate-shell-in-a-box-eef2ec4a96683e19.yaml
@@ -0,0 +1,8 @@
+---
+deprecations:
+  - |
+    Use of the console driver ``ipmitool-shellinabox`` has been deprecated and
+    will be removed in a future release of Ironic. This decision was reached
+    with the reality that the fork of shellinabox appears abandoned with no
+    changes in 7 years and open issues to call for the project to hand over
+    `maintainership <https://github.com/shellinabox/shellinabox/issues/531>`_.