quattor / aii

Automated Installation Infrastructure
www.quattor.org
Apache License 2.0
7 stars 16 forks source link

aii-rci (aii-shellfe --reinstall) exit code is misleading #309

Open itkovian opened 5 years ago

itkovian commented 5 years ago

If aii-rci encounters an error along the way, the exit code is still 0. For example:

  [root@host ~]# aii-rci machine.domain
  [INFO] remove step for reinstall option.
  echo $?
  [ERROR] host_disable got error (Error CertificateOperationError/4301/Certificate operation cannot be completed: Unable to communicate with CMS (500))
  [INFO] ran remove on 1 nodes
  [INFO] configure step for reinstall option.
  [INFO] DHCP will be updated and restarted if needed
  [ERROR] host_add got error (Error NotFound/4001/DNS zone domain. not found)
  [ERROR] host_mod got error (Error ValidationError/3009/invalid 'password': Password cannot be set on enrolled host.)
  [ERROR] freeipa post_reboot: no OTP for machine.domain
  [INFO] ran configure on 1 nodes
  [INFO] install step for reinstall option.
  [INFO] ran install on 1 nodes
  [root@host ~]# echo $?
  0
jrha commented 4 years ago

@stdweird is aii-rci UGent specific?

stdweird commented 4 years ago

it's used to be, now it's aii-shellfe --reinstall

jrha commented 4 years ago

aha!

jrha commented 3 years ago

Confirmed in to occur in aii-shellfe:

# aii-shellfe --reinstall machine.domain; echo $?
[INFO] remove step for reinstall option.
[ERROR] No node matches machine(.domain)
[INFO] configure step for reinstall option.
[ERROR] No node matches machine(.domain)
[INFO] install step for reinstall option.
[ERROR] No node matches machine(.domain)
0