webui-vue
webui-vue copied to clipboard
Server power operations page is not updated correctly
Describe the bug Do power operation from WebUI's Server power operations page will have the selected operation executed and change to the information page "There are no options to display ...". However, the page is stuck on this without returning to the normal page. Click on the Refresh button or click to other page and then return this page do not help. Can only go back to the normal page with the browser's Reload.
To Reproduce Steps to reproduce the behavior:
- Go to BMC WebUI by entering https://BMC_IP and then login with root/0penBMC
- Click on Operations -> Server power operations.
- Click on Reboot server -> "Immediate – Server reboots without operating system shutting down; may cause data corruption"
- Click on Reboot button -> click Confirm
- See below message
There are no options to display while a power operation is in progress. When complete, power operations will be displayed here.
- Wait a minute or more to have the Host rebooted.
- Click on the Refresh button --> nothing happens, still stuck on the message at step 5.
- Change to Operations -> Firmware page.
- Change back to Operations -> Server power operations --> still displays message at step 5.
Expected behavior at step 7 and 10, Operations page has options for Host power control
Screenshots
- Expected page:
- Current page (at step 7 and step 10):
Desktop (please complete the following information):
- OS: Mac OS Ventura 13.2.1
- Browser: Firefox 110.0.1
I've also observed this issue. Don't know the real reason for this, but I've found out that adding rest=enabled
option to bmcweb helps to mitigate this issue
recipes-phosphor/interfaces/bmcweb_%.bbappend
EXTRA_OEMESON:append = "\
-Drest=enabled \
"
Hope this can help to track the real problem.
I solved the problem by replace setTimeout() by setInterval() function to after the interval of 5 seconds time, then repeating continuously at that interval until serverStatus value matches the passed argument then Stop watching status changes and resolving Promise: This change code:
+++ b/src/store/modules/Operations/ControlStore.js
@@ -4,24 +4,27 @@ import i18n from '@/i18n';
const checkForServerStatus = function (serverStatus) {
return new Promise((resolve) => {
- const timer = setTimeout(() => {
+ const timer = setInterval(() => {
+ this.dispatch('global/getSystemInfo');
resolve();
unwatch();
- }, 300000 /*5mins*/);
+ }, 5000); /*5seconds*/
const unwatch = this.watch(
(state) => state.global.serverStatus,
(value) => {
if (value === serverStatus) {
resolve();
unwatch();
- clearTimeout(timer);
+ clearInterval(timer);
}
}
);
Any better suggestions for the above change?
can you explain why setTimeout does not work, @HuyLeAnh?
I found the explanation about setTimeout vs setInterval at https://www.educba.com/settimeout-vs-setinterval/
Hi,
Will this part be merged into master code?
In this page, "Refresh" button seems not work. Will this commit resolve the problem? Only F5 could update server state status.
@awan119 Can you check with patch found in Gerrit -review: https://gerrit.openbmc.org/c/openbmc/webui-vue/+/64481
@awan119 This commit does not resolve the "Refresh" problem. The strange thing is that webui-vue sends /redfish/v1/Systems/system request but does not use it to update the webui.
@awan119 This commit does not resolve the "Refresh" problem. The strange thing is that webui-vue sends /redfish/v1/Systems/system request but does not use it to update the webui.
Hi Kees,
I put getSystemInfo
here to let update works :
src/views/Operations/ServerPowerOperations/ServerPowerOperations.vue
Promise.all([
this.$store.dispatch('serverBootSettings/getBootSettings'),
this.$store.dispatch('controls/getLastPowerOperationTime'),
this.$store.dispatch('global/getSystemInfo'), <-- HERE!
bootSettingsPromise,
]).finally(() => this.endLoader());