cablelabs / snaps-boot

Linux install and network setup for SNAPS
Apache License 2.0
12 stars 11 forks source link

Handle DRP installation errors gracefully #233

Open bo-quan opened 5 years ago

bo-quan commented 5 years ago

The current installer does not handle unhappy paths gracefully, e.g.,

TASK [Upload Ubuntu 16.04 ISO to DRP] *** fatal: [localhost]: FAILED! => {"changed": true, "cmd": ["drpcli", "bootenvs", "uploadiso", "ubuntu-16.04-install"], "delta": "0:00:01.084806", "end": "2019-02-05 14:33:11.110485", "msg": "non-zero return code", "rc": 1, "start": "2019-02-05 14:33:10.025679", "stderr": "Error: BootEnv ubuntu-16.04-install already has all required ISO files", "stderr_lines": ["Error: BootEnv ubuntu-16.04-install already has all required ISO files"], "stdout": "", "stdout_lines": []}

The workaround is to manually delete the the .iso file from the dr-provision/tftp directory, and then re-run the installation. Need to handle such errors automatically.

bo-quan commented 5 years ago

One customer reported that when iso file was not uploaded successfully, the iso upload step reported success and moved forward. The iso file upload failure should be handled correctly.

ramanavakka commented 5 years ago

Here is the log for the above issue Explode ISO: SHA256 bad. actual: 16afb1375372c57471ea5e29803a89a5a6bd1f6aabea2e5e34ac1ab7eb9786ac expected: c94de1cc2e10160f325eb54638a5b5aa38f181d60ee33dae9578d96d932ee5f8 frontend bootenv.go:381 [14:50] Authenticated user rocketskates from ::1