Skip to contentSkip to conversation

PROBLEM: Errors in instmods_1 are ignored

DISCUSSION Dennis Schridde 2 participants 5 messages May 9, 2013 – May 28, 2013 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

Hello!

I found a problem with add_drivers / module installation.

Current behaviour:
When instmods_1 cannot find a module (for example), it returns an error (1). It's caller, instmods, aborts the installation of any further modules and also returns an error (1). dracut then ignores that error and does not even output a warning.

Expected behaviour:
Variant 1: instmods outputs a warning when instmods_1 returns an error, but continues to install the other modules.
Variant 2: dracut outputs an error message, including the module that failed, and aborts the whole operation.

See also: https://github.com/haraldh/dracut/issues/8

Best regards,
Dennis

#1 lore raw

Hello!

Am Donnerstag, 9. Mai 2013, 13:18:02 schrieb Dennis Schridde:

Quoted 1 line

I found a problem with add_drivers / module installation.

Did anyone have a look at this? How shall it be fixed?

Best regards,
Dennis

#2 lore raw
In reply to Dennis Schridde

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 9 lines · Dennis Schridde

Hello!

I found a problem with add_drivers / module installation.

Current behaviour: When instmods_1 cannot find a module (for example), it returns an error (1). It's caller, instmods, aborts the installation of any further modules and also returns an error (1). dracut then ignores that error and does not even output a warning.

Quoted 9 lines

Expected behaviour: Variant 1: instmods outputs a warning when instmods_1 returns an error, but continues to install the other modules. Variant 2:
dracut outputs an error message, including the module that failed, and aborts the whole operation.

See also: https://github.com/haraldh/dracut/issues/8

Best regards, Dennis

instmods can take two options:

- -c : abort on error
- -s : silently abort on error

instmods -c a b c || exit 1

will give you:

F: Failed to install a

and dracut will exit.

instmods ignores the errors.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.13 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBAgAGBQJRpJyOAAoJEANOs3ABTfJwGtYP+wQIuA2ovQdDoR6wmm5xxoTY Zy9DLRWQ3mouw7pVp//U0rF98q+9ZGABmMSrhbxwdKgIF0BuCTbRzjW26rrLisuZ gprv0XxkBEb7EKlwjKFcb706/MSQAI+rg+uDU1clgviBjjVcCcOJUXLCohu1Zh2F bRKQq89nUo0YUndK/l2hXN21qxrlPOJc8WWFuUDxn6mBH1yekBo6keewyXzXR6Sr wvHDNni6hbWX3PJMj6JBpFaheF9Vl2NMd3eMXCj1X1dbYRD0MFngg7K/fIgUOkJY 33UKWQ1Ijfw7uFMKYKP1ne/kxcNu6e5AbTpd1XXn6SRsC/f/fkVwxJW9DIDCrm+Z ihA3rBCNvlvc/6m9/OU2ZwGpUXkwwwPMbHxBusG/o9Gu8qiT1UVpDVsAoPrsp4y+ ZVmbD/3gN7AK9XbBqjajJL3R6ObKMofwJkEK7Ia3GWPXii8qKQ8/xKbehex2K48e sWhxMAbkSL7D2PGXd4dj4RUxlBcs+DxmxXLItG4ncJ90XpZ62wLZIBT1HsUfasT/ S9th5iXoC1ZfdIIlfpu8ISQygD4z7D1SB4zYPnHS/R43FL2DC0LljqyVp01Qpjpg +Q/DXIQAWA4usRU6UcULeZFhFWA/SSa8d4ted/POGXynKiOkFIubM38mnCPe6yJz 3b+z9nLqHdhF4FtY1G6B
=jgLC
-----END PGP SIGNATURE-----

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw

Hello Harald!

Am Dienstag, 28. Mai 2013, 14:01:18 schrieb Harald Hoyer:

Quoted 8 lines · Dennis Schridde

instmods -c a b c || exit 1

will give you:

F: Failed to install a

and dracut will exit.

So this could be used to implement variant 2 of my "expected behaviour. It would be nice if you could change dracut in this way. :)

Quoted 1 line

instmods ignores the errors.

It seems to me it currently does not. At least no module that comes after the failed one in the list is being installed. When looking at the code, errors indeed seemed to be ignored.

Best regards,
Dennis

#5 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 6 lines · Dennis Schridde

Hello Harald!

Am Dienstag, 28. Mai 2013, 14:01:18 schrieb Harald Hoyer:

Quoted 3 lines

On 05/09/2013 01:18 PM, Dennis Schridde wrote: instmods -c a b c || exit 1

Quoted 7 lines
Quoted 5 lines

will give you:

F: Failed to install a

and dracut will exit.

So this could be used to implement variant 2 of my "expected behaviour. It
would be nice if you could change dracut in this way. :)

Why change? It already works that way.

Quoted 8 lines
Quoted 2 lines

instmods ignores the errors.

It seems to me it currently does not. At least no module that comes after the failed one in the list is being installed. When looking at the code, errors indeed seemed to be ignored.

Best regards, Dennis

Hmm, when I checked that before writing this email, dracut git HEAD was working as I described in the mail.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.13 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBAgAGBQJRpLtkAAoJEANOs3ABTfJw3pYQAK/vWk+AHyk4Vg+gi0i0T9OJ f4vrgS+jRDObwhi3bi+GL/Q1v8HcLgqcfD+ds5RbU3HmC3WwqqsdIfu9o9jTFlzZ MrrUrHtG+47rSpfWlGfa38rlvYSK8qcd1tvR7WIUTaMDjTO1tVyXf+vGoAfmjYKF kiy2NlqBKk85cySMj18KICYmy7yT/XOBUs46xO1gXd+MNl4r9XseKYe2J1PEQjvy 2N3UsMb6BRvEPF7rGrce/y5zuKPU/zdvulJ91kHit/rte81N9KtkP94bqPeBqMSj hVfLn9Fi5uvZ60j+eyObgvv/pR3J/NCuQwlMSR2tSq8fGfuDjpqW145iWWk7ki5t 9KuxEsgcsoYuN/8zaQfR4VzWFfIEK1BbgrG9vahoxMRrfKGQVyd5uxrI5cFFATqv pGMEFu9tS5eEB84QZ92I/nHxd//FMM4aOXzkvXfyEg0Dkx+x/1WDo8/qmOknGCe7 D082erOcWhr1USM2QTve1X593F7aup5C1OuKcx7s++J5RgeN4qgbZNdeavmZ0yw9 9Ib98MElrY0zX0F6AQvdb7ge0ihoZzVFWWXRmKzNDoeR0+6nxnRYw6txM7Gd5psG GBYjU/QP/CMMLq/8B8P5EZDocm5CseA3FjjoHI+H6428M0YGqJbhzAZK9L5BMGIr dP7P7aFBWEqFJlnVT7lA
=T3vs
-----END PGP SIGNATURE-----