esunar / test4

GNU General Public License v3.0
0 stars 0 forks source link

Incorrect logrotated charm name in canonical-rules.yaml #223

Closed esunar closed 1 year ago

esunar commented 1 year ago

/snap/juju-lint/current/contrib/canonical-rules.yaml defines logrotate charm, instead of logrotated -- note missing 'd'.

84 hw-health: 85 where: host only 86 logrotate: <--- HERE 87 where: all 88 89 operations mandatory: &operations-mandatory-charms 90 - elasticsearch

As a result, juju-lint reports false-positive about missing logrotated relations:

2021-01-27 08:25:53 [ERROR] [/tmp/juju_status.json] [manual/manual] -> logrotate [aodh, barbican, ceilometer, ceph-mon, ceph-osd, ceph-radosgw, cinder, designate, designate-bind, easyrsa, etcd, glance, gnocchi, heat, keystone, memcached, mysql-innodb-cluster, neutron-api, nova-cloud-controller, nova-compute, octa via, openstack-dashboard, openstack-service-checks, placement, prometheus-ceph-exporter, prometheus-openstack-exporter, rabbitmq-server, ubuntu, vault]

$ snap info juju-lint | grep installed installed: 1.0.2.dev7+g39fd901 (25) 13MB classic


Imported from Launchpad using lp2gh.

esunar commented 1 year ago

(by phausman) Workaround:

  1. Create a copy of /snap/juju-lint/current/contrib/canonical-rules.yaml in ~/
  2. Rename logrotate to logrotated in ~/canonical-rules.yaml
  3. Run juju-lint with patched rules file, e.g.:
juju-lint -c ~/canonical-rules.yaml -t openstack /tmp/juju_status.json
esunar commented 1 year ago

(by vlgrevtsev) Hi,

Running 1.0.2.dev21+g438991c snap and still seeing this.

$ grep logrotate /snap/juju-lint/current/contrib/canonical-rules.yaml logrotate:

and, despite my model has logrotateD deployed:

$ juju status mysql | grep logrotat logrotated active 3 logrotated jujucharms 3 ubuntu logrotated/4 active idle 62.217.87.91 Unit is ready. logrotated/7 active idle 62.217.87.81 Unit is ready. logrotated/5 active idle 62.217.87.95 Unit is ready.

juju-lint is still complaining, because it expects logrotate (without D) to be present:

2021-02-24 08:35:47 [ERROR] [/tmp/juju-status.json] [manual/manual] -> logrotate [aodh, ceilometer, ceph-mon, ceph-osd, ceph-radosgw, cinder, controller-node-stub, designate, designate-bind, easyrsa, etcd, glance, glance-simplestreams-sync, gnocchi, heat, keystone, memcached, mysql, neutron-api, nova-cloud-controller, nova-compute, nova-compute-fat, nova-compute-gpu, nova-compute-io, openstack-dashboard, openstack-service-checks, placement, prometheus-ceph-exporter, prometheus-openstack-exporter, rabbitmq-server, vault]

esunar commented 1 year ago

(by jfguedez) Looks like due to a series of merges the fix was essentially reverted - https://git.launchpad.net/juju-lint/tree/contrib/canonical-rules.yaml#n91

Will create a new MP to bring it back