Use correct iscsi portal port in continue_deploy
We should set it to CONF.iscsi.portal_port by default. Closes-Bug: #1585731 Change-Id: I34e1f2ff842b323fb390f16cca32309fb64cfea3
This commit is contained in:
parent
981223fcf1
commit
cc54cea060
@ -202,7 +202,7 @@ def get_deploy_info(node, **kwargs):
|
||||
|
||||
params = {
|
||||
'address': kwargs.get('address'),
|
||||
'port': kwargs.get('port', '3260'),
|
||||
'port': kwargs.get('port', CONF.iscsi.portal_port),
|
||||
'iqn': kwargs.get('iqn'),
|
||||
'lun': kwargs.get('lun', '1'),
|
||||
'image_path': _get_image_file_path(node.uuid),
|
||||
|
@ -499,6 +499,11 @@ class IscsiDeployMethodsTestCase(db_base.DbTestCase):
|
||||
ret_val = self._test_get_deploy_info()
|
||||
self.assertNotIn('disk_label', ret_val)
|
||||
|
||||
def test_get_deploy_info_portal_port(self):
|
||||
self.config(portal_port=3266, group='iscsi')
|
||||
ret_val = self._test_get_deploy_info()
|
||||
self.assertEqual(3266, ret_val['port'])
|
||||
|
||||
@mock.patch.object(iscsi_deploy, 'continue_deploy', autospec=True)
|
||||
@mock.patch.object(iscsi_deploy, 'build_deploy_ramdisk_options',
|
||||
autospec=True)
|
||||
|
4
releasenotes/notes/fix-get-deploy-info-port.yaml
Normal file
4
releasenotes/notes/fix-get-deploy-info-port.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
---
|
||||
fixes:
|
||||
- Fixed the default value of 'port' in iscsi_deploy.get_deploy_info to be set
|
||||
to [iscsi]/portal_port option value, instead of hardcoding it to '3260'.
|
Loading…
Reference in New Issue
Block a user