#1182 PR merged: New REAR_INITRD_COMPRESSION to specify the compression of the recovery system initrd

Labels: enhancement, fixed / solved / done

jsmeix opened issue at 2017-01-26 12:36:

Now pack/GNU/Linux/900_create_initramfs.sh
first tries to create initrd.xz with the newer xz-lzma compression and
if that fails it falls back to creating initrd.cgz with gzip compression.
Because now two ReaR initrd filenames are used
initrd.xz versus initrd.cgz
the global variable REAR_INITRD_FILENAME is set
and used in various subsequent scripts where before
the filename initrd.cgz was hardcoded.
See https://github.com/rear/rear/issues/1142

jsmeix commented at 2017-01-26 14:58:

I changed my first implementation
from "automatically do the right thing"
so that now by default still gzip is used
plus a new config variable REAR_INITRD_COMPRESSION
so that the user can if needed specify the compression
as described in default.conf.

jsmeix commented at 2017-01-26 15:39:

@gdha
if you like you may have a look what I did here.
For me (one SLES12) it "just works".
Also the lzma compressed initrd.
Becaue I did not change the default
I think it is reasonably safe against regressions.
Finally with the new REAR_INITRD_FILENAME variable
all the scripts that had hardcoded 'initrd.cgz'
are now cleaned up in this regard.
Bottom line:
From my current point of view I like it much
so that I think it should be merged.

didacog commented at 2017-01-26 15:49:

Hi @jsmeix,

REAR_INITRD_FILENAME is not properly initialized in default.conf.
Also, if change to LZMA by default will cause problems with DRLM.
I encourage you to keep GZIP compression and REAR_INITRD_FILENAME=initrd.cgz by default.

Regards,

jsmeix commented at 2017-01-26 16:52:

@didacog
many thanks for having a look!
I appreciate your feedback because I was not aware
that there could be something "outside of ReaR"
which could be affected by a change of compression
or filename of ReaR's "own" initrd.

REAR_INITRD_FILENAME is no config variable
but a global variable that is used "only internally"
so that it is not mentioned in default.conf
REAR_INITRD_FILENAME is not intended to be set
by the user and if it is set by the user this does not have
any effect because pack/GNU/Linux/900_create_initramfs.sh
sets it "right" regardless of what the user may have set.
In the case switch in pack/GNU/Linux/900_create_initramfs.sh
the default case is: REAR_INITRD_FILENAME="initrd.cgz"

In my current implementation the default is not changed, see
https://github.com/rear/rear/pull/1182#issuecomment-275409022
and
https://github.com/rear/rear/issues/1142#issuecomment-275394223

jsmeix commented at 2017-01-26 16:56:

@didacog
with my current implementation the user can specify
the 'gzip' compression for 'initrd.cgz', see
https://github.com/rear/rear/issues/1142#issuecomment-275412073

jsmeix commented at 2017-01-26 17:54:

@didacog
I updated the description in default.conf

didacog commented at 2017-01-26 20:24:

@jsmeix
Thanks for your clarification, I missed some comments in the pull request while I was in the mobile, I've seen your 1st comment (https://github.com/rear/rear/pull/1182#issue-203361250) by chance and I've taken a look to it.

Sorry for not reading your later comment: https://github.com/rear/rear/pull/1182#issuecomment-275409022 :_(

I apreciate if, before changes like this, we can start a discussion to prevent possible regressions with the integration with DRLM, just to, in case of something will change at the end, we'll can "syncronize our clocks" and solve the problem without complications. ;)

See you next week at fosdem!! ;)

Regards,

jsmeix commented at 2017-01-27 09:22:

@didacog
to be able to prevent possible regressions
with the integration with DRLM
I would very much appreciate it if you could
provide some general documentation about
in waht way DRLM depends on ReaR, in particular
on what ReaR internals DRLM depends on.

When I change things in ReaR I try to
keep ReaR working backward compatible
which means for me that a user does not need
to adapt his settings in /etc/rear/local.conf
but anything else is currently considered by me
to be ReaR internals that I can change as I like.

Accordingly I need a better understanding
what in addition to the ReaR config variables
are not ReaR internals.

jsmeix commented at 2017-01-27 09:22:

@gdha
if you do not object, I would like to merge it soon.

didacog commented at 2017-01-31 16:56:

@jsmeix
DRLM depends on ReaR PXE (kernel & initrd build) included and the init stage where ReaR downloads it's configuration from DRLM.

We want to adjust it as soon as possible to support multiple backup methods new feature in ReaR from DRLM also,....

But I'm looking forward to see you at FOSDEM next Saturday, I hope you'll have time to attend to the DRLM workshop talk and be able to know a little bit more about DRLM. ;-)

Regards,

jsmeix commented at 2017-01-31 17:16:

@didacog
I will be there the whole Saturday
so that after you watched my glorious and famous
"Essentials about Disaster Recovery with Relax-and-Recover"
introduction, I will of course watch your even greater
"Disaster Recovery management with ReaR and DRLM"
;-)

For others what we are talking about here, see
https://fosdem.org/2017/schedule/track/backup_and_disaster_recovery/

didacog commented at 2017-01-31 17:56:

@jsmeix I will be there, ready, at 10:45 for sure ;-)

didacog commented at 2017-02-24 10:02:

@jsmeix The problem is solved now on DRLM side (v2.1.1). Works well with LZMA (initrd.xz). ;)

Regards,

jsmeix commented at 2017-02-24 10:56:

@didacog
many thanks for your feedback!

didacog commented at 2017-02-24 13:12:

@jsmeix you're welcome.

These lines in default.conf can be deleted:

1382 # An initrd.xz with lzma compression is known not to work together with DRLM,
1383 # see https://github.com/rear/rear/pull/1182#issuecomment-275423441

Do you need a pull request?

Regards,

jsmeix commented at 2017-02-24 13:41:

I think to be backward compatible
cf. https://github.com/rear/rear/wiki/Coding-Style
those lines should be better changed to

# An initrd.xz with lzma compression is known not to work together with DRLM prior to version 2.1.1
# see https://github.com/rear/rear/pull/1182#issuecomment-275423441
# but lzma compression works with DRLM since version 2.1.1
# see https://github.com/rear/rear/pull/1182#issuecomment-282252770

jsmeix commented at 2017-02-24 13:41:

I do not need a pull request.

didacog commented at 2017-02-24 13:42:

Great! thanks @jsmeix! ;)

jsmeix commented at 2017-02-28 10:02:

Done by the way in
https://github.com/rear/rear/pull/1209
as one part of
https://github.com/rear/rear/commit/6854de22ceaf8679cfa1d42ad65176db0456ad94


[Export of Github issue for rear/rear.]