charm-helpers icon indicating copy to clipboard operation
charm-helpers copied to clipboard

10periodic Extra junk at end of file Hangs Units

Open craigem opened this issue 6 years ago • 0 comments

When ubuntu.py (correctly) finds junk in /etc/apt/apt.conf.d/10periodic this hangs the unit:

2018-02-16 04:18:03 INFO update-status * memcached is running 2018-02-16 04:18:03 INFO juju-log Unit is ready 2018-02-16 04:18:04 INFO juju-log Application Version: 6.1.5 2018-02-16 04:23:04 INFO update-status Traceback (most recent call last): 2018-02-16 04:23:04 INFO update-status File "/var/lib/juju/agents/unit-ceilometer-agent-27/charm/hooks/update-status", line 49, in 2018-02-16 04:23:04 INFO update-status CONFIGS = register_configs() 2018-02-16 04:23:04 INFO update-status File "/var/lib/juju/agents/unit-ceilometer-agent-27/charm/hooks/ceilometer_utils.py", line 98, in register_configs 2018-02-16 04:23:04 INFO update-status release = get_os_codename_package('ceilometer-common', fatal=False)
2018-02-16 04:23:04 INFO update-status File "/var/lib/juju/agents/unit-ceilometer-agent-27/charm/hooks/charmhelpers/contrib/openstack/utils.py", line 339, in get_os_codename_package 2018-02-16 04:23:04 INFO update-status cache = apt_cache() 2018-02-16 04:23:04 INFO update-status File "/var/lib/juju/agents/unit-ceilometer-agent-27/charm/hooks/charmhelpers/fetch/ubuntu.py", line 140, in apt_cache 2018-02-16 04:23:04 INFO update-status from apt import apt_pkg 2018-02-16 04:23:04 INFO update-status File "/usr/lib/python2.7/dist-packages/apt/init.py", line 34, in 2018-02-16 04:23:04 INFO update-status apt_pkg.init_config() 2018-02-16 04:23:04 INFO update-status SystemError: E:Syntax error /etc/apt/apt.conf.d/10periodic:2: Extra junk at end of file 2018-02-16 04:23:04 ERROR juju.worker.uniter.operation runhook.go:107 hook "update-status" failed: exit status 1

In these cases (plural is correct), where the issue with 10periodic was transient, the unit does not run again until prompted manually, such as by "juju resolved -r ceilometer-agent/27" in the above example, and the error state is cleared and the unit returns to normal function without further intervention:

8-02-16 04:23:04 INFO update-status SystemError: E:Syntax error /etc/apt/apt.conf.d/10periodic:2: Extra junk at end of file 2018-02-16 04:23:04 ERROR juju.worker.uniter.operation runhook.go:107 hook "update-status" failed: exit status 1 2018-03-07 02:06:58 INFO juju-log Registered config file: /etc/ceilometer/ceilometer.conf 2018-03-07 02:06:58 INFO juju-log Registered config file: /etc/memcached.conf 2018-03-07 02:07:04 INFO juju-log Unit is ready 2018-03-07 02:07:06 INFO juju-log Application Version: 6.1.5 2018-03-07 02:12:13 INFO juju-log Registered config file: /etc/ceilometer/ceilometer.conf 2018-03-07 02:12:13 INFO juju-log Registered config file: /etc/memcached.conf 2018-03-07 02:12:20 INFO update-status * memcached is running 2018-03-07 02:12:20 INFO juju-log Unit is ready 2018-03-07 02:12:22 INFO juju-log Application Version: 6.1.5 2018-03-07 02:17:23 INFO juju-log Registered config file: /etc/ceilometer/ceilometer.conf 2018-03-07 02:17:23 INFO juju-log Registered config file: /etc/memcached.conf 2018-03-07 02:17:30 INFO update-status * memcached is running 2018-03-07 02:17:30 INFO juju-log Unit is ready 2018-03-07 02:17:32 INFO juju-log Application Version: 6.1.5

Happy to provide more information if required.

Thank you.

craigem avatar Mar 07 '18 03:03 craigem