Difference between revisions of "Yum Downgrade howto"
Jump to navigation
Jump to search
(How To downgrade rpm packages with yum in case of a bug) |
|||
Line 5: | Line 5: | ||
=What and When= | =What and When= | ||
* Analysis | * Analysis | ||
− | + | :* Can you reproduce the problem in QA? | |
− | + | :* Do you have a test plan? | |
− | + | :* Can you verify the desired state? | |
* Maintenance window? | * Maintenance window? | ||
− | + | :* Prevent user access | |
* Fallback plan? | * Fallback plan? | ||
− | + | :* DR Backup | |
− | + | :* Snapshot | |
=Verify the bug= | =Verify the bug= | ||
Line 124: | Line 124: | ||
</pre> | </pre> | ||
+ | [[Category:Debugging]] | ||
[[Category:Howtos]] | [[Category:Howtos]] | ||
[[Category:ReferenceCards]] | [[Category:ReferenceCards]] | ||
− |
Revision as of 08:01, 21 January 2021
Sometimes things go wrong and you have to downgrade packages to an earlier state.
Here I write down my notes how I have done it, so I can reuse it later again.
Probably it helps you too.
Contents
1 What and When
- Analysis
- Can you reproduce the problem in QA?
- Do you have a test plan?
- Can you verify the desired state?
- Maintenance window?
- Prevent user access
- Fallback plan?
- DR Backup
- Snapshot
2 Verify the bug
- https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-smb/bffc70f9-b16a-453b-939a-0b6d3c9263af
- https://docs.gluster.org/en/latest/release-notes/6.0/
- https://bugs.centos.org/
[root@vglclu144 ~]# gluster snapshot list | tail autosnap_GMT-2021.01.16-17.58.01 autosnap_GMT-2021.01.17-10.58.01 autosnap_GMT-2021.01.17-17.58.01 autosnap_GMT-2021.01.18-10.58.01 autosnap_GMT-2021.01.18-17.58.01 autosnap_GMT-2021.01.19-10.58.01 autosnap_GMT-2021.01.19-17.58.01 autosnap_GMT-2021.01.20-10.58.01 autosnap_GMT-2021.01.20-15.17.11 autosnap_GMT-2021.01.20-17.58.01 [root@vglclu144 ~]# df -hTP | grep -e glusterfs -e cifs localhost:/ctdb fuse.glusterfs 2.0G 89M 2.0G 5% /mnt/ctdb localhost:/data fuse.glusterfs 2.0T 659G 1.4T 33% /mnt/data //localhost/CIFS-SHARE cifs 2.0T 659G 1.4T 33% /mnt/samba1 [root@vglclu144 ~]# ls -l /mnt/samba1/.snaps/autosnap_GMT-2021.01.20-17.58.01/ /mnt/data/.snaps/autosnap_GMT-2021.01.20-17.58.01/ /mnt/data/.snaps/autosnap_GMT-2021.01.20-17.58.01/: total 8 drwxrws---+ 15 root Sec1 4096 Jan 18 09:41 Sec1 drwxrws---+ 18 root SBIB 4096 Oct 7 08:00 Sec1_ProjContr /mnt/samba1/.snaps/autosnap_GMT-2021.01.20-17.58.01/: ls: reading directory /mnt/samba1/.snaps/autosnap_GMT-2021.01.20-17.58.01/: Is a directory total 0
3 Verify the previous working version and downgrade
In my case, I did just know that it was working before they upgraded.
Samba 4.10 seems to have a bug that prevents the VSS Folder restore with Gluster 6.
But I can not find anything about it in Community, it may be to early, I will create a bug report later on.
yum history list all | head Loaded plugins: changelog, fastestmirror ID | Login user | Date and time | Action(s) | Altered ------------------------------------------------------------------------------- 38 | root <root> | 2020-12-23 23:49 | I, O, U | 271 EE 37 | root <root> | 2020-12-15 15:10 | Install | 2 36 | root <root> | 2020-12-15 14:35 | Install | 1 35 | root <root> | 2020-11-10 10:36 | Install | 1 34 | root <root> | 2020-09-22 20:02 | Install | 1 sed -i 's/enabled=0/enabled=1/' /etc/yum.repos.d/CentOS-Vault.repo yum makecache yum history info 38 | grep -e samba -e libwbclient -e 4.9.1-10.el7_7 | awk '{print $2}' | xargs echo yum downgrade yum downgrade ctdb-4.9.1-10.el7_7.x86_64 libsmbclient-4.9.1-10.el7_7.x86_64 libwbclient-4.9.1-10.el7_7.x86_64 samba-4.9.1-10.el7_7.x86_64 samba-client-4.9.1-10.el7_7.x86_64 samba-client-libs-4.9.1-10.el7_7.x86_64 samba-common-4.9.1-10.el7_7.noarch samba-common-libs-4.9.1-10.el7_7.x86_64 samba-common-tools-4.9.1-10.el7_7.x86_64 samba-libs-4.9.1-10.el7_7.x86_64 samba-vfs-glusterfs-4.9.1-10.el7_7.x86_64 yum remove pyldb sed -i 's/enabled=1/enabled=0/' /etc/yum.repos.d/CentOS-Vault.repo yum makecache
4 Lock the current state
An Upgrade would destroy all your work, so lets lock it down
yum install yum-plugin-versionlock yum versionlock ctdb-4.9.1-10.el7_7.x86_64 libsmbclient-4.9.1-10.el7_7.x86_64 libwbclient-4.9.1-10.el7_7.x86_64 samba-4.9.1-10.el7_7.x86_64 samba-client-4.9.1-10.el7_7.x86_64 samba-client-libs-4.9.1-10.el7_7.x86_64 samba-common-4.9.1-10.el7_7.noarch samba-common-libs-4.9.1-10.el7_7.x86_64 samba-common-tools-4.9.1-10.el7_7.x86_64 samba-libs-4.9.1-10.el7_7.x86_64 samba-vfs-glusterfs-4.9.1-10.el7_7.x86_64 Loaded plugins: changelog, fastestmirror, versionlock Adding versionlock on: 0:samba-common-tools-4.9.1-10.el7_7 Adding versionlock on: 0:samba-common-4.9.1-10.el7_7 Adding versionlock on: 0:samba-libs-4.9.1-10.el7_7 Adding versionlock on: 0:libwbclient-4.9.1-10.el7_7 Adding versionlock on: 0:samba-client-libs-4.9.1-10.el7_7 Adding versionlock on: 0:ctdb-4.9.1-10.el7_7 Adding versionlock on: 0:samba-client-4.9.1-10.el7_7 Adding versionlock on: 0:samba-4.9.1-10.el7_7 Adding versionlock on: 0:samba-vfs-glusterfs-4.9.1-10.el7_7 Adding versionlock on: 0:samba-common-libs-4.9.1-10.el7_7 Adding versionlock on: 0:libsmbclient-4.9.1-10.el7_7 yum versionlock list Loaded plugins: changelog, fastestmirror, versionlock 0:samba-common-tools-4.9.1-10.el7_7.* 0:samba-common-4.9.1-10.el7_7.* 0:samba-libs-4.9.1-10.el7_7.* 0:libwbclient-4.9.1-10.el7_7.* 0:samba-client-libs-4.9.1-10.el7_7.* 0:ctdb-4.9.1-10.el7_7.* 0:samba-client-4.9.1-10.el7_7.* 0:samba-4.9.1-10.el7_7.* 0:samba-vfs-glusterfs-4.9.1-10.el7_7.* 0:samba-common-libs-4.9.1-10.el7_7.* 0:libsmbclient-4.9.1-10.el7_7.* versionlock list done # yum versionlock clear # this can be used to release locks