1
0
mirror of https://github.com/CumulusNetworks/ifupdown2.git synced 2024-05-06 15:54:50 +00:00

lib: nlcache: fix dry_run exception

error: link_set_bridge_info_data_dry_run() takes exactly 3 arguments (4 given)
error: link_set_brport_with_info_slave_data_dry_run() got an unexpected keyword argument 'kind'

seems like when updating a method, it's associated dry-run method wasn't
updated accordingly. Maybe there is a way to programmatically check that
I will look into it.

warning: bridge: skipping port X invalid ether addr
warning: interface not recognized - please check interface configuration
Won't show on dry-run anymore

Log info for commands executed with utils.exec_command() weren't prefixed with
DRY-RUN.

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
This commit is contained in:
Julien Fortin
2020-02-19 15:50:27 +01:00
parent 393524ab41
commit ca45cd9e83
4 changed files with 7 additions and 6 deletions

View File

@@ -288,10 +288,11 @@ class utils():
@classmethod
def _log_command_exec(cls, cmd, stdin):
dry_run = "DRY-RUN: " if ifupdownflags.flags.DRYRUN else ""
if stdin:
cls.logger.info('executing %s [%s]' % (cmd, stdin))
cls.logger.info('%sexecuting %s [%s]' % (dry_run, cmd, stdin))
else:
cls.logger.info('executing %s' % cmd)
cls.logger.info('%sexecuting %s' % (dry_run, cmd))
@classmethod
def _format_error(cls, cmd, cmd_returncode, cmd_output, stdin):