cablelabs/snaps-boot

Handle DRP installation errors gracefully

Opened this issue · 2 comments

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.

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.

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