Bug 1918116 - [machines] The "Shut down" button will be always grey if clicking "Shut down" when the VM is not completely started
Summary: [machines] The "Shut down" button will be always grey if clicking "Shut down"...
Keywords:
Status: NEW
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: cockpit-appstream
Version: 8.4
Hardware: x86_64
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Simon Kobyda
QA Contact: YunmingYang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-01-20 05:38 UTC by YunmingYang
Modified: 2023-08-16 11:54 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-08-16 07:28:33 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description YunmingYang 2021-01-20 05:38:47 UTC
Description of problem:
Create a shutoff VM and run it. Then click "Shut down" button immediately(The VM is not completely started).The "Shut down" button will be always grey until refreshing or switching to another page and switching back 

Version-Release number of selected components (if applicable):
cockpit-234-1.el8.x86_64
cockpit-machines-235-1.el8.noarch
libvirt-dbus-1.3.0-2.module+el8.3.0+6423+e4cb6418.x86_64

How reproducible:
100%

Steps to Reproduce:
1 Create a shutoff VM
2 Click "Run"
3 Click "Shut down" immediately after step 2

Actual results:
1 The "Shut down" button will be always grey until refreshing or switching to another page and switching back 

Expected results: 
1 Maybe we can add timeout error, which is like "timeout when getting result from libvirt, please check whether the operation is taking effect"

Additional info:

Comment 1 Katerina Koukiou 2021-01-21 15:28:32 UTC
Quoting the RHEL Virtualization docs: 

`... executing a virsh shutdown command causes a power button ACPI event to be sent, thus copying the same action as when someone presses a power button on a physical machine. Within every physical machine, it is up to the OS to handle this event.`

So in order for the shutdown command to work,the operating system has to be responsive. If you click 'Shut down' immediately after 'Run' as you specify in the steps, you are probably clicking while the grub boot loader dialog is still active. At that point, the signal will be sent, the button will be disabled and the spinner shown. The UI will wait for a VM state change, which will never happen.

As you mention we can add a timeout for this specific or generally all lifecycle operations.

Comment 2 Simon Kobyda 2022-01-28 13:59:44 UTC
I'm thinking that adding a general timeout is good idea. Since this kind of situation can happen also when VM is frozen, which in that case that would be a bug to just show button spinning indefinitely

Comment 4 RHEL Program Management 2022-07-20 07:27:54 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.

Comment 7 RHEL Program Management 2023-01-20 07:27:39 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.

Comment 10 RHEL Program Management 2023-08-16 07:28:33 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.


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