Hi all,
The ceph-osd charm requires the mlocate package to be installed on Ubuntu but does not do this by default, which throws the following error (https://gist.github.com/CalvinHartwell/63b652c4286195659749588a12a2f39c):
unit-ceph-osd-2: 09:32:16 INFO unit.ceph-osd/2.juju-log Installing apparmor profile for ceph-osd
unit-ceph-osd-2: 09:32:17 INFO unit.ceph-osd/2.juju-log Installing apparmor utils.
unit-kubernetes-worker-0: 09:32:17 DEBUG unit.kubernetes-worker/0.update-status Error from server (NotFound): nodes "FROVHWORKERK8SDEV-N04" not found
unit-kubernetes-worker-0: 09:32:17 INFO unit.kubernetes-worker/0.juju-log Failed to apply label juju-application=kubernetes-worker. Will retry.
unit-kubernetes-worker-0: 09:32:18 DEBUG unit.kubernetes-worker/0.update-status Error from server (NotFound): nodes "FROVHWORKERK8SDEV-N04" not found
unit-ceph-osd-2: 09:32:18 INFO unit.ceph-osd/2.juju-log Setting up the apparmor profile for usr.bin.ceph-osd in disable mode.
unit-kubernetes-worker-0: 09:32:18 INFO unit.kubernetes-worker/0.juju-log Failed to apply label juju-application=kubernetes-worker. Will retry.
unit-ceph-osd-2: 09:32:19 DEBUG unit.ceph-osd/2.config-changed Disabling /etc/apparmor.d/usr.bin.ceph-osd.
unit-ceph-osd-2: 09:32:19 DEBUG unit.ceph-osd/2.config-changed
unit-ceph-osd-2: 09:32:19 DEBUG unit.ceph-osd/2.config-changed ERROR: /sbin/apparmor_parser: Unable to remove "/usr/bin/ceph-osd". Profile doesn't exist
unit-ceph-osd-2: 09:32:19 DEBUG unit.ceph-osd/2.config-changed
unit-ceph-osd-2: 09:32:19 INFO unit.ceph-osd/2.juju-log Manually disabling the apparmor profile for usr.bin.ceph-osd.
unit-ceph-osd-2: 09:32:19 DEBUG unit.ceph-osd/2.config-changed apparmor.service is not active, cannot reload.
unit-ceph-osd-2: 09:32:19 DEBUG unit.ceph-osd/2.config-changed Traceback (most recent call last):
unit-ceph-osd-2: 09:32:19 DEBUG unit.ceph-osd/2.config-changed File "/var/lib/juju/agents/unit-ceph-osd-2/charm/hooks/config-changed", line 559, in <module>
unit-ceph-osd-2: 09:32:19 DEBUG unit.ceph-osd/2.config-changed hooks.execute(sys.argv)
unit-ceph-osd-2: 09:32:19 DEBUG unit.ceph-osd/2.config-changed File "/var/lib/juju/agents/unit-ceph-osd-2/charm/hooks/charmhelpers/core/hookenv.py", line 800, in execute
unit-ceph-osd-2: 09:32:19 DEBUG unit.ceph-osd/2.config-changed self._hooks[hook_name]()
unit-ceph-osd-2: 09:32:19 DEBUG unit.ceph-osd/2.config-changed File "/var/lib/juju/agents/unit-ceph-osd-2/charm/hooks/charmhelpers/contrib/hardening/harden.py", line 79, in _harden_inner2
unit-ceph-osd-2: 09:32:19 DEBUG unit.ceph-osd/2.config-changed return f(*args, **kwargs)
unit-ceph-osd-2: 09:32:19 DEBUG unit.ceph-osd/2.config-changed File "/var/lib/juju/agents/unit-ceph-osd-2/charm/hooks/config-changed", line 367, in config_changed
unit-ceph-osd-2: 09:32:19 DEBUG unit.ceph-osd/2.config-changed add_to_updatedb_prunepath(STORAGE_MOUNT_PATH)
unit-ceph-osd-2: 09:32:19 DEBUG unit.ceph-osd/2.config-changed File "/var/lib/juju/agents/unit-ceph-osd-2/charm/hooks/charmhelpers/core/host.py", line 975, in add_to_updatedb_prunepath
unit-ceph-osd-2: 09:32:19 DEBUG unit.ceph-osd/2.config-changed with open(updatedb_path, 'r+') as f_id:
unit-ceph-osd-2: 09:32:19 DEBUG unit.ceph-osd/2.config-changed FileNotFoundError: [Errno 2] No such file or directory: '/etc/updatedb.conf'
Installing the mlocate package fixes this issue, I.E sudo apt-get install mlocate. This should be automated as part of the charm.
Thanks
Currently on customer-site, quick turn around appreciated.
Fix for now:
juju run --all -- sudo apt-get install mlocate