#1183 Issue closed
: migrate_network_configuration_files flaw if IPADDR in ip_addr/prefix format¶
Labels: bug
, won't fix / can't fix / obsolete
petr-gansel opened issue at 2017-01-27 19:02:¶
Relax-and-Recover (rear) Issue Template¶
Please fill in the following items before submitting a new issue (quick response is not guaranteed with free support):
-
rear version (/usr/sbin/rear -V): Relax-and-Recover 2.00 / Git
-
OS version (cat /etc/rear/os.conf or lsb_release -a):
LSB Version: core-2.0-noarch:core-3.2-noarch:core-4.0-noarch:core-2.0-ppc64:core-3.2-ppc64:core-4.0-ppc64:desktop-4.0-noarch:desktop-4.0-ppc32:desktop-4.0-ppc64:graphics-2.0-noarch:graphics-2.0-ppc32:graphics-2.0-ppc64:graphics-3.2-noarch:graphics-3.2-ppc32:graphics-3.2-ppc64:graphics-4.0-noarch:graphics-4.0-ppc32:graphics-4.0-ppc64
Distributor ID: SUSE LINUX
Description: SUSE Linux Enterprise Server 11 (ppc64)
Release: 11
Codename: n/a -
rear configuration files (cat /etc/rear/site.conf or cat /etc/rear/local.conf):
OUTPUT=BOOTP
OUTPUT_URL="nfs://vercaix/install/nim/img/backup"
BOOTP_TFTP_URL="nfs://vercaix/tftpboot/restobot"
BOOTP_TFTP_PREFIX=$HOSTNAME.
#BOOTP_RECOVER_MODE="unattended"
BOOTP_RECOVER_MODE=
BOOTP_CONFIG_URL="nfs://vercaix/tftpboot/restobot"
BOOTP_CONFIG_PREFIX="bootp-"
BOOTP_REMOVE_OLD_LINKS=1
BOOTP_CREATE_LINKS=MAC
BACKUP=NETFS
BACKUP_URL="nfs://vercaix/install/nim/img/backup"
USE_STATIC_NETWORKING=1
WAIT_SEC=10
BOOT_OVER_SAN=y
AUTOEXCLUDE_MULTIPATH=n
PRE_RECOVERY_SCRIPT="/usr/esus/bin/restobot_inject-pre.sh"
POST_RECOVERY_SCRIPT="/usr/esus/bin/restobot_inject-post.sh"
ISO_MKISOFS_BIN="/usr/bin/genisoimage"
REQUIRED_PROGS=(
"$SCRIPT_FILE"
bash
ksh
awk
cpio
dd
df
getopt
ip
tar
sort
mv
uniq
grep
loadkeys
kbd_mode
dumpkeys
diff
join
pwd
file
pidof
sync
strings
multipath
multipathd
parted
lilo
sfdisk
lparstat
blkid
)
COPY_AS_IS=(
${COPY_AS_IS[@]} /etc/esus /usr/esus/bin/restobot_inject-post.sh /usr/esus/bin/restobot_inject-pre.sh
) -
Are you using legacy BIOS of UEFI boot?
SMS -
Brief description of the issue:
Network configuration modification in $TARGET_FS_ROOT/etc/sysconfig//ifcfg-${dev}* not work correctly if IPADDR variable specified in ip_addr/prefix format. -
Work-around, if any:
--- finalize/GNU/Linux/420_migrate_network_configuration_files.sh.orig 2017-01-18 15:17:17.420000003 +0100
+++ finalize/GNU/Linux/420_migrate_network_configuration_files.sh 2017-01-27 19:22:59.460000004 +0100
@@ -68,7 +68,11 @@
nmask=""
nip="$new_ip" # keep ipaddress/cidr
else
- nip="${new_ip%%/*}" # only keep ipaddress
+ if grep -qE '^NETMASK=' $network_file;then
+ nip="${new_ip%%/*}" # only keep ipaddress
+ else
+ nip="${new_ip}" # keep ipaddress format
+ fi
fi
# TODO: what if NETMASK keyword is not defined? Should be keep new_ip then??
SED_SCRIPT="s#^IPADDR=.*#IPADDR='${nip}'#g;s#^NETMASK=.*#NETMASK='${nmask}'#g;s#^NETWORK=.*#NETWORK=''#g;s#^BROADCAST=.*#BROADCAST=''#g;s#^BOOTPROTO=.*#BOOTPROTO='static'#g;s#STARTMODE='[mo].*#STARTMODE='auto'#g;/^IPADDR_/d;/^LABEL_/d;/^NETMASK_/d"
gdha commented at 2017-01-30 07:13:¶
Hum, does it work with OUTPUT=BOOTP
?? I cannot remember we ever
implemented this. I guess you meant OUTPUT=PXE
?
Anyhow, thanks for reporting it and the fix. I will review it soon.
petr-gansel commented at 2017-01-30 07:46:¶
No, BOOTP is my extension which I need in project/environment where PXE
is not an option.
It's based on PXE code.
On 30 Jan 2017, at 08:13, gdha notifications@github.com wrote:
Hum, does it work with OUTPUT=BOOTP?? I cannot remember we ever implemented this. I guess you meant OUTPUT=PXE?
Anyhow, thanks for reporting it and the fix. I will review it soon.—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub https://github.com/rear/rear/issues/1183#issuecomment-275993564, or mute the thread https://github.com/notifications/unsubscribe-auth/AYNxpoSJ1ceEAM1h6_ZaHJ8azDAG2F7Qks5rXY2CgaJpZM4LwGYh.
jsmeix commented at 2017-01-30 09:41:¶
@gdha
I have zero experience with PXE or BOOTP
so that I cannot really help with such issues.
If
https://github.com/rear/rear/pull/1184
looks o.k. for you please merge it.
gdha commented at 2017-01-30 09:52:¶
@petr-gansel Could you explain the difference between BOOTP and PXE - I am curious...
jsmeix commented at 2017-01-30 09:55:¶
@petr-gansel
regarding your "BOOTP is my extension" in
https://github.com/rear/rear/issues/1183#issuecomment-275997673
If you think your extension could be also useful for
other ReaR users, we would very much appreciate it
if you could contribute it to Relax-and-Recover, cf.
https://github.com/rear/rear/blob/master/.github/CONTRIBUTING.md
and see also "How to contribute to Relax-and-Recover" at
https://en.opensuse.org/SDB:Disaster_Recovery
didacog commented at 2017-01-30 10:43:¶
@petr-gansel I am curious also...
I thought that should be the same (no changes) in PXE code in ReaR and
just setting: allow bootp; in dhcpd.conf should work for PXE and BOOTP
clients.
Or you're only talking about syslinux menu file generation code in ReaR? Because the initrd and kernel should work the same.
Thanks in advance!
petr-gansel commented at 2017-01-30 11:25:¶
It's really nearly the same as PXE, the only difference is that I'm
generating /etc/bootptab entry for bootp server.
The reason why I'm doing this is that I don't have either PXE or DHCP
server but using AIX NIM with a BOOTP server as a restore service
provider.
didacog commented at 2017-01-30 11:35:¶
Ok, is what I thought. Thanks!
May you can take a look at DRLM Project (www.drlm.org). Is a central management tool for ReaR similar to NIM, but manages ReaR deployments easier.
Regards,
gdha commented at 2017-03-13 10:58:¶
@petr-gansel What shall we do with your https://github.com/rear/rear/pull/1184 pull request? Will you update it or shall we just cancel it?
jsmeix commented at 2017-05-22 07:25:¶
Because of possible backward incompatible changes in
https://github.com/rear/rear/pull/1184
I post-pone it for a later release after 2.1 (for now for 2.2).
gdha commented at 2017-07-11 06:08:¶
Due to no feedback I remove the release commitment.
jsmeix commented at 2017-12-01 13:51:¶
According to
https://github.com/rear/rear/pull/1184
I also close this one as "won't fix / can't fix".
[Export of Github issue for rear/rear.]