Skip to content

Commit

Permalink
[NEXMANAGE-430] Fixed Ping completed but cloudadapter shows error (#531)
Browse files Browse the repository at this point in the history
message

Since the INBS ping request doesn't reach dispatcher, the cloudadapter
will skip the checks for dispatcher state if it's a INBS ping request.

Signed-off-by: yengliong <[email protected]>
  • Loading branch information
yengliong93 authored Jul 31, 2024
1 parent 7d9c222 commit 98808aa
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions inbm/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Fixed some Yocto issues found after migrating to scarthgap
- (NEXARL-195) Fixed device tree detection check on systems that implement only part of device tree
- (NEXARL-279) Fixed system would not be able to access secret volume after fwupd on Arrow Lake platform
- (NEXMANAGE-430) Fixed Ping completed but cloudadapter shows error message

### Security
- Bump requests from 2.31.0 to 2.32.2 in multiple agents resolving detected 3rd party CVE: CVE-2024-35195
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,9 @@ def _handle_inbm_command_request(

request_id = item.request_id
logger.debug(f"Processing gRPC request: request_id {request_id}")
command_type = item.command.WhichOneof("inbm_command")

if self.get_dispatcher_state() == DEAD:
if self.get_dispatcher_state() == DEAD and command_type != "ping":
logger.error(
f"Dispatcher not in running state. Unable to process request - {request_id}"
)
Expand All @@ -175,7 +176,7 @@ def _handle_inbm_command_request(
)
continue

command_type = item.command.WhichOneof("inbm_command")

if command_type:
if command_type == "update_scheduled_operations":
# Convert operations to Dispatcher's ScheduleRequest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def test_handle_command_when_dispatcher_is_not_up(self, inbs_client: InbsCloudCl

# Construct command using parameters
command = inbs_sb_pb2.HandleINBMCommandRequest(
request_id="123", command=inbs_sb_pb2.INBMCommand(ping=inbs_sb_pb2.Ping())
request_id="123", command=inbs_sb_pb2.INBMCommand(update_scheduled_operations=inbs_sb_pb2.UpdateScheduledOperations())
)
request_queue.put(command)
request_queue.put(None) # Sentinel to end the generator
Expand Down

0 comments on commit 98808aa

Please sign in to comment.