diff options
author | Zuul <zuul@review.opendev.org> | 2023-02-20 15:27:21 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2023-02-20 15:27:21 +0000 |
commit | 3707422bf70af2926744f669b6447da8f2ec2d67 (patch) | |
tree | fa52f2d756ab72eb2a8f7fc1fa75b914949ca5a5 /ironic/drivers | |
parent | c130d063b69901193df5c0f023250ce2f4d822a6 (diff) | |
parent | c9c9b3100d3bd8983ca53a75c4a4e5f9c7f122b9 (diff) | |
download | ironic-3707422bf70af2926744f669b6447da8f2ec2d67.tar.gz |
Merge "Fixes console port conflict occurs in certain path"
Diffstat (limited to 'ironic/drivers')
-rw-r--r-- | ironic/drivers/modules/ipmitool.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ironic/drivers/modules/ipmitool.py b/ironic/drivers/modules/ipmitool.py index 87420f369..218f90a5c 100644 --- a/ironic/drivers/modules/ipmitool.py +++ b/ironic/drivers/modules/ipmitool.py @@ -1556,6 +1556,9 @@ class IPMIShellinaboxConsole(IPMIConsole): created :raises: ConsoleSubprocessFailed when invoking the subprocess failed """ + # Dealloc allocated port if any, so the same host can never has + # duplicated port. + _release_allocated_port(task) driver_info = _parse_driver_info(task.node) if not driver_info['port']: driver_info['port'] = _allocate_port(task) @@ -1611,6 +1614,9 @@ class IPMISocatConsole(IPMIConsole): created :raises: ConsoleSubprocessFailed when invoking the subprocess failed """ + # Dealloc allocated port if any, so the same host can never has + # duplicated port. + _release_allocated_port(task) driver_info = _parse_driver_info(task.node) if not driver_info['port']: driver_info['port'] = _allocate_port( |