canonical / charmed-openstack-upgrader

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

Cou tries to refresh `rabbitmq-server` charm from `3.8/channel` to `3.9/channel` on Focal while 3.8 is the latest Focal #429

Closed valexby closed 3 months ago

valexby commented 3 months ago

On every control-plane upgrade from ussuri to yoga cou tries to refresh rabbitmq-server charm from 3.8/channel to 3.9/channel while 3.8 is the latest Focal.

That leads the control-plane upgrade to get stuck on rabbitmq-server config-changed hook that never ends and cou fails.

To workaround that, I tried to workaround it and just to switch source for rabbitmq-server before running the upgrade

juju config rabbitmq-server source=cloud:focal-wallaby
cou upgrade control-plane --model foundations-maas:admin/openstack

and the upgrade went smoothly after that.

I think we should only refresh from 3.8/channel to 3.9/channel when a cloud is on Jammy.

valexby commented 3 months ago

For more detail, when was the first accurance:

  1. I tried to upgrade with cou upgrade control-plane and cou refreshed my rabbitmq-server to 3.9/stable
  2. My rabbitmq-server juju leader was in config-changed eternal loop. I checked the logs I checked the logs and saw there constant attempts to install rabbitmq package. You may see about 9:13 it starts, when charm was refreshed.
  3. I guessed maybe charm cannot be satisfied with the package version it gets. Checked that Focal doesn't support 3.9 and downgraded with juju refresh rabbitmq-server --channel=3.8/stable.
  4. After that, about 9:30 charm stabilized.
chanchiwai-ray commented 3 months ago

I think we should only refresh from 3.8/channel to 3.9/channel when a cloud is on Jammy.

I am not sure if we will have cases like that because rabbitmq-server channel "3.8/stable" is only available on: ubuntu@20.04 (focal) and ubuntu@18.04 (bionic) base.

On the other hand, rabbitmq-server 3.9/stable is available on: ubuntu@22.04 (jammy) and ubuntu@20.04 (focal) base.

juju deploy rabbitmq-server --channel 3.8/stable --base ubuntu@20.04 --config source=cloud:focal-victoria

ubuntu@juju-ec5904-7:~$ apt info rabbitmq-server                                                                                       
Package: rabbitmq-server                                                                                                               
Version: 3.8.2-0ubuntu1.5

ubuntu@juju-ec5904-7:~$ cat /etc/apt/sources.list.d/cloud-archive.list  
# Ubuntu Cloud Archive
deb http://ubuntu-cloud.archive.canonical.com/ubuntu focal-updates/victoria main
juju deploy rabbitmq-server --channel 3.9/stable --base ubuntu@20.04 --config source=cloud:focal-victoria

ubuntu@juju-ec5904-8:~$ apt info rabbitmq-server
Package: rabbitmq-server
Version: 3.8.2-0ubuntu1.5

ubuntu@juju-ec5904-8:~$ cat /etc/apt/sources.list.d/cloud-archive.list 
# Ubuntu Cloud Archive
deb http://ubuntu-cloud.archive.canonical.com/ubuntu focal-updates/victoria main

It seem even though we are refreshing to 3.9/stable on Focal, the underlying source has not been changed internally though. We will need to look deeper on differences maybe.

valexby commented 3 months ago

I'm upgrading Control plane to Xena today. My juju config rabbitmq-server enable-auto-restarts is false. I decided to submit to whatever cou wants and allowed it to refresh rabbit to 3.9. The upgrade went all automatically without any issues.

Even so it is somewhat weird to refresh to 3.9 charm expecting it to manage 3.8 workload, I can say it works now and doesn't make trouble to Managed Solutions yet

Pjack commented 3 months ago

After confirmed with openstack team and internal discussion, 3.9 is compatible with 3.8. Therefore, it should be fine to maintain current behavior.