summaryrefslogtreecommitdiff
path: root/ironic/common/pxe_utils.py
diff options
context:
space:
mode:
authorSteve Baker <sbaker@redhat.com>2021-11-26 09:57:21 +1300
committerSteve Baker <sbaker@redhat.com>2021-11-26 10:00:30 +1300
commit44ac5077969daec99324a690b180c33293aa8899 (patch)
tree715a1ff4679284443bf3a51c857ad4179b372d4b /ironic/common/pxe_utils.py
parent5d5d3e8c167a400e7bdfc02380e7022eb034b755 (diff)
downloadironic-44ac5077969daec99324a690b180c33293aa8899.tar.gz
Remove isfile check from place_loaders_for_boot
isfile will return False for reasons other than the file being missing (such as a permission denied due to /boot/efi being only root readable). Having the isfile check prevents the actual reason from being logged. This change removes the isfile check so that the error can be triggered and logged in the copy2 call. Change-Id: I1d855a7d7c97cabb83cdb3efc284a00bd65d4d5f
Diffstat (limited to 'ironic/common/pxe_utils.py')
-rw-r--r--ironic/common/pxe_utils.py7
1 files changed, 0 insertions, 7 deletions
diff --git a/ironic/common/pxe_utils.py b/ironic/common/pxe_utils.py
index a87de63d5..5ae5b3ae1 100644
--- a/ironic/common/pxe_utils.py
+++ b/ironic/common/pxe_utils.py
@@ -1266,13 +1266,6 @@ def place_loaders_for_boot(base_path):
raise exception.IncorrectConfiguration(msg)
full_dest = os.path.join(base_path, dest)
- if not os.path.isfile(src):
- msg = ('Was not able to find source path %(src)s '
- 'to copy to %(dest)s.' %
- {'src': src, 'dest': full_dest})
- LOG.error(msg)
- raise exception.IncorrectConfiguration(error=msg)
-
LOG.debug('Copying bootloader %(dest)s from %(src)s.',
{'src': src, 'dest': full_dest})
try: