some jobs should run even on lack of datasource

Bug #906669 reported by Scott Moser
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init
Fix Released
Low
Joshua Harlow

Bug Description

There should be a way to run jobs even if a data source is not found.

The biggest pain point for this is that the cloud-images do not have any ssh keys in /etc/ssh_host_*_key.pub on creation. If there is no metadata service found, you can't ssh to them even if some other form of authentication was setup.

if cloud-init goes bad before wriiting the cloud-config, then as it is right now, cloud-final will run but not do anything.

It seems like a good idea to have some form of "failsafe" code that can be run.

Related branches

Scott Moser (smoser)
Changed in cloud-init:
status: New → Triaged
importance: Undecided → Low
Revision history for this message
Joshua Harlow (harlowja) wrote :

Possibly 'config' modules could specify via some module function that tells cloud-init if that module can be ran without a datasource. Then these modules can be ran even if a datasource is not found or is not fetched correctly. They would of course operate in a limited state (using whatever config that cloud-init can find)

Revision history for this message
Joshua Harlow (harlowja) wrote :

So I think the thing we are going to try here is a 'DataSourceNone' which is basically a datasource with no data, modules will be able to do instanceof checks (maybe this should be an attribute instead incase other modules someday can run without data and they don't want to inherit from this one???) to see if nothing is loaded (incase they want to say avoid actually doing something in this case). This datasource will provide a 'fake' instance id, '-1' seems reasonable. This should let modules run (+ some work to make it happen) and also let modules determine when this state is occuring.

Changed in cloud-init:
assignee: nobody → Joshua Harlow (harlowja)
Revision history for this message
Scott Moser (smoser) wrote :

This is fix-committed when the None datasource.

Changed in cloud-init:
status: Triaged → Fix Committed
Scott Moser (smoser)
Changed in cloud-init:
status: Fix Committed → Fix Released
Revision history for this message
James Falcon (falcojr) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.