Skip to content

Commit

Permalink
Issue 323
Browse files Browse the repository at this point in the history
ceph-nvmeof-nvmeof-1  |   File "/src/control/discovery.py", line 873, in _state_notify_update
ceph-nvmeof-nvmeof-1  |     async_reply.dword0 =  b'\x02\xf0\x70\x00'
ceph-nvmeof-nvmeof-1  | TypeError: an integer is required (got type bytes)

Signed-off-by: Alexander Indenbaum <[email protected]>
  • Loading branch information
Alexander Indenbaum committed Nov 19, 2023
1 parent 2616e5f commit 5f8dba2
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions control/discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -865,14 +865,19 @@ def _state_notify_update(self, update, is_add_req):

for key in list(self.conn_vals.keys()):
if self.conn_vals[key].recv_async is True:
pdu_reply = Pdu()
pdu_reply.type = NVME_TCP_PDU.RSP
pdu_reply.header_length = 24
pdu_reply.packet_length = 24

async_reply = CqeNVMe()
# async_event_type:0x2 async_event_info:0xf0 log_page_identifier:0x70
async_reply.dword0 = b'\x02\xf0\x70\x00'
async_reply.dword0 = int.from_bytes(b'\x02\xf0\x70\x00', byteorder='little')
async_reply.sq_head_ptr = self.conn_vals[key].sq_head_ptr
async_reply.cmd_id = self.conn_vals[key].async_cmd_id

try:
self.conn_vals[key].connection.sendall(async_reply)
self.conn_vals[key].connection.sendall(pdu_reply + async_reply)
except BrokenPipeError:
self.logger.error("client disconnected unexpectedly.")
return -1
Expand Down

0 comments on commit 5f8dba2

Please sign in to comment.