|
| 1 | +# Update Ganeti RPM package from 3.0 to 3.1 |
| 2 | + |
| 3 | +Ganeti RPM Packaging for RHEL/CentOS/others. |
| 4 | + |
| 5 | +## Update from a version earlier than 2.16 |
| 6 | + |
| 7 | +If you are updating from a version earlier than 2.16, see the document for 3.0. |
| 8 | + |
| 9 | +- [Update Ganeti RPM package from 2.16 to 3.0](https://github.com/jfut/ganeti-rpm/blob/master/doc/update-rhel-2.16-to-3.0.rst) |
| 10 | + |
| 11 | +Official documentation: |
| 12 | + |
| 13 | +- [Ganeti 3.1.0 Release](https://github.com/ganeti/ganeti/releases/tag/v3.1.0) |
| 14 | + |
| 15 | +## Backup |
| 16 | + |
| 17 | +**Mandatory** on all nodes. |
| 18 | + |
| 19 | +Stop ganeti service and backup the configuration file. |
| 20 | + |
| 21 | +```bash |
| 22 | +systemctl stop ganeti-metad.service |
| 23 | +systemctl stop ganeti-kvmd.service |
| 24 | +systemctl stop ganeti.target |
| 25 | +tar czf /root/ganeti-$(date +%FT%H-%M-%S).tar.gz -C /var/lib ganeti |
| 26 | +chmod 600 /root/ganeti-$(date +%FT%H)*.tar.gz |
| 27 | +``` |
| 28 | + |
| 29 | +## Update ganeti package |
| 30 | + |
| 31 | +**Mandatory** on all nodes. |
| 32 | + |
| 33 | +```bash |
| 34 | +yum --enablerepo=integ-ganeti update integ-ganeti-release |
| 35 | +yum --enablerepo=epel,integ-ganeti update ganeti |
| 36 | +``` |
| 37 | + |
| 38 | +## Upgrade configuration files on master node |
| 39 | + |
| 40 | +**Mandatory** on **master** node only. |
| 41 | + |
| 42 | +Upgrade the configuration files(/var/lib/ganeti). |
| 43 | + |
| 44 | +```bash |
| 45 | +# dry run |
| 46 | +/usr/lib64/ganeti/tools/cfgupgrade --verbose --dry-run |
| 47 | + |
| 48 | +# upgrade |
| 49 | +/usr/lib64/ganeti/tools/cfgupgrade --verbose |
| 50 | +``` |
| 51 | + |
| 52 | +## Start ganeti services |
| 53 | + |
| 54 | +**Mandatory** on **member** nodes. |
| 55 | + |
| 56 | +```bash |
| 57 | +systemctl start ganeti.target |
| 58 | +systemctl start ganeti-kvmd.service |
| 59 | + |
| 60 | +# Optional: ganeti-metad is the daemon providing the metadata service. |
| 61 | +systemctl start ganeti-metad.service |
| 62 | +``` |
| 63 | + |
| 64 | +**Mandatory** on **master** node only. |
| 65 | + |
| 66 | +```bash |
| 67 | +systemctl start ganeti.target |
| 68 | +gnt-cluster redist-conf |
| 69 | + |
| 70 | +systemctl restart ganeti.target |
| 71 | +systemctl start ganeti-kvmd.service |
| 72 | + |
| 73 | +# Optional: ganeti-metad is the daemon providing the metadata service. |
| 74 | +systemctl start ganeti-metad.service |
| 75 | + |
| 76 | +gnt-cluster verify |
| 77 | +``` |
| 78 | + |
| 79 | +**Troubleshooting** |
| 80 | + |
| 81 | +- 'Can't find node' messages |
| 82 | + |
| 83 | +You can ignore the 'Can't find node' messages and continue. |
| 84 | + |
| 85 | +```bash |
| 86 | +$ /usr/lib64/ganeti/tools/cfgupgrade --verbose --dry-run |
| 87 | +Please make sure you have read the upgrade notes for Ganeti 3.1.0 |
| 88 | +(available in the UPGRADE file and included in other documentation |
| 89 | +formats). Continue with upgrading configuration? |
| 90 | +y/[n]/?: y |
| 91 | +2025-09-24 20:48:42,530: Found configuration version 3010000 (3.1.0) |
| 92 | +2025-09-24 20:48:42,531: No changes necessary |
| 93 | +2025-09-24 20:48:42,531: Writing configuration file to /var/lib/ganeti/config.data |
| 94 | +Configuration successfully upgraded to version 3.1.0. |
| 95 | +``` |
| 96 | + |
| 97 | +- Restore an old configuration and downgrade Ganeti |
| 98 | + |
| 99 | +You can restore an old configuration from a backup file and downgrade Ganeti. |
| 100 | + |
| 101 | +```bash |
| 102 | +# on all nodes |
| 103 | +systemctl stop ganeti-metad.service |
| 104 | +systemctl stop ganeti-kvmd.service |
| 105 | +systemctl stop ganeti.target |
| 106 | +mv /var/lib/ganeti /var/lib/ganeti.failed |
| 107 | +tar zxf /root/ganeti-BACKUP_DATE.tar.gz -C /var/lib |
| 108 | + |
| 109 | +# el8 |
| 110 | +yum --enablerepo=epel,integ-ganeti downgrade ganeti-x.y.z-n.el8 |
| 111 | +# el9 |
| 112 | +yum --enablerepo=epel,integ-ganeti downgrade ganeti-x.y.z-n.el9 |
| 113 | +# el10 |
| 114 | +yum --enablerepo=epel,integ-ganeti downgrade ganeti-x.y.z-n.el10 |
| 115 | + |
| 116 | +systemctl start ganeti.target |
| 117 | +systemctl start ganeti-kvmd.service |
| 118 | +# Optional: ganeti-metad is the daemon providing the metadata service. |
| 119 | +systemctl start ganeti-metad.service |
| 120 | +``` |
0 commit comments