Following Peter's instructions I managed to observe the issue. Few notes:
* It only happens after upgrading 1.20.x to 1.22.x (or later).
* It happens because the machine agent is restarted during the upgrade, which then triggers the machiner worker to discover all IP addresses it can see on the machine and save them with SetMachineAddresses API.
* The above *only* happens if the ceilometer-hacluster unit agent is restarted before the machine agent and has a chance to add the HA VIP on the machine.
As discussed the short-term solution we can do for 1.24.2 is to introduce a new environment setting (flag) like "ignore-machine-addresses" - false by default, but when set (which should be possible both at bootstrap and in a running environment) causes the following change in behavior:
* The machiner worker (and anything else that might call SetMachineAddresses API) won't discover machine IP addresses on startup and wont save them in the list of all addresses
* Instead, SetMachineAddresses API will be called with an empty list, which in combination with "ignore-machine-addresses" flag set will cause any current machine addresses stored to be reset to empty (so just the provider addresses remain).
* Setting the machine addresses to empty will in turn trigger any uniters on those machines to fire config-changed hooks for its hosted units.
Following Peter's instructions I managed to observe the issue. Few notes:
* It only happens after upgrading 1.20.x to 1.22.x (or later). hacluster unit agent is restarted before the machine agent and has a chance to add the HA VIP on the machine.
* It happens because the machine agent is restarted during the upgrade, which then triggers the machiner worker to discover all IP addresses it can see on the machine and save them with SetMachineAddresses API.
* The above *only* happens if the ceilometer-
As discussed the short-term solution we can do for 1.24.2 is to introduce a new environment setting (flag) like "ignore- machine- addresses" - false by default, but when set (which should be possible both at bootstrap and in a running environment) causes the following change in behavior: machine- addresses" flag set will cause any current machine addresses stored to be reset to empty (so just the provider addresses remain).
* The machiner worker (and anything else that might call SetMachineAddresses API) won't discover machine IP addresses on startup and wont save them in the list of all addresses
* Instead, SetMachineAddresses API will be called with an empty list, which in combination with "ignore-
* Setting the machine addresses to empty will in turn trigger any uniters on those machines to fire config-changed hooks for its hosted units.