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

Configuration error should not lead to installation error #14

Open
pietdevaere opened this issue Sep 28, 2023 · 2 comments
Open

Configuration error should not lead to installation error #14

pietdevaere opened this issue Sep 28, 2023 · 2 comments

Comments

@pietdevaere
Copy link

Currently the installation of the bootstrapper fails if a configuration error occurs (specifically, if an unsigned configuration is received).

This is confusing to users.

It would be better to separate configuration and installation errors.

Proposed new behavior / installation flow

  • Upon installation, network configuration is attempted
  • If configuration fails, installation still succeeds
  • Result of configuration attempt is written to log. Either as "Configuration SUCCESS" or "Configuration FAILED: "
  • Users are told (through print on CLI or out-of-band instructions) to check journalctl after installation to see if the network configuration was successful
@FR4NK-W
Copy link
Contributor

FR4NK-W commented Sep 29, 2023

Thank you for reporting this issue.

I like your suggestion.

The current behavior records the package status as half-configured if SCION bootstrapping was not successful.
The behavior proposed in this issue is to report the package as installed and ignore whether SCION bootstrapping was successful for the purpose of package installation and report the network configuration failure separately.

The behavior you propose has the advantage that the successful installation of the SCION bootstrapper is not conflated with the successful bootstrapping into a SCION network.
This is desirable when installing the package from a network that does not have SCION support, with the aim to have it later reconfigure the network configuration when in a network that does support SCION.
It is also fine when the package installation happens interactively as package installation and configuration success can be reported separately.
On the other hand, it has the drawbacks that it requires explicit notification of the user that the package was not able to perform its function and that in non-interactive mode neither the package state nor the unit state indicate if the network configuration was successful.

The proposed behavior is implemented in PR #15 :

$git blame HEAD res/packaging/debian/DEBIAN/postinst | grep -v "#" | wc -l && git diff --stat
37
res/packaging/debian/DEBIAN/postinst | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)

Note that explicitly logging the last configuration attempt result of the unit as is requires dropping support for older Ubuntu versions.
Feel free to provide an alternative solution not depending on the InvocationID.

@FR4NK-W
Copy link
Contributor

FR4NK-W commented Oct 5, 2023

@pietdevaere : PR #15 has been merged.

You can test in the pre-release build if it also satisfies your use case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants