Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PXE_TFTP_PATH behavior different in rear-1.17 #570

Closed
gdha opened this issue Mar 29, 2015 · 11 comments
Closed

PXE_TFTP_PATH behavior different in rear-1.17 #570

gdha opened this issue Mar 29, 2015 · 11 comments
Assignees
Labels
bug The code does not do what it is meant to do
Milestone

Comments

@gdha
Copy link
Member

gdha commented Mar 29, 2015

I installed rear 1.17.0 on my SLES 12 VM named vsaps12 and executed rear mkrescue.

3 lines from my /etc/rear/site.conf:

OUTPUT=PXE
PXE_CONFIG_PATH=/clusterdisk/srv/tftpboot/pxelinux.cfg
PXE_TFTP_PATH=/clusterdisk/srv/tftpboot/sap/

The output of rear dump includes:

Output to PXE
               PXE_CONFIG_PATH = /clusterdisk/srv/tftpboot/pxelinux.cfg
             PXE_CONFIG_PREFIX = rear-
              PXE_CREATE_LINKS = MAC
          PXE_REMOVE_OLD_LINKS =
                 PXE_TFTP_PATH = /clusterdisk/srv/tftpboot/sap
               PXE_TFTP_PREFIX = vsaps12.
                 RESULT_MAILTO =

So I expect the output in the $PXE_TFTP_PATH directory, and there it is.
But when I look at pxelinux.cfg/rear-vsaps12, I see the lines

 label rear
        kernel vsaps12/vsaps12.kernel
        append initrd=vsaps12/vsaps12.initrd.cgz root=/dev/ram0
vga=normal rw selinux=0 console=ttyS0,9600 console=ttyS1,9600 console=tty0

Hm, why that? There is no directory vsaps12/, and the file has been
stored correctly into the sap/ directory. Is this a bug or a feature?

BTW, this is not specific for SLES 12. My SLES 11 SP3 boxes create the
same config with "kernel = $(hostname)/$(hostname).kernel" ...

I think it was nice if either
a) rear writes down the correct directory name in the config or
b) symlinks the directory where the files are put to the directory that
is written in the pxe config ;)

Regards,
Werner

@gdha gdha added the bug The code does not do what it is meant to do label Mar 29, 2015
@gdha gdha self-assigned this Mar 29, 2015
@gdha gdha added this to the Rear v1.18 milestone Mar 29, 2015
@schlomo
Copy link
Member

schlomo commented Mar 29, 2015

@gdha maybe do a 1.17.1 release for this one? If we really broke existing setups I would be happy to fix it ASAP.

@gdha
Copy link
Member Author

gdha commented Mar 29, 2015

@schlomo Indeed I was just looking at the DRLM documentation

We have to manualy add to the client configuration file in the DRLM server called /etc/drlm/clients/client_name.cfg with the next content:

OUTPUT=PXE OUTPUT_PREFIX=PXE BACKUP=NETFS NETFS_PREFIX=BKP BACKUP_URL=nfs://SERVER_IP/DRLM/STORE/client_name OUTPUT_URL=nfs://SERVER_IP/DRLM/STORE/client_name OUTPUT_PREFIX_PXE=client_name/$OUTPUT_PREFIX

You have to replace the SERVER_IP for the IP of the DRLM server and the client_name for the client host name.

I just wonder what the exact link is between OUTPUT_PREFIX_PXE=client_name/$OUTPUT_PREFIX and how our code was changed. Perhaps it was not meant to change?

@schlomo
Copy link
Member

schlomo commented Mar 29, 2015

I miss having tests for this kind of stuff :-( Unfortunately I cannot read from the code exactly how the result should look.

@gdha
Copy link
Member Author

gdha commented Mar 29, 2015

Just made an issue brainupdaters/drlm#12 for DRLM support team so they can verify how serious this issue is for them.

@didacog
Copy link
Contributor

didacog commented Mar 29, 2015

Hello,
Maybe if set $OUTPUT_PREFIX_PXE="" to /etc/rear/site.conf solve this issue.

81_create_pxelinux_cfg.sh result:

kernel /$PXE_KERNEL
append initrd=/$PXE_INITRD root=/dev/ram0 vga=normal rw $KERNEL_CMDLINE

Updated: brainupdaters/drlm#12

Regards,
Didac (DRLM Team)

@schlomo
Copy link
Member

schlomo commented Mar 30, 2015

@didacog we need to fix ReaR so that it behaves like before adding the stuff for DRLM. Forcing users to change their configuration is basically not OK, unless we have a very strong and convincing reason for doing that.

The reason "nobody verified it before release" is not good enough.

Since you also use this code path, could I kindly ask you to look into the question of modifying your patch to keep the old behaviour while enabling your use case?

@didacog
Copy link
Contributor

didacog commented Mar 30, 2015

@schlomo this behavior is the same since rear 1.16. Is not changed in rear 1.17.

In 1.17 we only changed OUTPUT_PREFIX to OUTPUT_PREFIX_PXE in 81_create_pxelinux_cfg.sh. but remain with same behavior since 1.16.

By default ReaR creates $OUTPUT_PREFIX directory on remote location and without this prefix on 81_create_pxelinux_cfg.sh never found kernel and initrd.

This is true without overwriting PXE_CONFIG_PATH or PXE_TFTP_PATH. We never had the need to overwrite these variables.

Regards,
Didac

@schlomo
Copy link
Member

schlomo commented Mar 30, 2015

I see. Maybe nobody really used this stuff since before 1.16, who knows.

Next question for me would be then: Which behaviour do we actually want to have?

@didacog
Copy link
Contributor

didacog commented Mar 30, 2015

setting OUTPUT_PREFIX_PXE="" maintain 1.15 behaviour and works well with the other rear defaults.

by default is OUTPUT_PREFIX_PXE=$OUTPUT_PREFIX on default.conf and works well if no overwritting any variables.

@gdha gdha modified the milestones: Rear v1.17.1, Rear v1.18 Mar 30, 2015
@gdha
Copy link
Member Author

gdha commented Apr 7, 2015

@didacog in pull request d711f87 the following was added to the default.conf file:

+# DRLM need this in order to PXE, at boot, can find kernel and initrd files. We initialize with OUTPUT_PREFIX just to maintain same behaviour without DRLM.
+OUTPUT_PREFIX_PXE="$OUTPUT_PREFIX"
+

If I understand the discussion above well then it is OK for you to make variable OUTPUT_PREFIX_PXE empty in default.conf , right?
Perhaps, it would be better to initialize this variable, if you need it, in script init/default/01_set_drlm_env.sh?

@didacog
Copy link
Contributor

didacog commented Apr 8, 2015

@gdha we have no need to initialize this variable in "init/default/01_set_drlm_env.sh".

If it's defined in default.conf. We can provide a value for it throught the DRLM http config service.

But if initialized empty in default.conf, this breaks some ReaR default behaviors fixed in 1.16.

On the other hand, there is no problem for DRLM if OUTPUT_PREFIX_PXE="" in default.conf, we can overwrite this on our centralized config files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The code does not do what it is meant to do
Projects
None yet
Development

No branches or pull requests

3 participants