The service variable needs to be initialized before the
metadata discovery check, as a plugin might request a reboot
after the pre-metadata stage and the service variable will remain
uninitialized.
Closes-bug: #1666258
Change-Id: I4028b76f787267476b5320e5a480f54b58c59293