OpenStack - Upgrade from Rocky to Stein Release

Scenario yang akan digunakan dalam upgrade ini adalah semua service akan terkena interruptions. Dalam upgrade kali ini menggunakan environment test, dan setelah berhasil akan di implementasikan di environment Productions. Semua OpenStack services akan down pada saat bersamaan, dan tidak akan up lagi sampai proses upgrade telah selesai.

Kondisi environment:

  1. OpenStack terinstall secara ALL in ONE via PackStack
  2. OpenStack terinstall secara terpisah antara controller dan compute.

1. OpenStack terinstall secara ALL in ONE via PackStack

Update Package

Sebelum mengupgrade, ambil snapshot systemd dari service OpenStack:

# systemctl snapshot openstack-services

Stop OpenStack Services:

# systemctl stop 'openstack-*'
# systemctl stop 'neutron-*'
# systemctl stop 'openvswitch'

Install openstack release repo untuk Stein Release:

# yum install -y centos-release-openstack-stein

Jika ada conflict, remove terlebih dahulu packet yang conflict dan pastikan tidak mengganggu system. Setelah itu bisa jalankan kembali installasi paket openstack release repo untuk Stein

# yum remove centos-release-ceph-luminous-1.1-2.el7.centos.noarch

Non aktifkan openstack release untuk rocky:

# yum-config-manager --disable centos-release-openstack-rocky

Lalu bisa lakukan upgrade release dari Rocky ke Stein

# yum update

Sampai dengan langkah ini, proses Upgrade sudah selesai, dan langkah terakhir adalah

Update Database

lakukan di node controller

Update keystone db:

[root@rocky ~]# su -s /bin/sh -c "keystone-manage db_sync" keystone

Update glance db:

[root@rocky ~]# su -s /bin/sh -c "glance-manage db_sync" glance
/usr/lib/python2.7/site-packages/oslo_db/sqlalchemy/enginefacade.py:1371: OsloDBDeprecationWarning: EngineFacade is deprecated; please use oslo_db.sqlalchemy.enginefacad
e
  expire_on_commit=expire_on_commit, _conf=conf)
Database is up to date. No migrations needed.

Update cinder db:

[root@rocky ~]# su -s /bin/sh -c "cinder-manage db sync" cinder
Deprecated: Option "logdir" from group "DEFAULT" is deprecated. Use option "log-dir" from group "DEFAULT".

ceilometer update db:

[root@rocky ~]# ceilometer-upgrade

update aodh db:

[root@rocky ~]# aodh-dbsync

update gnocchi db:

[root@rocky ~]# gnocchi-upgrade
2019-06-27 13:36:49,952 [19407] INFO     gnocchi.service: Gnocchi version 4.3.2
2019-06-27 13:36:50,231 [19407] INFO     gnocchi.cli.manage: Upgrading indexer SQLAlchemyIndexer: mysql+pymysql://gnocchi:fb620dedd7de442b@10.10.2.204/gnocchi?charset=utf8
2019-06-27 13:36:50,579 [19407] INFO     gnocchi.cli.manage: Upgrading storage FileStorage: /var/lib/gnocchi
2019-06-27 13:36:50,581 [19407] INFO     gnocchi.cli.manage: Upgrading incoming storage FileStorage: /var/lib/gnocchi
[root@rocky ~]# su -s /bin/sh -c "neutron-db-manage upgrade heads" neutron
INFO  [alembic.runtime.migration] Context impl MySQLImpl.
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
  Running upgrade for neutron ...
INFO  [alembic.runtime.migration] Context impl MySQLImpl.
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
INFO  [alembic.runtime.migration] Running upgrade 867d39095bf4 -> d72db3e25539, modify uniq port forwarding
INFO  [alembic.runtime.migration] Running upgrade d72db3e25539 -> cada2437bf41
INFO  [alembic.runtime.migration] Running upgrade cada2437bf41 -> 195176fb410d, router gateway IP QoS
INFO  [alembic.runtime.migration] Running upgrade 195176fb410d -> fb0167bd9639
INFO  [alembic.runtime.migration] Running upgrade fb0167bd9639 -> 0ff9e3881597
INFO  [alembic.runtime.migration] Running upgrade 0ff9e3881597 -> 9bfad3f1e780
  OK

Update Nova Compute DB:

[root@rocky ~]# su -s /bin/sh -c "nova-manage db sync" nova
[root@rocky ~]# su -s /bin/sh -c "nova-manage api_db sync" nova

check / discover host Nova:

[root@rocky ~]# su -s /bin/sh -c "nova-manage cell_v2 discover_hosts --verbose" nova
Found 2 cell mappings.
Skipping cell0 since it does not contain hosts.
Getting computes from cell 'default': 8af6b639-390c-43d6-94cb-dfba685b6036
Found 0 unmapped computes in cell: 8af6b639-390c-43d6-94cb-dfba685b6036

check list cells nova:

[root@rocky ~]# nova-manage cell_v2 list_cells
+---------+--------------------------------------+---------------------------------------+--------------------------------------------------+----------+
|   Name  |                 UUID                 |             Transport URL             |               Database Connection                | Disabled |
+---------+--------------------------------------+---------------------------------------+--------------------------------------------------+----------+
|  cell0  | 00000000-0000-0000-0000-000000000000 |                 none:/                | mysql+pymysql://nova:****@10.10.2.204/nova_cell0 |  False   |
| default | 8af6b639-390c-43d6-94cb-dfba685b6036 | rabbit://guest:****@10.10.2.204:5672/ |    mysql+pymysql://nova:****@10.10.2.204/nova    |  False   |
+---------+--------------------------------------+---------------------------------------+--------------------------------------------------+----------+

Lalu restart all OpenStack services:

# systemctl isolate openstack-services.snapshot
# systemctl start 'openstack-*';systemctl start 'neutron-*';systemctl start 'openvswitch'

Reboot Host jika ada kendala di Horizon Openstack

# reboot

2. OpenStack terinstall secara terpisah antara controller dan compute.

Cara upgrade sama dengan nomor 1, lalu edit file /etc/neutron/neutron.conf

#service_plugins=qos,trunk,neutron_lbaas.services.loadbalancer.plugin.LoadBalancerPluginv2,router,metering,firewall
service_plugins=lbaasv2,router,metering,qos,trunk

rubah seperti diatas pada service_plugins.

Restart all service openstack atau reboot mesin cara paling mudah.

Summary Code

#!/bin/bash

systemctl snapshot openstack-services
systemctl stop 'openstack-*'
systemctl stop 'neutron-*'
#systemctl stop 'openvswitch'

yum remove  -y centos-release-ceph-luminous-1.1-2.el7.centos.noarch
yum install -y centos-release-openstack-stein

yum-config-manager --disable centos-release-openstack-rocky -y

yum update -y

su -s /bin/sh -c "keystone-manage db_sync" keystone
su -s /bin/sh -c "glance-manage db_sync" glance
su -s /bin/sh -c "cinder-manage db sync" cinder
ceilometer-upgrade
aodh-dbsync
gnocchi-upgrade
su -s /bin/sh -c "neutron-db-manage upgrade heads" neutron
su -s /bin/sh -c "nova-manage db sync" nova
su -s /bin/sh -c "nova-manage api_db sync" nova
su -s /bin/sh -c "nova-manage cell_v2 discover_hosts --verbose" nova
systemctl isolate openstack-services.snapshot
systemctl start 'openstack-*';
systemctl start 'neutron-*';

image

Referensi: https://www.rdoproject.org/install/upgrading-rdo-1/ https://wiki.openstack.org/wiki/Neutron/LBaaS/Deprecation