4

After a reboot my instance is not connected to the network, connecting to serial port i can see the error:

[ 1415.293774] cloud-init[31802]: Cloud-init v. 0.7.7 running 'init' at Tue, 28 Jun 2016 09:51:02 +0000. Up 1415.24 seconds.
[ 1415.294047] cloud-init[31802]: ci-info: +++++++++++++++++++++++++++Net device info++++++++++++++++++++++++++++
[ 1415.294140] cloud-init[31802]: ci-info: +--------+-------+-----------+-----------+-------+-------------------+
[ 1415.294226] cloud-init[31802]: ci-info: | Device |   Up  |  Address  |    Mask   | Scope |     Hw-Address    |
[ 1415.294319] cloud-init[31802]: ci-info: +--------+-------+-----------+-----------+-------+-------------------+
[ 1415.294404] cloud-init[31802]: ci-info: |  ens4  | False |     .     |     .     |   .   | 42:01:0a:84:00:02 |
[ 1415.294487] cloud-init[31802]: ci-info: |   lo   |  True | 127.0.0.1 | 255.0.0.0 |   .   |         .         |
[ 1415.294572] cloud-init[31802]: ci-info: |   lo   |  True |  ::1/128  |     .     |  host |         .         |
[ 1415.294654] cloud-init[31802]: ci-info: +--------+-------+-----------+-----------+-------+-------------------+
[ 1415.294735] cloud-init[31802]: 2016-06-28 09:51:02,536 - util.py[WARNING]: failed of stage init
Jun 28 09:51:02 demo-project cloud-init[31802]: Cloud-init v. 0.7.7 running 'init' at Tue, 28 Jun 2016 09:51:02 +0000. Up 1415.24 seconds.
Jun 28 09:51:02 demo-project cloud-init[31802]: ci-info: +++++++++++++++++++++++++++Net device info++++++++++++++++++++++++++++
Jun 28 09:51:02 demo-project cloud-init[31802]: ci-info: +--------+-------+-----------+-----------+-------+-------------------+
Jun 28 09:51:02 demo-project cloud-init[31802]: ci-info: | Device |   Up  |  Address  |    Mask   | Scope |     Hw-Address    |
Jun 28 09:51:02 demo-project cloud-init[31802]: ci-info: +--------+-------+-----------+-----------+-------+-------------------+
Jun 28 09:51:02 demo-project cloud-init[31802]: ci-info: |  ens4  | False |     .     |     .     |   .   | 42:01:0a:84:00:02 |
Jun 28 09:51:02 demo-project cloud-init[31802]: ci-info: |   lo   |  True | 127.0.0.1 | 255.0.0.0 |   .   |         .         |
Jun 28 09:51:02 demo-project cloud-init[31802]: ci-info: |   lo   |  True |  ::1/128  |     .     |  host |         .         |
Jun 28 09:51:02 demo-project cloud-init[31802]: ci-info: +--------+-------+-----------+-----------+-------+-------------------+
Jun 28 09:51:02 demo-project cloud-init[31802]: 2016-06-28 09:51:02,536 - util.py[WARNING]: failed of stage init
[ 1415.298376] cloud-init[31802]: failed run of stage init
[ 1415.298487] cloud-init[31802]: ------------------------------------------------------------
[ 1415.298591] cloud-init[31802]: Traceback (most recent call last):
[ 1415.298678] cloud-init[31802]:   File "/usr/bin/cloud-init", line 520, in status_wrapper
[ 1415.298763] cloud-init[31802]:     ret = functor(name, args)
[ 1415.298847] cloud-init[31802]:   File "/usr/bin/cloud-init", line 250, in main_init
[ 1415.298929] cloud-init[31802]:     init.fetch(existing=existing)
[ 1415.299010] cloud-init[31802]:   File "/usr/lib/python3/dist-packages/cloudinit/stages.py", line 322, in fetch
[ 1415.299096] cloud-init[31802]:     return self._get_data_source(existing=existing)
[ 1415.299178] cloud-init[31802]:   File "/usr/lib/python3/dist-packages/cloudinit/stages.py", line 241, in _get_data_source
[ 1415.299267] cloud-init[31802]:     util.del_file(self.paths.instance_link)
[ 1415.299454] cloud-init[31802]:   File "/usr/lib/python3/dist-packages/cloudinit/util.py", line 1567, in del_file
[ 1415.299542] cloud-init[31802]:     raise e
[ 1415.299624] cloud-init[31802]:   File "/usr/lib/python3/dist-packages/cloudinit/util.py", line 1564, in del_file
[ 1415.299704] cloud-init[31802]:     os.unlink(path)
[ 1415.299785] cloud-init[31802]: IsADirectoryError: [Errno 21] Is a directory: '/var/lib/cloud/instance'
[ 1415.299867] cloud-init[31802]: ------------------------------------------------------------
Jun 28 09:51:02 demo-project cloud-init[31802]: failed run of stage init
Jun 28 09:51:02 demo-project cloud-init[31802]: ------------------------------------------------------------
Jun 28 09:51:02 demo-project cloud-init[31802]: Traceback (most recent call last):
Jun 28 09:51:02 demo-project cloud-init[31802]:   File "/usr/bin/cloud-init", line 520, in status_wrapper
Jun 28 09:51:02 demo-project cloud-init[31802]:     ret = functor(name, args)
Jun 28 09:51:02 demo-project cloud-init[31802]:   File "/usr/bin/cloud-init", line 250, in main_init
Jun 28 09:51:02 demo-project cloud-init[31802]:     init.fetch(existing=existing)
Jun 28 09:51:02 demo-project cloud-init[31802]:   File "/usr/lib/python3/dist-packages/cloudinit/stages.py", line 322, in fetch
Jun 28 09:51:02 demo-project cloud-init[31802]:     return self._get_data_source(existing=existing)
Jun 28 09:51:02 demo-project cloud-init[31802]:   File "/usr/lib/python3/dist-packages/cloudinit/stages.py", line 241, in _get_data_source
Jun 28 09:51:02 demo-project cloud-init[31802]:     util.del_file(self.paths.instance_link)
Jun 28 09:51:02 demo-project cloud-init[31802]:   File "/usr/lib/python3/dist-packages/cloudinit/util.py", line 1567, in del_file
Jun 28 09:51:02 demo-project cloud-init[31802]:     raise e
Jun 28 09:51:02 demo-project cloud-init[31802]:   File "/usr/lib/python3/dist-packages/cloudinit/util.py", line 1564, in del_file
Jun 28 09:51:02 demo-project cloud-init[31802]:     os.unlink(path)
Jun 28 09:51:02 demo-project cloud-init[31802]: IsADirectoryError: [Errno 21] Is a directory: '/var/lib/cloud/instance'
Jun 28 09:51:02 demo-project cloud-init[31802]: ------------------------------------------------------------
Job for cloud-init.service failed because the control process exited with error code. See "systemctl status cloud-init.service" and "journalctl -xe" for details.

On the serial port i have this error:

Jun 28 09:52:14 demo-project google: Waiting for metadata server, attempt 859
Jun 28 09:52:14 demo-project google: There is likely a problem with the network.

● cloud-init.service - Initial cloud-init job (metadata service crawler)
   Loaded: loaded (/lib/systemd/system/cloud-init.service; enabled; vendor prese
   Active: failed (Result: exit-code) since Tue 2016-06-28 09:51:02 UTC; 1min 45
  Process: 31802 ExecStart=/usr/bin/cloud-init init (code=exited, status=1/FAILU
 Main PID: 31802 (code=exited, status=1/FAILURE)

How can I fix this?

Skar3
  • 141
  • 3
  • Before rebooting the instance, did you do any changes on the networking side? if so, you can revert the changes by attaching the affected disk as a secondary disk to another instance, fix it and recreate a new instance with it. – George Jun 28 '16 at 23:25

1 Answers1

1

You can now interact with the serial port output in order to try fixing the machine without the need to detach the disk and then attach it to another instance, however this is still in Beta. You can have more information about it in this Help Center article.

George
  • 629
  • 3
  • 6