diff options
author | Mike Gerdts <mike.gerdts@joyent.com> | 2018-04-18 13:55:17 -0400 |
---|---|---|
committer | Scott Moser <smoser@brickies.net> | 2018-04-18 13:55:17 -0400 |
commit | 4c573d0e0173d2b1e99a383c54a0a6c957aa1cbb (patch) | |
tree | 299a60fe312a0f0752f70a968da45269a7c8ab5a /tests/unittests/test_vmware | |
parent | 025ddc0329d9314f131cea35075734916797b439 (diff) | |
download | vyos-cloud-init-4c573d0e0173d2b1e99a383c54a0a6c957aa1cbb.tar.gz vyos-cloud-init-4c573d0e0173d2b1e99a383c54a0a6c957aa1cbb.zip |
DataSourceSmartOS: fix hang when metadata service is down
If the metadata service in the host is down while a guest that uses
DataSourceSmartOS is booting, the request from the guest falls into the
bit bucket. When the metadata service is eventually started, the guest
has no awareness of this and does not resend the request. This results in
cloud-init hanging forever with a guest reboot as the only recovery
option.
This fix updates the metadata protocol to implement the initialization
phase, just as is implemented by mdata-get and related utilities. The
initialization phase includes draining all pending data from the serial
port, writing an empty command and getting an expected error message in
reply. If the initialization phase times out, it is retried every five
seconds. Each timeout results in a warning message: "Timeout while
initializing metadata client. Is the host metadata service running?" By
default, warning messages are logged to the console, thus the reason for a
hung boot is readily apparent.
LP: #1667735
Diffstat (limited to 'tests/unittests/test_vmware')
0 files changed, 0 insertions, 0 deletions