2024-04-30 17:48:20 [INFO] [./metallb-system-bundle.yaml] Linting manual file...
Traceback (most recent call last):
File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/home/ubuntu/juju-lint/jujulint/cli.py", line 249, in <module>
main()
File "/home/ubuntu/juju-lint/jujulint/cli.py", line 241, in main
cli.audit_file(cli.manual_file, cloud_type=cli.cloud_type)
File "/home/ubuntu/juju-lint/jujulint/cli.py", line 157, in audit_file
linter.lint_yaml_file(filename)
File "/home/ubuntu/juju-lint/jujulint/lint.py", line 1396, in lint_yaml_file
return self.do_lint(parsed_yaml)
File "/home/ubuntu/juju-lint/jujulint/lint.py", line 1405, in do_lint
input_file = input_handler(parsed_yaml, applications)
File "/home/ubuntu/juju-lint/jujulint/model_input.py", line 395, in input_handler
machines_data=parsed_yaml["machines"],
KeyError: 'machines'
The same appears true for "juju status" output from container models; if I point juju-lint at juju status output for the same model, I get this error instead:
2024-04-30 17:48:21 [INFO] [./juju-status-metallb-system.yaml] Linting manual file...
Traceback (most recent call last):
File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/home/ubuntu/juju-lint/jujulint/cli.py", line 249, in <module>
main()
File "/home/ubuntu/juju-lint/jujulint/cli.py", line 241, in main
cli.audit_file(cli.manual_file, cloud_type=cli.cloud_type)
File "/home/ubuntu/juju-lint/jujulint/cli.py", line 157, in audit_file
linter.lint_yaml_file(filename)
File "/home/ubuntu/juju-lint/jujulint/lint.py", line 1396, in lint_yaml_file
return self.do_lint(parsed_yaml)
File "/home/ubuntu/juju-lint/jujulint/lint.py", line 1422, in do_lint
self.process_subordinates(parsed_yaml[applications][app], app)
File "/home/ubuntu/juju-lint/jujulint/lint.py", line 206, in process_subordinates
machine = app_d["units"][unit]["machine"]
KeyError: 'machine'
Simple example. Let's say you have a model export that looks like this:
This fails as follows:
The same appears true for "juju status" output from container models; if I point juju-lint at juju status output for the same model, I get this error instead: