Bug 1545597

Summary: Netbackup 7 agent is not started automatically upon recovery [rhel-7.4.z]
Product: Red Hat Enterprise Linux 7 Reporter: Oneata Mircea Teodor <toneata>
Component: rearAssignee: Pavel Cahyna <pcahyna>
Status: CLOSED ERRATA QA Contact: Tereza Cerna <tcerna>
Severity: medium Docs Contact:
Priority: urgent    
Version: 7.3CC: fkrska, ovasik, pcahyna, rmetrich, tbowling, tcerna, thozza, toneata, vslavik
Target Milestone: rcKeywords: EasyFix, Patch, Reproducer, ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rear-2.00-5.el7_4 Doc Type: Bug Fix
Doc Text:
Previously, two problems in the startup procedure of the rescue system caused the Relax-and-Recover restore process to fail when using the NetBackup method. The system's init scripts were sourced instead of executed when used by used by Relax-and-Recover. As a consequence, the NetBackup init script aborted the whole system-setup process. Additionally, processes created by the system setup were immediately terminated. This affected the "dhclient" tool, too, and in some cases caused an IP address conflict. With this update, both bugs have been fixed. As a result, Relax-and-Recover works properly with the NetBackup method, and network configuration using DHCP is more reliable.
Story Points: ---
Clone Of: 1506231 Environment:
Last Closed: 2018-03-06 21:51:12 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 1506231    
Bug Blocks:    

Description Oneata Mircea Teodor 2018-02-15 10:42:51 UTC
This bug has been copied from bug #1506231 and has been proposed to be backported to 7.4 z-stream (EUS).

Comment 4 Tereza Cerna 2018-02-20 17:15:46 UTC
============================
Verified in:
    rear-2.00-5.el7_4.x86_64
PASS
============================

# cat /etc/rear/local.conf
BACKUP=NBU
OUTPUT_URL=file://
ISO_DEFAULT="automatic"
KERNEL_CMDLINE=debug

# rear -v mkrescue

# reboot

>> Select Relax-and-Recover

>> see in serial console:

Press ENTER to run 90-netbackup.sh 
+ source /etc/scripts/system-setup.d/90-netbackup.sh
++ /etc/scripts/system-setup.d/netbackup.real
This is Fake NetBackup
+ set +x
Press ENTER to run 99-makedev.sh 
+ source /etc/scripts/system-setup.d/99-makedev.[  OK  ] Started Initialize Rescue System.
[  OK  ] Started Getty on tty1.
         Starting Getty on tty1...
[  OK  ] Started Getty on tty3.
         Starting Getty on tty3...
[  OK  ] Started Getty on tty2.
         Starting Getty on tty2...
[  OK  ] Started Getty on tty4.
         Starting Getty on tty4...
[  OK  ] Reached target Login Prompts.
[  OK  ] Reached target Multi-User.

>> Script 99-makedev.sh was run.

>> Ssh to machine (rescue mode)

# ps aux | grep dhclient
root       348  0.0  0.0 107376  2300 ?        Ss   12:14   0:00 dhclient -lf /var/lib/dhclient/dhclient.leases.em1 -pf /var/run/dhclient.pid -cf /etc/dhclient.conf em1
root       380  0.0  0.0   9088   660 pts/0    S+   12:14   0:00 grep dhclient

>> There is dhclient process.


============================
Reproduced in:
    rear-2.00-3.el7_4.x86_64
FAIL
============================

# cat /etc/rear/local.conf
BACKUP=NBU
OUTPUT_URL=file://
ISO_DEFAULT="automatic"
KERNEL_CMDLINE=debug

# rear -v mkrescue

# reboot

>> Select Relax-and-Recover

>> See in serial console:

Press ENTER to run 90-netbackup.sh 
+ source /etc/sc[  OK  ] Started Initialize Rescue System.
[  OK  ] Started Getty on tty1.
         Starting Getty on tty1...
[  OK  ] Started Getty on tty2.
         Starting Getty on tty2...
[  OK  ] Started Getty on tty4.
         Starting Getty on tty4...
[  OK  ] Started Getty on tty3.
         Starting Getty on tty3...
[  OK  ] Reached target Login Prompts.
[  OK  ] Reached target Multi-User.

>> The script aborted, further scripts was not run

>> Ssh to machine (rescue mode)

# ps aux | grep dhclient
root       384  0.0  0.0   9088   664 pts/0    S+   11:08   0:00 grep dhclient

>> No dhclient process is there

Comment 8 errata-xmlrpc 2018-03-06 21:51:12 UTC
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, 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-2018:0419