Skip to content

Add RPC to elevate role of core-apps if required #161

@tiyash-basu-frequenz

Description

@tiyash-basu-frequenz

What's needed?

We may need a way to change the role of core-apps dynamically without requiring system downtime or manual intervention. A role elevation may be required in the future to set bounds on certain metrics, or to be able to execute certain RPCs (like start and stop).

This will act as a loose safeguard against clients accidentally/unintentionally setting bounds on critical metrics, and /or calling methods that could move a component to an unwanted state.

Proposed solution

This could be done using the following RPC:

service Microgrid {
...
  rpc AlterAppRole(AlterAppRoleRequest) returns (AlterAppRoleResponse);
...
}

message AlterAppRoleRequest {
  enum Role {
    ROLE_UNKNOWN = 0;
    ROLE_STANDARD = 1;
    ROLE_CORE = 2;
  }

  Role role = 1;
}

message AlterAppRoleResponse {
  enum RoleAlterStatus {
    ROLE_ALTER_STATUS_UNKNOWN = 0;
    ROLE_ALTER_STATUS_SUCCESS = 1;
    ROLE_ALTER_STATUS_FAILURE = 2;
  }

  RoleAlterStatus status = 1;
  google.protobuf.Timestamp valid_until_ts = 2;
}

This could also be done using proper authorization and authentication mechanisms to ensure that only authorized services/users can call this RPC.

Use cases

No response

Alternatives and workarounds

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    part:❓We need to figure out which part is affectedpriority:❓We need to figure out how soon this should be addressedstatus:blockedOther issues must be resolved before this can be worked ontype:enhancementNew feature or enhancement visitble to users

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions