instance-data.json not persisted across reboot.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
Fix Released
|
High
|
Chad Smith |
Bug Description
cloud-init v18.3 /run/cloud-
Affects: Xenial series or later
Any attempt by services/consumers to re-use instance data after a machine reboots will fail.
To reproduce:
$ lxc launch ubuntu-daily:xenial test-xenial
Creating test-xenial
Starting test-xenial
$ lxc exec test-xenial cat /ruc/cloud-
{
"base64-
"ds/vendor-data",
...
$ lxc exec test-xenial reboot
$ lxc exec test-xenial cat /ruc/cloud-
cat: /run/cloud-
Note: cloud-init only writes instnace-data.json when processing meta-data on the 1st boot via DataSource.get_data call. We either need to persist this data somewhere else, or write it again per boot.
Related branches
- Server Team CI bot: Approve (continuous-integration)
- cloud-init Commiters: Pending requested
-
Diff: 1911 lines (+1094/-115)32 files modifiedbash_completion/cloud-init (+2/-0)
cloudinit/cmd/devel/__init__.py (+25/-0)
cloudinit/cmd/devel/parser.py (+4/-1)
cloudinit/cmd/devel/render.py (+90/-0)
cloudinit/cmd/devel/tests/test_render.py (+101/-0)
cloudinit/cmd/main.py (+15/-1)
cloudinit/handlers/__init__.py (+8/-3)
cloudinit/handlers/boot_hook.py (+5/-7)
cloudinit/handlers/cloud_config.py (+5/-10)
cloudinit/handlers/jinja_template.py (+137/-0)
cloudinit/handlers/shell_script.py (+3/-6)
cloudinit/handlers/upstart_job.py (+3/-6)
cloudinit/helpers.py (+4/-0)
cloudinit/log.py (+10/-2)
cloudinit/net/__init__.py (+7/-0)
cloudinit/net/tests/test_init.py (+8/-3)
cloudinit/sources/__init__.py (+31/-16)
cloudinit/sources/helpers/openstack.py (+18/-1)
cloudinit/sources/tests/test_init.py (+61/-14)
cloudinit/stages.py (+14/-8)
cloudinit/templater.py (+25/-3)
cloudinit/tests/helpers.py (+9/-0)
debian/changelog (+11/-0)
doc/rtd/topics/capabilities.rst (+12/-3)
doc/rtd/topics/datasources.rst (+47/-0)
doc/rtd/topics/format.rst (+17/-4)
tests/cloud_tests/testcases/base.py (+4/-4)
tests/unittests/test_builtin_handlers.py (+302/-22)
tests/unittests/test_datasource/test_openstack.py (+91/-1)
tests/unittests/test_handler/test_handler_etc_hosts.py (+1/-0)
tests/unittests/test_handler/test_handler_ntp.py (+1/-0)
tests/unittests/test_templating.py (+23/-0)
- Server Team CI bot: Approve (continuous-integration)
- Scott Moser: Approve
- Chad Smith: Abstain
-
Diff: 1689 lines (+959/-110)27 files modifiedbash_completion/cloud-init (+2/-0)
cloudinit/cmd/devel/__init__.py (+25/-0)
cloudinit/cmd/devel/parser.py (+4/-1)
cloudinit/cmd/devel/render.py (+90/-0)
cloudinit/cmd/devel/tests/test_render.py (+101/-0)
cloudinit/cmd/main.py (+15/-1)
cloudinit/handlers/__init__.py (+8/-3)
cloudinit/handlers/boot_hook.py (+5/-7)
cloudinit/handlers/cloud_config.py (+5/-10)
cloudinit/handlers/jinja_template.py (+137/-0)
cloudinit/handlers/shell_script.py (+3/-6)
cloudinit/handlers/upstart_job.py (+3/-6)
cloudinit/helpers.py (+4/-0)
cloudinit/log.py (+10/-2)
cloudinit/sources/__init__.py (+31/-16)
cloudinit/sources/tests/test_init.py (+61/-14)
cloudinit/stages.py (+14/-8)
cloudinit/templater.py (+25/-3)
cloudinit/tests/helpers.py (+9/-0)
doc/rtd/topics/capabilities.rst (+12/-3)
doc/rtd/topics/datasources.rst (+47/-0)
doc/rtd/topics/format.rst (+17/-4)
tests/cloud_tests/testcases/base.py (+4/-4)
tests/unittests/test_builtin_handlers.py (+302/-22)
tests/unittests/test_handler/test_handler_etc_hosts.py (+1/-0)
tests/unittests/test_handler/test_handler_ntp.py (+1/-0)
tests/unittests/test_templating.py (+23/-0)
Changed in cloud-init: | |
importance: | Undecided → High |
status: | New → Confirmed |
assignee: | nobody → Chad Smith (chad.smith) |
Changed in cloud-init: | |
status: | Confirmed → In Progress |
This bug is fixed with commit c7555762 to cloud-init on branch master. /git.launchpad. net/cloud- init/commit/ ?id=c7555762
To view that commit see the following URL:
https:/