Description of problem: Currently rpms can be installed on Node, however, those rpms are not kept between updates. This RFE is about a simple mechanism to "keep" between or re-apply rpms after updates. One implementation could be to look for volumes with a specific label and try to install all rpms on this volume. The label of the volume can be similar to what is used for driver disks v3 as described here: https://github.com/rhinstaller/anaconda/blob/master/docs/driverdisc.rst
This request has been proposed for two releases. This is invalid flag usage. The ovirt-future release flag has been cleared. If you wish to change the release flag, you must clear one release flag and then set the other release flag to ?.
iirc, we discussed a generalization of this. don't treat rpm's as a special feature, rather allow to have a scripts folder which would run post boot, and if one wants they'll just write "yum install -y ..." in those scripts? you could have a folder for scripts to run once post new image, or to run post every boot. (for those running only once, may get tricky if they fail, so i'd just do "every boot", and the script could take care of flagging if it already ran post last new image[1]. in short, keep it simple... [1] a script can place the status on a folder which will go away with the new image to lose the state on new image.
I would actually take the RPMs from cache and reinstall them.
Bug tickets must have version flags set prior to targeting them to a release. Please ask maintainer to set the correct version flags and only then set the target milestone.
Created attachment 1237852 [details] Comment 8 : sosreport and all logs in /var/log and /tmp
Note that this will only work on systems which are 4.1+ Installing a 4.1 image and upgrading to a later image will persist the RPMs. We rely on a yum plugin in order to save these off to a lookaside directory, then imgbased has a plugin which checks that lookaside and installs the RPMs on upgrades (rather than pure imgbased code, which is called as part of the upgrade process). It's theoretically possible to backport this yum plugin to 4.0.z builds without the imgbased component given an appropriate Z-stream bug, but this feature will only work on 4.1 and above. I can deliver a second RHV-H build tomorrow in order to verify this by installing a 4.1 image and upgrading to another 4.1 image.
Thanks Ryan, so I will test it after another 4.1 image is ready.
Ryan, this RFE verification is blocked by no second 4.1 build to test 4.1 upgrade. Could you please provide the build to QE soon?
There will be a new build by end of day tomorrow.
Hi, Ryan I have re-tried to verify this bug on the following version: - redhat-virtualization-host-4.1-20170104.0 (old build) - redhat-virtualization-host-4.1-20170111.0 (new buuld) Strictly follow the # Commnet 8, but without register to RHEVM. Step to reproduce: 1. Install redhat-virtualization-host-4.1-20170104.0 build 2. Reboot and login RHVH4.1, install two RPMs: Install kmod-oracleasm-2.0.8-17.el7.x86_64.rpm and check it after installation: # rpm -ivh kmod-oracleasm-2.0.8-17.el7.x86_64.rpm # ls /usr/lib/modules/3.10.0-514.el7.x86_64/weak-updates/ Setup repos for httpd and install it, check it after installation. And remove repos after installation. # yum install httpd # rpm -qa | grep httpd 3. Download redhat-virtualization-host-image-update 4.1-20170111.0.el7_3.noarch.rpm and Upgrade RHVH: # yum install redhat-virtualization-host-image-update-4.1-20170111.0.el7_3.noarch.rpm 4. Reboot and login new build RHVH4.1, check oracleasm and httpd: # ls /usr/lib/modules/3.10.0-514.el7.x86_64/weak-updates/ # rpm -qa | grep httpd Actual results: Before update: # ls /usr/lib/modules/3.10.0-514.el7.x86_64/weak-updates/ oracleasm # rpm -qa|grep httpd httpd-tools-2.4.6-45.el7.x86_64 httpd-2.4.6-45.el7.x86_64 After update: # ls /usr/lib/modules/3.10.0-514.el7.x86_64/weak-updates/ # rpm -qa|grep httpd Output no results Additional info: If rollback to old build, it could find two installed packages before upgrade So this bug is not fixed in new build(redhat-virtualization-host-4.1-20170111.0) I will change status to ASSIGNEN.
Looks like ts.depinstalled and ts.depupdated were missed in the yum plugin (probably because I tested by installing something with no deps). Additionally, we don't have an rpm plugin, so 'rpm -[Ui] foo.rpm' will not persist packages. This is a thought for a future feature, but the RPM plugin documentation is very lacking.
Hi Jiawu, Could you please help to verify this bug? Thanks.
This bug is not fixed completely in redhat-virtualization-host-4.1-0.20170116.0, some RPMs(such as kmod-oracleasm) still can not be persisted after upgrade. Test version: 1. Before upgrade: redhat-virtualization-host-4.1-0.20170112.1 imgbased-0.9.4-0.1.el7ev.noarch kernel-3.10.0-514.2.2.el7.x86_64 redhat-virtualization-host-image-update-placeholder-4.1-0.5.el7.noarch 2. After upgrade: redhat-virtualization-host-4.1-0.20170116.0 imgbased-0.9.4-0.1.el7ev.noarch kernel-3.10.0-514.2.2.el7.x86_64 redhat-virtualization-host-image-update-4.1-20170116.0.el7_3.noarch Test steps: 1. Install redhat-virtualization-host-4.1-0.20170112.1 2. Reboot and login RHVH4.1, install RPM kmod-oracleasm: Download kmod-oracleasm-2.0.8-17.el7.x86_64.rpm. Install kmod-oracleasm-2.0.8-17.el7.x86_64.rpm and check it after installation: # rpm -ivh kmod-oracleasm-2.0.8-17.el7.x86_64.rpm # ls /usr/lib/modules/3.10.0-514.2.2.el7.x86_64/weak-updates/ 3. Setup local repo in RHVH4.1 and upgrade to redhat-virtualization-host-4.1-0.20170116.0: # yum update 4. Reboot and login new build RHVH-4.1-0.20170116.0, check oracleasm: # ls /usr/lib/modules/3.10.0-514.2.2.el7.x86_64/weak-updates/ Actual results: 1. In step2, install RPM successful: # ls /usr/lib/modules/3.10.0-514.2.2.el7.x86_64/weak-updates/ oracleasm 2. In step4, the RPM installed in step2 are disappeared. # ls /usr/lib/modules/3.10.0-514.2.2.el7.x86_64/weak-updates/ Expected results: 2. In step4, the RPM kmod-oracleasm installed in step2 should be persisted, the check results should be same as step2. Additional info: RPM httpd(setup repos and install via yum) can be persisted after upgrade So I will assign this bug, and I will open a new bug to trace this issue and block this RFE bug verification.
Created attachment 1241556 [details] Comment 20: All logs in /var/log, /tmp and sosreport
Please see comment#16. Plain rpm does not persist. yum localinstall (or dnf localinstall) must be used. Writing a plugin for regular RPM is on the to-do list, but it is not this feature. If kmod-oracleasm is installed with yum localinstall, it will persist. RPMs are saved to /var/imgbased/persisted-rpms for reinstallation after upgrading.
(In reply to Ryan Barry from comment #22) > Please see comment#16. Plain rpm does not persist. yum localinstall (or dnf > localinstall) must be used. > > Writing a plugin for regular RPM is on the to-do list, but it is not this > feature. > > If kmod-oracleasm is installed with yum localinstall, it will persist. RPMs > are saved to /var/imgbased/persisted-rpms for reinstallation after upgrading. Thanks Ryan, I tested kmod-oracleasm which is installed with yum localinstall, it persists after upgrade, so this RFE bug is fixed in imgbased-0.9.4-0.1.el7ev.noarch, I will change the status to VERIFIED. But for the future feature issue: Plain rpm does not persist after upgrade, I will report a new RFE bug to trace it. Thanks!