Bug 2097437
Summary: | [ReaR] vi command in rear recover environment hungs | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 9 | Reporter: | Pradeep Jagtap <prjagtap> |
Component: | rear | Assignee: | Pavel Cahyna <pcahyna> |
Status: | CLOSED ERRATA | QA Contact: | David Jež <djez> |
Severity: | medium | Docs Contact: | Šárka Jana <sjanderk> |
Priority: | unspecified | ||
Version: | 9.0 | CC: | djez, eric.p.hagen.ctr, pcahyna, sjanderk |
Target Milestone: | rc | Keywords: | Triaged |
Target Release: | --- | Flags: | pm-rhel:
mirror+
|
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | rear-2.6-12.el9 | Doc Type: | Bug Fix |
Doc Text: |
.The `vi` command in ReaR no longer results in an infinite loop
Previously, the ReaR rescue system did not contain the `vi` executable, only the `/bin/vi` script. As a consequence, the `/bin/vi` script caused an infinite loop when invoked. With this update, the ReaR rescue system contains the actual `vi` executable `/usr/libexec/vi`, and running the `vi` command no longer leads to an endless loop.
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2022-11-15 10:42:27 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Pradeep Jagtap
2022-06-15 16:56:27 UTC
The problem is in usr/share/rear/build/GNU/Linux/005_create_symlinks.sh : ln -sf $v vi $ROOTFS_DIR/bin/vim >&2 I think this line should be removed and vim added to PROGS. > ln -sf $v vi $ROOTFS_DIR/bin/vim >&2
>
> I think this line should be removed and vim added to PROGS.
This solution indeed works.
Steps to reproduce (almost) automatically:
# echo 'PROGS+=( timeout )' >> /etc/rear/local.conf
# rear -d mkrescue
...
Testing that the recovery system in /var/tmp/rear.sewWahfi7dNgMlf/rootfs contains a usable system
...
# chroot /var/tmp/rear.sewWahfi7dNgMlf/rootfs timeout 10 vi +q
# echo $?
# 124
If I only remove the /usr/bin/vim symlink and try to run vi, I get /usr/sbin/vi: line 23: /usr/libexec/vi: No such file or directory So checking for symlink is not enough, there is nothing to run if we don't want to execute the symlink. In addition to the proposed fix, I would also add /usr/libexec/vi to PROGS (in case vim is not there, for example). Original RH ticket assigned to this report. Tested above with the same results. Currently vi is listed in the /usr/share/rear/conf/GNU/Linux.conf file under: # progs to take along vim is not defined anywhere. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (rear bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2022:8246 |