amulet doesn't provide a clean way to refresh unit info
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Amulet |
New
|
Undecided
|
Unassigned |
Bug Description
If you reconfigure a service with e.g. a port change,
amulet doesn't reload/refresh unit_data, keeping its sentry
entries stale.
Example excerpts (charm code unchanged between both):
* FAIL:
self.deployment
self.unit = self.deployment
ports = self.unit.
## below FAILs, as ports hold default values as already deployed
self.assertEqua
* OK (workaround'd):
self.deployment
## Refresh units_data by re-creating sentry object
from amulet.sentry import Talisman
self.deployment
self.deployment
self.unit = self.deployment
ports = self.unit.
## Ok now:
self.assertEqua
Suggest making wait() to re-create sentry object (as
e.g. add-unit() does), or exposing a new method to do so,
e.g. deployment.
description: | updated |