Wizard: Add temporary alert about /usr sub-directories

This adds an alert to the File system configuration step that informs about newly disables `/usr` sub-directories.

It can be removed in two weeks after all the images with possible erroneous mount points are removed.
This commit is contained in:
regexowl 2023-11-14 12:35:50 +01:00 committed by Sanne Raymaekers
parent c2cd4bed97
commit e60afdbe27
3 changed files with 27 additions and 0 deletions

View file

@ -24,6 +24,7 @@ import { v4 as uuidv4 } from 'uuid';
import MountPoint, { MountPointValidPrefixes } from './MountPoint';
import SizeUnit from './SizeUnit';
import UsrSubDirectoriesDisabled from './UsrSubDirectoriesDisabled';
import { UNIT_GIB, UNIT_KIB, UNIT_MIB } from '../../../constants';
import { useGetOscapCustomizationsQuery } from '../../../store/imageBuilderApi';
@ -307,6 +308,9 @@ const FileSystemConfiguration = ({ ...props }) => {
<TextContent>
<Text component={TextVariants.h3}>Configure partitions</Text>
</TextContent>
{getState()?.values?.['file-system-configuration']?.find((mp) =>
mp.mountpoint.includes('/usr')
) && <UsrSubDirectoriesDisabled />}
{rows.length > 1 &&
getState()?.errors?.['file-system-configuration']?.duplicates
?.length !== 0 &&

View file

@ -24,6 +24,7 @@ import {
TargetEnvOciList,
TargetEnvOtherList,
} from './ReviewStepTextLists';
import UsrSubDirectoriesDisabled from './UsrSubDirectoriesDisabled';
import isRhel from '../../../Utilities/isRhel';
@ -66,6 +67,9 @@ const ReviewStep = () => {
return (
<>
<RepositoryUnavailable />
{getState()?.values?.['file-system-configuration']?.find((mp) =>
mp.mountpoint.includes('/usr')
) && <UsrSubDirectoriesDisabled />}
<ExpandableSection
toggleContent={'Image output'}
onToggle={(_event, isExpandedImageOutput) =>

View file

@ -0,0 +1,19 @@
import React from 'react';
import { Alert } from '@patternfly/react-core';
const UsrSubDirectoriesDisabled = () => {
return (
<Alert
variant="warning"
title="Sub-directories for the /usr mount point are no longer supported"
isInline
>
Please note that including sub-directories in the /usr path is no longer
supported. Previously included mount points with /usr sub-directory are
replaced by /usr when recreating an image.
</Alert>
);
};
export default UsrSubDirectoriesDisabled;