canonical / charmed-openstack-upgrader

Automatic upgrade tool for Charmed Openstack
Apache License 2.0
3 stars 12 forks source link

Unclear what "running mismatched openstack versions" means #487

Closed samuelallan72 closed 1 month ago

samuelallan72 commented 4 months ago

For example:

2024-07-09 07:40:05 [WARNING] Cannot generate plan for 'aodh'
        Units of application aodh are running mismatched OpenStack versions: 'victoria': ['aodh/0'], 'wallaby': ['aodh/1', 'aodh/2']. This is not currently handled.

It would be good to output more information at a lower level to help with debugging:

samuelallan72 commented 1 month ago

@gabrielcocenza @rgildein @jneo8 @chanchiwai-ray is there any disadvantage to checking directly for mismatched workload versions instead? Then we can be clearer in the error message, by referencing the actual workload versions.

Are there any cases where workload versions may be mismatched, but the relevant openstack release is still the same (eg. if the versions were 21.0.1 and 21.0.2, only differing by a patch release)? Is it ok if workload versions are mismatched at all?

I would propose changing this check to verify that all units for an application are running the same workload version. And the error message can give more information, like:

Units of application aodh are running mismatched workload versions, as reported by juju status:
  aodh/0: 11.0.1 (victoria)
  aodh/1: 12.1.0 (wallaby)
  aodh/2: 12.1.0 (wallaby)

Thoughts on this design?

jneo8 commented 1 month ago

Are there any cases where workload versions may be mismatched, but the relevant openstack release is still the same (eg. if the versions were 21.0.1 and 21.0.2, only differing by a patch release)? Is it ok if workload versions are mismatched at all?

This shouldn't happen and can be danger.

Thoughts on this design?

Nice and clear, +1 for it. And can we also output the expected version?

gabrielcocenza commented 1 month ago

Are there any cases where workload versions may be mismatched, but the relevant openstack release is still the same (eg. if the versions were 21.0.1 and 21.0.2, only differing by a patch release)? Is it ok if workload versions are mismatched at all?

This is not suppose to happen. We are using the packaging lib and in the openstack_lookup.csv we add the lower and upper version (not inclusive). So for aodh, for example, it's considered as victoria: 11.0.0 <= pkg_version < 12.0.0

We consider mismatched regarding o7k releases map and not the fine grained version itself. So 11.0.0 and 11.9.9 is Victoria and don't have mismatched versions

samuelallan72 commented 1 month ago

Thanks for your comments. :)