Redfish power mode not working - MAAS 3.4.1

Facing an issue with Redfish power mode selection in MaaS:

After setting Redfish as the power mode, encountered the following error when try to power on the machine:

/var/log/maas/regiond.log

2024-05-08 14:41:47 maasserver.websockets.handlers.machine: [error] Bulk action (on) for c6tcrm failed: on action is not available for this node.

Although the Redfish API has been tested and confirmed to be functional.
Any insights or ideas on resolving this issue would be appreciated.

Hi @acetoken1

Did you try powering on your machine from the machine details page (not the list view)?

There is logic that doesn’t allow you to run certain bulk actions

def _bulk_action(self, filter_params, action_name, extra_params):
    """Find nodes that match the filter, then apply the given action to them."""
    machines = self._filter(
        self.get_queryset(for_list=True), None, filter_params
    )
    success_count = 0
    failed_system_ids = []
    failure_details = defaultdict(list)
    for machine in machines:
        try:
            self._action(machine, action_name, extra_params)
        except NodeActionError as e:
            failed_system_ids.append(machine.system_id)
            failure_details[str(e)].append(machine.system_id)
            log.error(
                f"Bulk action ({action_name}) for {machine.system_id} failed: {e}"
            )
        else:
            success_count += 1
     return success_count, failed_system_ids, failure_details

I do it from the machine page:
selected the machine and then Power Cycle>Power On…

from the list view i cannot do it:
immagine

Sorry, I was talking about machine details/summary view:

i cannot do it neither from that view:

Does it need to function even before the machine is commissioned? Is that correct?
Redfish has its own API.

Oh, you have your machine in the status New, in that case it won’t work.

https://git.launchpad.net/maas/tree/src/maasserver/node_action.py

class PowerOn(NodeAction):
    """Power on a node."""

    name = "on"
    display = "Power on..."
    display_sentence = "powered on"
    actionable_statuses = (
        NODE_STATUS.DEPLOYING,
        NODE_STATUS.DEPLOYED,
        NODE_STATUS.BROKEN,
    )
1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.