Skip to content

Commit

Permalink
fix(LVHDoISCSISR): disable restart of ISCSI daemon
Browse files Browse the repository at this point in the history
Signed-off-by: Ronan Abhamon <[email protected]>
  • Loading branch information
Wescoeur committed Apr 29, 2024
1 parent 2c50709 commit 7238799
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/LVHDoISCSISR.py
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,8 @@ def probe(self):
return out

def check_sr(self, sr_uuid):
# Disable to prevent daemon restart.
return
"""Hook to check SR health"""
pbdref = util.find_my_pbd(self.session, self.host_ref, self.sr_ref)
if pbdref:
Expand Down
3 changes: 3 additions & 0 deletions tests/test_LVHDoISCSISR.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ def create_test_sr(self, sr_cmd):
self.subject = LVHDoISCSISR.LVHDoISCSISR(
sr_cmd, self.sr_uuid)

@unittest.skip('check_sr disabled')
def test_check_sr_pbd_not_found(self):
# Arrange
self.mock_util.find_my_pbd.return_value = None
Expand All @@ -211,6 +212,7 @@ def test_check_sr_pbd_not_found(self):
self.mock_util.find_my_pbd.assert_called_with(
self.mock_session, 'test_host', 'sr_ref')

@unittest.skip('check_sr disabled')
def test_check_sr_correct_sessions_count(self):
# Arrange
self.mock_util.find_my_pbd.return_value = 'my_pbd'
Expand All @@ -225,6 +227,7 @@ def test_check_sr_correct_sessions_count(self):
# Assert
self.mock_session.xenapi.PBD.get_other_config.assert_called_with('my_pbd')

@unittest.skip('check_sr disabled')
def test_check_sr_not_enough_sessions(self):
# Arrange
self.mock_util.find_my_pbd.return_value = 'my_pbd'
Expand Down

0 comments on commit 7238799

Please sign in to comment.