Closed esunar closed 1 year ago
(by arif-ali) This is an issue that I have with customer, and would like not to see this error. So would really like this merged if possible
(by gabor.meszaros) Actually this is not yet released. Current snap juju-lint is latest/stable: 1.1.dev7+g9c9a145 2020-06-08 (17) 13MB classic but that still doesn't have the mentioned fix merged.
(by arif-ali) Just double checked this on my machine to verify this
arif@arif-laptop:/snap/juju-lint/17/lib/python3.6/site-packages/jujulint$ snap list | grep juju-lint
juju-lint 1.1.dev7+g9c9a145 17 latest/stable stub classic
arif@arif-laptop:/snap/juju-lint/17/lib/python3.6/site-packages/jujulint$ grep lxd util.py
if "lxd/" in machine:
Currently, juju-lint supports physical hosts and lxd containers only. If a charm is deployed into kvm (e.g. 5/kvm/0), it is being treated as a lxd container, according to this code:
def is_container(machine): if "/" in machine: return True else: return False
As a result, the 'host only' directive does not apply to this charm.
Example: contrail-analytics charm is deployed into kvm: https://pastebin.ubuntu.com/p/kXyhYTqRqV/
Running juju-lint, it complains about ntp being found unexpectedly, where in fact, ntp should be present on kvm machine:
2019-04-04 11:46:51 [INFO] following subordinates where found unexpectedly: 2019-04-04 11:46:51 [ERROR] -> ntp [contrail-analytics]
Imported from Launchpad using lp2gh.
date created: 2019-04-04T12:09:24Z
owner: phausman
assignee: arif-ali
the launchpad url