RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2180281 - [RFE][Machines] Allow to confirm before shut down or reboot a vm
Summary: [RFE][Machines] Allow to confirm before shut down or reboot a vm
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: cockpit-machines
Version: 9.2
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: rc
: 9.3
Assignee: Nobody
QA Contact: Xianghua Chen
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-03-21 06:08 UTC by Xianghua Chen
Modified: 2023-11-07 09:06 UTC (History)
10 users (show)

Fixed In Version: cockpit-machines-293-1.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-11-07 08:24:46 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)
Force shut down (246.78 KB, image/png)
2023-03-21 06:08 UTC, Xianghua Chen
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github cockpit-project cockpit-machines pull 1069 0 None Draft Confirmation dialog for VM shutdown, forceoff, reboot and non-maskable interrupt 2023-05-09 06:21:22 UTC
Red Hat Issue Tracker RHELPLAN-152520 0 None None None 2023-03-21 06:09:04 UTC
Red Hat Product Errata RHBA-2023:6336 0 None None None 2023-11-07 08:24:59 UTC

Description Xianghua Chen 2023-03-21 06:08:05 UTC
Created attachment 1952264 [details]
Force shut down

Description of problem:
[RFE][Machines] Allow to confirm before shut down or reboot vm (Can provide choice like : "Don't ask again")

This is a requirement from real customer in financial field with RHEL8 system, shutdown by mistake would cause huge problem , a confirmation dialog will lower the risk. 

How reproducible:
100%

Steps to Reproduce:
1. Prepare a running VM
2. Click "Shut down" or "Force shut down" or "Reboot" or "Force reboot"
A confirmation dialog with choice "Don't ask again" is expected.


Actual results:
As above.

Expected results:
As above.

Additional info:
For virt-manager, it has confirmation for "Force shut down" and "Force reboot". Refer to the attachment. Better to have it for shut down and reboot too.

Comment 3 Garrett LeSage 2023-03-27 16:54:41 UTC
I've started the conversation about this on GitHub @ https://github.com/cockpit-project/cockpit-machines/issues/994

Quick summary: The thought right now is to have confirmation prompts for force shutdowns and force reboots, and tie in something called "precious" that prevents deletion to also prompt for normal shutdowns and reboots. It's currently in the discussion phase on how it could be implemented.

Comment 9 Simon Kobyda 2023-05-15 13:28:35 UTC
Upstream PR: https://github.com/cockpit-project/cockpit-machines/pull/1069

Comment 15 Xianghua Chen 2023-07-07 09:19:09 UTC
Verified with packages:
cockpit-machines-293-1.el9.noarch
cockpit-295-1.el9.x86_64
libvirt-dbus-1.4.1-5.el9.x86_64
libvirt-client-9.3.0-2.el9.x86_64

Steps:
1. Prepare a running VM, click "Force shut down"
There is dialog for user to confirm the action:
Force shut down $vm_name?
Uptime 3 minutes

Click "Force shut down", the vm will be closed after confirmation. 
Click "x" or Cancel, the dialog closed without any changes.

2. Run the VM, click "Shut down"
There is dialog for user to confirm the action:
Shut down $vm_name?
Uptime 3 minutes

Click "Shut down", the vm will be closed after confirmation. 
Click "Reboot", the vm will be reboot.
Click "x" or Cancel, the dialog closed without any changes.

3. Keep the VM running, click "Force reboot"
There is dialog for user to confirm the action:
Force reboot $vm_name?
Uptime 3 minutes

Click "Force reboot", the vm should be reboot after confirmation. 
Click "x" or Cancel, the dialog closed without any changes.

4. Keep the VM running, click "Reboot"
There is dialog for user to confirm the action:
Reboot $vm_name?
Uptime 3 minutes

Click "Force reboot", the vm should be reboot after confirmation. 
Click "x" or Cancel, the dialog closed without any changes.

The new feature is available now, but for "Reboot" and "Force reboot", the vm will be reboot immediatedly instead of user click reboot. 
I'll keep this one verified, file new bug for the reboot issue: 
https://bugzilla.redhat.com/show_bug.cgi?id=2221144

Comment 18 errata-xmlrpc 2023-11-07 08:24:46 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 (cockpit-machines 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/RHBA-2023:6336


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