Page MenuHomeVyOS Platform

import-conf-mode-commands in vyos-1x/scripts fails to create an xml
Closed, ResolvedPublicBUG

Description

import-conf-mode-commands in vyos-1x/scripts fails to create an xml in some scenarios.

That happens when a directory type "node" doesn't contains a node.def

For example:

./vyos-1x/scripts/import-conf-mode-commands vyatta-netflow/templates-cfg/system
Creating a node from vyatta-netflow/templates-cfg/system/flow-accounting
Creating a leaf node from vyatta-netflow/templates-cfg/system/flow-accounting/buffer-size
Creating a leaf node from vyatta-netflow/templates-cfg/system/flow-accounting/interface
Creating a leaf node from vyatta-netflow/templates-cfg/system/flow-accounting/disable-imt
Creating a leaf node from vyatta-netflow/templates-cfg/system/flow-accounting/syslog-facility
Creating a node from vyatta-netflow/templates-cfg/system/flow-accounting/sflow
Creating a node from vyatta-netflow/templates-cfg/system/flow-accounting/sflow/server
Creating a node from vyatta-netflow/templates-cfg/system/flow-accounting/sflow/server/node.tag
Traceback (most recent call last):
  File "./vyos-1x/scripts/import-conf-mode-commands", line 233, in <module>
    walk(children, base_path, c)
  File "./vyos-1x/scripts/import-conf-mode-commands", line 211, in walk
    walk(children, next_level, d)
  File "./vyos-1x/scripts/import-conf-mode-commands", line 211, in walk
    walk(children, next_level, d)
  File "./vyos-1x/scripts/import-conf-mode-commands", line 211, in walk
    walk(children, next_level, d)
  File "./vyos-1x/scripts/import-conf-mode-commands", line 91, in walk
    with open(os.path.join(path, 'node.def'), 'r') as f:
FileNotFoundError: [Errno 2] No such file or directory: 'vyatta-netflow/templates-cfg/system/flow-accounting/sflow/server/node.tag/node.def'

Details

Difficulty level
Normal (likely a few hours)
Version
git branch current
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)

Event Timeline

elbuit changed the task status from Open to In progress.Dec 10 2019, 2:21 PM
elbuit changed Difficulty level from Unknown (require assessment) to Normal (likely a few hours).
elbuit edited projects, added VyOS 1.2 Crux (VyOS 1.2.4); removed VyOS 1.2 Crux.

Resolved in commit fa85664ba050dab99d18d5d05018eea6a0fb0879