Skip to content

Commit

Permalink
storage: Remove support for NVDIMM namespaces
Browse files Browse the repository at this point in the history
All additional support for NVDIMM is being deprecated and removed, especially
the support for the namespace reconfiguration. However, namespaces configured
in the block/storage mode can be still used for installation.

The `nvdimm` kickstart command is deprecated and will be removed in future
releases.

Resolves: #INSTALLER-3766
  • Loading branch information
poncovka committed Nov 28, 2023
1 parent c47c54c commit 92ab31c
Show file tree
Hide file tree
Showing 25 changed files with 23 additions and 1,971 deletions.
4 changes: 0 additions & 4 deletions anaconda.py
Original file line number Diff line number Diff line change
Expand Up @@ -488,10 +488,6 @@ def _earlyExceptionHandler(ty, value, traceback):
from pyanaconda.ui.lib.storage import ignore_oemdrv_disks
ignore_oemdrv_disks()

# Ignore nvdimm devices.
from pyanaconda.ui.lib.storage import ignore_nvdimm_blockdevs
ignore_nvdimm_blockdevs()

# Specify protected devices.
from pyanaconda.modules.common.constants.services import STORAGE

Expand Down
2 changes: 1 addition & 1 deletion anaconda.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Source0: https://github.com/rhinstaller/%{name}/releases/download/%{name}-%{vers
%define libxklavierver 5.4
%define mehver 0.23-1
%define nmver 1.0
%define pykickstartver 3.47-1
%define pykickstartver 3.48-1
%define pypartedver 2.5-2
%define pythonblivetver 1:3.8.1-1
%define rpmver 4.15.0
Expand Down
1 change: 0 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@ AC_CONFIG_FILES([Makefile
pyanaconda/modules/storage/disk_selection/Makefile
pyanaconda/modules/storage/fcoe/Makefile
pyanaconda/modules/storage/iscsi/Makefile
pyanaconda/modules/storage/nvdimm/Makefile
pyanaconda/modules/storage/partitioning/Makefile
pyanaconda/modules/storage/partitioning/automatic/Makefile
pyanaconda/modules/storage/partitioning/blivet/Makefile
Expand Down
13 changes: 13 additions & 0 deletions docs/release-notes/remove-nvdimm-support.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
:Type: Kickstart / GUI
:Summary: Remove support for NVDIMM namespaces

:Description:
All additional support for NVDIMM is being deprecated and removed, especially the support
for the namespace reconfiguration. However, namespaces configured in the block/storage mode
can be still used for the installation.

The ``nvdimm`` kickstart command is deprecated and will be removed in future releases.

:Links:
- https://github.com/storaged-project/blivet/pull/1172
- https://github.com/pykickstart/pykickstart/pull/469
2 changes: 1 addition & 1 deletion pyanaconda/core/kickstart/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
from pykickstart.commands.mount import F27_Mount as Mount
from pykickstart.commands.network import F39_Network as Network
from pykickstart.commands.nfs import FC6_NFS as NFS
from pykickstart.commands.nvdimm import F28_Nvdimm as Nvdimm
from pykickstart.commands.nvdimm import F40_Nvdimm as Nvdimm
from pykickstart.commands.ostreecontainer import F38_OSTreeContainer as OSTreeContainer
from pykickstart.commands.ostreesetup import F38_OSTreeSetup as OSTreeSetup
from pykickstart.commands.partition import F34_Partition as Partition
Expand Down
5 changes: 0 additions & 5 deletions pyanaconda/modules/common/constants/objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,6 @@
basename="iSCSI"
)

NVDIMM = DBusObjectIdentifier(
namespace=STORAGE_NAMESPACE,
basename="NVDIMM"
)

SNAPSHOT = DBusObjectIdentifier(
namespace=STORAGE_NAMESPACE,
basename="Snapshot"
Expand Down
5 changes: 0 additions & 5 deletions pyanaconda/modules/common/structures/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,11 +168,6 @@ def attrs(self) -> Dict[Str, Str]:
target
path-id
Attributes for NVDIMM:
mode
namespace
path-id
Attributes for ZFCP:
fcp-lun
wwpn
Expand Down
2 changes: 1 addition & 1 deletion pyanaconda/modules/storage/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# You should have received a copy of the GNU Lesser General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

SUBDIRS = disk_initialization disk_selection bootloader partitioning dasd zfcp fcoe nvdimm \
SUBDIRS = disk_initialization disk_selection bootloader partitioning dasd zfcp fcoe \
snapshot devicetree checker iscsi

pkgpyexecdir = $(pyexecdir)/py$(PACKAGE_NAME)
Expand Down
8 changes: 0 additions & 8 deletions pyanaconda/modules/storage/devicetree/viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,6 @@ def get_device_data(self, name):
self._set_device_data_fcoe(device, data)
elif device.type == "iscsi":
self._set_device_data_iscsi(device, data)
elif device.type == "nvdimm":
self._set_device_data_nvdimm(device, data)
elif device.type == "zfcp":
self._set_device_data_zfcp(device, data)

Expand Down Expand Up @@ -151,12 +149,6 @@ def _set_device_data_iscsi(self, device, data):
data.attrs["target"] = self._get_attribute(device, "target")
data.attrs["path-id"] = self._get_attribute(device, "id_path")

def _set_device_data_nvdimm(self, device, data):
"""Set data for an NVDIMM device."""
data.attrs["mode"] = self._get_attribute(device, "mode")
data.attrs["namespace"] = self._get_attribute(device, "devname")
data.attrs["path-id"] = self._get_attribute(device, "id_path")

def _set_device_data_zfcp(self, device, data):
"""Set data for a ZFCP device."""
data.attrs["fcp-lun"] = self._get_attribute(device, "fcp_lun")
Expand Down
35 changes: 2 additions & 33 deletions pyanaconda/modules/storage/kickstart.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,10 @@
#
from blivet.fcoe import fcoe
from blivet.iscsi import iscsi
from blivet.static_data import nvdimm
from blivet.zfcp import zfcp
from blivet.formats import get_format
from blivet.formats.disklabel import DiskLabel
from pykickstart.constants import CLEARPART_TYPE_NONE, NVDIMM_ACTION_RECONFIGURE, NVDIMM_ACTION_USE
from pykickstart.constants import CLEARPART_TYPE_NONE
from pykickstart.errors import KickstartParseError

from pyanaconda.network import get_supported_devices, wait_for_network_devices
Expand Down Expand Up @@ -258,36 +257,6 @@ def parse(self, args):

return retval

class Nvdimm(COMMANDS.Nvdimm):
"""The nvdimm kickstart command."""

def parse(self, args):
action = super().parse(args)

if action.action == NVDIMM_ACTION_RECONFIGURE:
if action.namespace not in nvdimm.namespaces:
raise KickstartParseError(_("Namespace \"{}\" given in nvdimm command was not "
"found.").format(action.namespace), lineno=self.lineno)

log.info("Reconfiguring the namespace %s to %s mode", action.namespace, action.mode)
nvdimm.reconfigure_namespace(
action.namespace,
action.mode,
sector_size=action.sectorsize
)

elif action.action == NVDIMM_ACTION_USE:
if action.namespace and action.namespace not in nvdimm.namespaces:
raise KickstartParseError(_("Namespace \"{}\" given in nvdimm command was not "
"found.").format(action.namespace), lineno=self.lineno)

devs = action.blockdevs
action.blockdevs = get_device_names(devs, disks_only=True, lineno=self.lineno,
msg=_("Disk \"{}\" given in nvdimm command does "
"not exist."))

return action


class Partition(COMMANDS.Partition):
def parse(self, args):
Expand Down Expand Up @@ -350,7 +319,7 @@ class StorageKickstartSpecification(KickstartSpecification):
"iscsiname": IscsiName,
"logvol": LogVol,
"mount": COMMANDS.Mount,
"nvdimm": Nvdimm,
"nvdimm": COMMANDS.Nvdimm,
"part": Partition,
"partition": Partition,
"raid": Raid,
Expand Down
21 changes: 0 additions & 21 deletions pyanaconda/modules/storage/nvdimm/Makefile.am

This file was deleted.

20 changes: 0 additions & 20 deletions pyanaconda/modules/storage/nvdimm/__init__.py

This file was deleted.

Loading

0 comments on commit 92ab31c

Please sign in to comment.