Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StateWatch overrides non-state predicates for re-invocation #49

Open
johnsca opened this issue Jan 28, 2016 · 1 comment
Open

StateWatch overrides non-state predicates for re-invocation #49

johnsca opened this issue Jan 28, 2016 · 1 comment
Milestone

Comments

@johnsca
Copy link
Contributor

johnsca commented Jan 28, 2016

If a non-state predicate (such as @when_file_changed) is combined with a state predicate (e.g., @when), the handler will not be reinvoked if the states have not changed, even if the non-state predicates have.

Ref: charms/reactive/bus.py#L262

@merlijn-sebrechts
Copy link
Contributor

Continuing on the idea of events proposed in #44 : I think an event should be considered a state change so the handler should be reinvoked.

@merlijn-sebrechts merlijn-sebrechts added this to the 2.0 milestone Feb 14, 2017
openstack-gerrit pushed a commit to openstack/charm-aodh that referenced this issue Nov 1, 2019
Systemd was not relying being reloaded when the definition
file for aodh-api changed. The reload was supposed to be
triggered by the when_file_changed decorator. However,
there are a number of issues with when_file_changed decorator (*1,
*2, *3) and the decorator has now been deprecated *4.

This change ensures the reload happens without relying on
the decorator.

*1 canonical/charms.reactive#25
*2 canonical/charms.reactive#44
*3 canonical/charms.reactive#49
*4 canonical/charms.reactive#44 (comment)

Closes-Bug: #1850767

Change-Id: I7c528a53a4de8a4a85bf655fc242b0f38fd0754b
openstack-gerrit pushed a commit to openstack/openstack that referenced this issue Nov 1, 2019
* Update charm-aodh from branch 'master'
  - Do not rely on when_file_change for systemd reload
    
    Systemd was not relying being reloaded when the definition
    file for aodh-api changed. The reload was supposed to be
    triggered by the when_file_changed decorator. However,
    there are a number of issues with when_file_changed decorator (*1,
    *2, *3) and the decorator has now been deprecated *4.
    
    This change ensures the reload happens without relying on
    the decorator.
    
    *1 canonical/charms.reactive#25
    *2 canonical/charms.reactive#44
    *3 canonical/charms.reactive#49
    *4 canonical/charms.reactive#44 (comment)
    
    Closes-Bug: #1850767
    
    Change-Id: I7c528a53a4de8a4a85bf655fc242b0f38fd0754b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants