when update-status is implicitly handled it should not generate a log warning

Bug #1837639 reported by Alex Kavanagh
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Ceilometer Agent Charm
Fix Released
Undecided
Alex Kavanagh
OpenStack Cinder-Ceph charm
Fix Released
Undecided
Alex Kavanagh
OpenStack HA Cluster Charm
Fix Released
Undecided
Alex Kavanagh
OpenStack Neutron Open vSwitch Charm
Fix Released
Undecided
Alex Kavanagh

Bug Description

When a charm handles the update-status implicitly (it is linked to hooks.py or equivalent, but is not handled explicitly, but instead is the last call in the generic main for hooks.py), then it should not generate an error. See (from hacluster) charm:

if __name__ == '__main__':
    try:
        hooks.execute(sys.argv)
    except UnregisteredHookError as e:
        log('Unknown hook {} - skipping.'.format(e), level=DEBUG)
    set_unit_status()

i.e. update-status is linked to hooks.py, the update-status does happen (set_unit_status()) but an error is logged for 'Unknown hook update-status - skipping' to the log.

Resolve this by suppressing the log message in some way.

Changed in charm-hacluster:
assignee: nobody → Alex Kavanagh (ajkavanagh)
Changed in charm-ceilometer-agent:
assignee: nobody → Alex Kavanagh (ajkavanagh)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-ceilometer-agent (master)

Fix proposed to branch: master
Review: https://review.opendev.org/672483

Changed in charm-ceilometer-agent:
status: New → In Progress
Changed in charm-cinder-ceph:
status: New → In Progress
assignee: nobody → Alex Kavanagh (ajkavanagh)
Changed in charm-hacluster:
status: New → In Progress
Changed in charm-neutron-openvswitch:
status: New → In Progress
assignee: nobody → Alex Kavanagh (ajkavanagh)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-neutron-openvswitch (master)

Fix proposed to branch: master
Review: https://review.opendev.org/672495

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-cinder-ceph (master)

Reviewed: https://review.opendev.org/672491
Committed: https://git.openstack.org/cgit/openstack/charm-cinder-ceph/commit/?id=18ac7a93cc96ce3aefc938cf0c31e0f4af018cde
Submitter: Zuul
Branch: master

commit 18ac7a93cc96ce3aefc938cf0c31e0f4af018cde
Author: Alex Kavanagh <email address hidden>
Date: Wed Jul 24 11:31:05 2019 +0100

    Fix log update-status error

    This patch adds a dummy update_status function so that the update-status
    hook 'has' a function to run and thus silence the log error.

    Change-Id: I6a73943af9609810f1e40789c8d351278843dece
    Closes-bug: #1837639

Changed in charm-cinder-ceph:
status: In Progress → Fix Committed
Changed in charm-neutron-openvswitch:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-neutron-openvswitch (master)

Reviewed: https://review.opendev.org/672495
Committed: https://git.openstack.org/cgit/openstack/charm-neutron-openvswitch/commit/?id=9fcc8e55a5f978166455ddc0f8abeb14fe6249e6
Submitter: Zuul
Branch: master

commit 9fcc8e55a5f978166455ddc0f8abeb14fe6249e6
Author: Alex Kavanagh <email address hidden>
Date: Wed Jul 24 11:43:01 2019 +0100

    Fix log update-status error

    This patch adds a dummy update_status function so that the update-status
    hook 'has' a function to run and thus silence the log error.

    Change-Id: I1f008b1cb0958e90967a6a4e95fb0fddb37795f4
    Closes-bug: #1837639

Changed in charm-ceilometer-agent:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-ceilometer-agent (master)

Reviewed: https://review.opendev.org/672483
Committed: https://git.openstack.org/cgit/openstack/charm-ceilometer-agent/commit/?id=dec4b047168cb9341b5ff5704135fd038cde0bf1
Submitter: Zuul
Branch: master

commit dec4b047168cb9341b5ff5704135fd038cde0bf1
Author: Alex Kavanagh <email address hidden>
Date: Wed Jul 24 10:36:28 2019 +0100

    Fix log update-status error

    This patch adds a dummy update_status function so that the update-status
    hook 'has' a function to run and thus silence the log error.

    Change-Id: I96dfba233b98da60d8c138b84e8249cdda109563
    Closes-bug: #1837639

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-hacluster (master)

Reviewed: https://review.opendev.org/672325
Committed: https://git.openstack.org/cgit/openstack/charm-hacluster/commit/?id=f71fe595ce67e5e105e0ef8e75068850062d320a
Submitter: Zuul
Branch: master

commit f71fe595ce67e5e105e0ef8e75068850062d320a
Author: Alex Kavanagh <email address hidden>
Date: Tue Jul 23 17:05:39 2019 +0100

    Fix log update-status error

    This patch adds a dummy update_status function so that the update-status
    hook 'has' a function to run and thus silence the log error.

    Change-Id: Ia0ed9367809fd47c10ad6a57011555589a7d940c
    Closes-bug: #1837639

Changed in charm-hacluster:
status: In Progress → Fix Committed
David Ames (thedac)
Changed in charm-hacluster:
milestone: none → 19.10
Changed in charm-ceilometer-agent:
milestone: none → 19.10
Changed in charm-cinder-ceph:
milestone: none → 19.10
Changed in charm-neutron-openvswitch:
milestone: none → 19.10
David Ames (thedac)
Changed in charm-hacluster:
status: Fix Committed → Fix Released
Changed in charm-ceilometer-agent:
status: Fix Committed → Fix Released
Changed in charm-cinder-ceph:
status: Fix Committed → Fix Released
Changed in charm-neutron-openvswitch:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.