Bug 2150364 - Deletion of VM deletes referenced secret
Summary: Deletion of VM deletes referenced secret
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: User Experience
Version: 4.11.1
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 4.13.0
Assignee: Ugo Palatucci
QA Contact: Guohua Ouyang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-12-02 17:19 UTC by Dominik Holler
Modified: 2023-05-18 02:56 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-05-18 02:55:56 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github kubevirt-ui kubevirt-plugin pull 1074 0 None open Bug 2150364: External Secret should not have vm as owner 2023-02-22 15:21:55 UTC
Red Hat Bugzilla 2096780 0 medium CLOSED [RFE] Add ssh-key and sysprep to template scripts tab 2023-01-24 13:41:12 UTC
Red Hat Issue Tracker CNV-23081 0 None None None 2022-12-02 17:21:48 UTC
Red Hat Product Errata RHSA-2023:3205 0 None None None 2023-05-18 02:56:05 UTC

Description Dominik Holler 2022-12-02 17:19:21 UTC
Description of problem: The Edit Authorized SSH Key adds an owner reference to an existing secret, and the existing secret is deleted durng the VM deletion. 


Version-Release number of selected component (if applicable):
4.11

How reproducible:
100%

Steps to Reproduce:
1. Quick create VirtualMachine but not start after creation
2. Edit Authorized SSH Key in Scripts tab of the previously created VM 
3. Attach a previously created existing secret.
4. Delete VM


Actual results:
Step 3 sets the owner reference of the secret to the VM, and step 4 deletes the secret.

Expected results:
Only secrets created by the Edit Authorized SSH Key dialog are deleted during VM deletion. 

Additional info:

Comment 1 Guohua Ouyang 2022-12-05 02:13:20 UTC
The issue happens on 4.12 as well:
1. the issue is not happened if attaching an existing secret in VM scripts tab during VM creation
2. the issue is happened by attaching an existing secret in VM scripts tab after the VM is created

Comment 5 errata-xmlrpc 2023-05-18 02:55:56 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: OpenShift Virtualization 4.13.0 Images security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2023:3205


Note You need to log in before you can comment on or make changes to this bug.