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

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

Conversation

jsmeix
Copy link
Member

@jsmeix jsmeix commented Jan 26, 2017

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 #1142

@jsmeix jsmeix added the enhancement Adaptions and new features label Jan 26, 2017
@jsmeix jsmeix added this to the Rear v2.1 milestone Jan 26, 2017
@jsmeix jsmeix self-assigned this Jan 26, 2017
@jsmeix
Copy link
Member Author

jsmeix commented Jan 26, 2017

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 jsmeix requested a review from gdha January 26, 2017 15:35
@jsmeix
Copy link
Member Author

jsmeix commented Jan 26, 2017

@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
Copy link
Contributor

didacog commented Jan 26, 2017

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
Copy link
Member Author

jsmeix commented Jan 26, 2017

@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
#1182 (comment)
and
#1142 (comment)

@jsmeix
Copy link
Member Author

jsmeix commented Jan 26, 2017

@didacog
with my current implementation the user can specify
the 'gzip' compression for 'initrd.cgz', see
#1142 (comment)

@jsmeix jsmeix changed the title create ReaR initrd preferably with lzma but use gzip as fallback New REAR_INITRD_COMPRESSION to specify the compression of the recovery system initrd Jan 26, 2017
@jsmeix
Copy link
Member Author

jsmeix commented Jan 26, 2017

@didacog
I updated the description in default.conf

@didacog
Copy link
Contributor

didacog commented Jan 26, 2017

@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 (#1182 (comment)) by chance and I've taken a look to it.

Sorry for not reading your later comment: #1182 (comment) :_(

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
Copy link
Member Author

jsmeix commented Jan 27, 2017

@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
Copy link
Member Author

jsmeix commented Jan 27, 2017

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

@jsmeix jsmeix removed the request for review from gdha January 27, 2017 11:57
@jsmeix jsmeix merged commit c4754a3 into rear:master Jan 27, 2017
@jsmeix jsmeix deleted the create_ReaR_initrd_preferably_with_lzma_but_use_gzip_as_fallback_issue1142 branch January 27, 2017 12:03
@didacog
Copy link
Contributor

didacog commented Jan 31, 2017

@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
Copy link
Member Author

jsmeix commented Jan 31, 2017

@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
Copy link
Contributor

didacog commented Jan 31, 2017

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

@didacog
Copy link
Contributor

didacog commented Feb 24, 2017

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

Regards,

@jsmeix
Copy link
Member Author

jsmeix commented Feb 24, 2017

@didacog
many thanks for your feedback!

@didacog
Copy link
Contributor

didacog commented Feb 24, 2017

@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
Copy link
Member Author

jsmeix commented Feb 24, 2017

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
Copy link
Member Author

jsmeix commented Feb 24, 2017

I do not need a pull request.

@didacog
Copy link
Contributor

didacog commented Feb 24, 2017

Great! thanks @jsmeix! ;)

jsmeix added a commit to jsmeix/rear that referenced this pull request Feb 24, 2017
@jsmeix
Copy link
Member Author

jsmeix commented Feb 28, 2017

Done by the way in
#1209
as one part of
6854de2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Adaptions and new features fixed / solved / done
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants