Skip to content

Commit

Permalink
Merge pull request #2093 from upalatucci/remove-detach-namespace
Browse files Browse the repository at this point in the history
CNV-44420: Fix detach disk crash
  • Loading branch information
openshift-merge-bot[bot] authored Jul 23, 2024
2 parents 7bb67ad + 4831a5a commit d2baec5
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,7 @@ const DiskRowActions: FC<DiskRowActionsProps> = ({ diskName }) => {
submitBtnText={deleteBtnText}
submitBtnVariant={ButtonVariant.danger}
>
<ConfirmActionMessage
action="detach"
obj={{ metadata: { name: diskName, namespace: vm?.metadata?.namespace } }}
/>
<ConfirmActionMessage action="detach" obj={{ metadata: { name: diskName } }} />
</TabModal>
));
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,7 @@ const DiskRowActions: FC<DiskRowActionsProps> = ({ diskName, isDisabled, onUpdat
submitBtnText={deleteBtnText}
submitBtnVariant={ButtonVariant.danger}
>
<ConfirmActionMessage
action="detach"
obj={{ metadata: { name: diskName, namespace: vm?.metadata?.namespace } }}
/>
<ConfirmActionMessage action="detach" obj={{ metadata: { name: diskName } }} />
</TabModal>
));
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ const DeleteDiskModal: FC<DeleteDiskModalProps> = ({ isOpen, onClose, vm, volume
<StackItem>
<ConfirmActionMessage
obj={{
metadata: { name: diskName, namespace: updatedVirtualMachine?.metadata?.namespace },
metadata: { name: diskName },
}}
action="detach"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ const useVolumeOwnedResource: UseVolumeOwnedResource = (vm, volume) => {
volumeGroupVersionKind && volumeResourceName && watchVolumeResource,
);

volumeResourceModel.verbs;
if (!volumeResourceModel || !volumeResourceName) {
return {
error: error || isCdiConfigError,
Expand Down

0 comments on commit d2baec5

Please sign in to comment.