Reassign init and delete services instead of extend
The CRM.delete_services(...) and CRM.init_services(...) methods update the internal list used to communicate with the hacluster charm. This causes the list to continuously grow, which causes the data in the hacluster relation to change. The constantly updated relation change causes hooks to fire unintentionally. Change-Id: Ica823027b1a3fafe277d862fae0a3cdcf5907774 Partial-Bug: #1737776
This commit is contained in:
parent
52a760b8fb
commit
44c900958f
|
@ -300,7 +300,7 @@ class CRM(dict):
|
|||
--------
|
||||
http://crmsh.github.io/man/#cmdhelp_configure_delete
|
||||
"""
|
||||
self['delete_resources'].extend(resources)
|
||||
self['delete_resources'] = resources
|
||||
|
||||
def init_services(self, *resources):
|
||||
"""Specifies that the service(s) is an init or upstart service.
|
||||
|
@ -317,7 +317,7 @@ class CRM(dict):
|
|||
-------
|
||||
None
|
||||
"""
|
||||
self['init_services'].extend(resources)
|
||||
self['init_services'] = resources
|
||||
|
||||
def ms(self, name, resource, description=None, **kwargs):
|
||||
"""Create a master/slave resource type.
|
||||
|
|
Loading…
Reference in New Issue