Skip to content

WIP: Bmcshell acf-task tracker apis. #1303

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: 1120
Choose a base branch
from

Conversation

abhilashraju
Copy link
Contributor

For tracking the active bmc-shell acf tasks.
/redfish/v1/AccountService/acf/scripts/ lists all active bmc-shell acf task
/redfish/v1/AccountService/acf//cancel/ cancel the bmc-shell task corresponding to the parameter

Copy link
Contributor

@gtmills gtmills left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why can't we use standard Redfish tasks here?

@abhilashraju
Copy link
Contributor Author

Why can't we use standard Redfish tasks here?

Are you referring to a Redfish task? In this context, the "task" refers to a shell script job executed by acfshell. There can be multiple jobs running simultaneously on the system. Our goal is to list all currently running jobs upon user request and provide a way to cancel them. I don't believe Redfish tasks offer this functionality.

Signed-off-by: Abhilash Raju <abhilash.kollam@gmail.com>
@abhilashraju abhilashraju force-pushed the bmcshell_acf_tracker branch from f8a4de0 to 3493538 Compare June 2, 2025 05:46
{{"target",
std::format(
"/redfish/v1/AccountService/acf/{}/cancel",
script)}}}};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this can be explicitly specified (refer to https://github.com/openbmc/bmcweb/blob/master/COMMON_ERRORS.md#13-complete-replacement-of-the-response-object), and also use boost:urls::format()

              scriptJson["Actions"]["#AccountService.AcfScripts.Cancel"]["target"] =
                           boost::urls::format(
                               "/redfish/v1/AccountService/acf/{}/cancel",  script);

@@ -0,0 +1,89 @@
#pragma once
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

License statement?

// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: Copyright OpenBMC Authors

@gtmills
Copy link
Contributor

gtmills commented Jun 2, 2025

Our goal is to list all currently running jobs upon

All current running ACF jobs right? Why can't each of those be a task ?

and provide a way to cancel them

Redfish tasks can be canceled

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants