1) Please find attached unit-ceph-osd-1.log.gz * line 59-60 show: """ 2020-06-16 16:31:44 INFO juju.cmd.jujud agent.go:138 setting logging config to "=WARNING" 2020-06-16 16:33:12 ERROR juju.worker.uniter.operation runhook.go:136 hook "install" (via explicit, bespoke hook script) failed: exit status 1 """ * line 230 and on show: """ 2020-06-17 08:34:08 DEBUG juju.cmd supercommand.go:92 args: []string{"/var/lib/juju/tools/unit-ceph-osd-1/jujud", "unit", "--data-dir", "/var/lib/juju", "--unit-name", "ceph-osd/1", "--debug"} 2020-06-17 08:34:08 DEBUG juju.agent agent.go:575 read agent config, format "2.0" 2020-06-17 08:34:08 INFO juju.cmd.jujud agent.go:138 setting logging config to "=WARNING" 2020-06-17 08:34:54 ERROR juju.worker.uniter.operation runhook.go:136 hook "install" (via explicit, bespoke hook script) failed: exit status 1 2020-06-17 08:36:36 DEBUG install E: dpkg was interrupted, you must manually run 'dpkg --configure -a' to correct the problem. 2020-06-17 08:36:36 INFO juju-log Couldn't acquire DPKG lock. Will retry in 10 seconds 2020-06-17 08:36:46 DEBUG install E: dpkg was interrupted, you must manually run 'dpkg --configure -a' to correct the problem. 2020-06-17 08:36:46 DEBUG install Traceback (most recent call last): 2020-06-17 08:36:46 DEBUG install File "/var/lib/juju/agents/unit-ceph-osd-1/charm/hooks/install.real", line 878, in 2020-06-17 08:36:46 DEBUG install hooks.execute(sys.argv) 2020-06-17 08:36:46 DEBUG install File "/var/lib/juju/agents/unit-ceph-osd-1/charm/hooks/charmhelpers/core/hookenv.py", line 943, in execute 2020-06-17 08:36:46 DEBUG install self._hooks[hook_name]() 2020-06-17 08:36:46 DEBUG install File "/var/lib/juju/agents/unit-ceph-osd-1/charm/hooks/charmhelpers/contrib/hardening/harden.py", line 93, in _harden_inner2 2020-06-17 08:36:46 DEBUG install return f(*args, **kwargs) 2020-06-17 08:36:46 DEBUG install File "/var/lib/juju/agents/unit-ceph-osd-1/charm/hooks/install.real", line 317, in install 2020-06-17 08:36:46 DEBUG install apt_install(packages=ceph.determine_packages(), fatal=True) 2020-06-17 08:36:46 DEBUG install File "/var/lib/juju/agents/unit-ceph-osd-1/charm/hooks/charmhelpers/fetch/ubuntu.py", line 276, in apt_install 2020-06-17 08:36:46 DEBUG install _run_apt_command(cmd, fatal) 2020-06-17 08:36:46 DEBUG install File "/var/lib/juju/agents/unit-ceph-osd-1/charm/hooks/charmhelpers/fetch/ubuntu.py", line 768, in _run_apt_command 2020-06-17 08:36:46 DEBUG install _run_with_retries( 2020-06-17 08:36:46 DEBUG install File "/var/lib/juju/agents/unit-ceph-osd-1/charm/hooks/charmhelpers/fetch/ubuntu.py", line 748, in _run_with_retries 2020-06-17 08:36:46 DEBUG install result = subprocess.check_call(cmd, env=env) 2020-06-17 08:36:46 DEBUG install File "/usr/lib/python3.8/subprocess.py", line 364, in check_call 2020-06-17 08:36:46 DEBUG install raise CalledProcessError(retcode, cmd) 2020-06-17 08:36:46 DEBUG install subprocess.CalledProcessError: Command '['apt-get', '--assume-yes', '--option=Dpkg::Options::=--force-confold', 'install', 'ceph', 'gdisk', 'radosgw', 'xfsprogs', 'lvm2', 'parted', 'smartmontools', 'btrfs-progs']' returned non-zero exit status 100. 2020-06-17 08:36:46 ERROR juju.worker.uniter.operation runhook.go:136 hook "install" (via explicit, bespoke hook script) failed: exit status 1 """ 2) the install hook calls charmhelpers' fetch.apt_install with fatal=True 2.1) apt_install calls _run_apt_command [1] 2.2) since fatal=True, it calls _run_with_retries[2], which uses hookenv.log with default LEVEL. 2.3) If the number of retries (3) matches, subprocess.CallProcessError is raised (see also [2]) 3) juju-log's default is INFO [3] (line 84), when "-l LEVEL" is not specified. 4) Juju model-config's default logging-config is "=WARNING" (when not specified and JUJU_LOGGING_CONFIG envvar is not set). See [4][5]. 5) Error is logged by Juju's runhook.go Execute function [6] I think this is not a bug in charm-ceph-osd but in Juju. Juju should raise exception as "ERROR" and not "DEBUG". * References 1. https://github.com/juju/charm-helpers/blob/4b3602e2bdf101bf58cc808264ec0c8092a67cd0/charmhelpers/fetch/ubuntu.py#L758 2. https://github.com/juju/charm-helpers/blob/4b3602e2bdf101bf58cc808264ec0c8092a67cd0/charmhelpers/fetch/ubuntu.py#L717 3. https://github.com/juju/juju/blob/23a617d450feeabb7f1bbec9352c345c1139bbdc/worker/uniter/runner/jujuc/juju-log.go#L78 4. https://github.com/juju/loggo/blob/6e530bcce5d8e1b51b8e5ee7f08a455cd0a8c2e5/global.go#L10,L27 5. https://github.com/juju/loggo/blob/6e530bcce5d8e1b51b8e5ee7f08a455cd0a8c2e5/context.go#L28 6. https://github.com/juju/juju/blob/23a617d450feeabb7f1bbec9352c345c1139bbdc/worker/uniter/operation/runhook.go#L136