Activity log for bug #1702160

Date Who What changed Old value New value Message
2017-07-03 18:51:08 Chad Smith bug added bug
2017-07-03 18:52:05 Chad Smith description When receiving a 404 from user_data attempts, cloud-init should not attempt to retry the errant user_data file as it is wasted effort. If the metadata service is already up, then any user-data should already be present, so a 404 at this time means that no user data exists so retries will not result in finding user-data at a later time. Excerpt of logs indicating metadata is up but user-data does not exist: 2017-07-03 18:26:50,408 - __init__.py[DEBUG]: Seeing if we can get any data from <class 'cloudinit.sources.DataSourceOpenStack.DataSourceOpenStack'> 2017-07-03 18:26:50,558 - url_helper.py[DEBUG]: [0/1] open 'http://169.254.169.254/openstack' with {'timeout': 10.0, 'method': 'GET', 'allow_redirects': True, 'headers': {'User-Agent': 'Cloud-Init/0.7.9'}, 'url': 'http://169.254.169.254/openstack'} configuration 2017-07-03 18:26:51,434 - url_helper.py[DEBUG]: Read from http://169.254.169.254/openstack (200, 83b) after 1 attempts ... 2017-07-03 18:26:51,445 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254/openstack/latest/user_data' with {'timeout': 10.0, 'method': 'GET', 'allow_redirects': True, 'headers': {'User-Agent': 'Cloud-Init/0.7.9'}, 'url': 'http://169.254.169.254/openstack/latest/user_data'} configuration 2017-07-03 18:26:52,514 - url_helper.py[DEBUG]: Please wait 1 seconds while we wait to try again ...2017-07-03 18:26:53,957 - url_helper.py[DEBUG]: Please wait 1 seconds while we wait to try again 2017-07-03 18:26:59,989 - openstack.py[DEBUG]: Failed reading optional path http://169.254.169.254/openstack/latest/user_data due to: 404 Client Error: Not Found for url: http://169.254.169.254/openstack/latest/user_data When receiving a 404 from user_data attempts, cloud-init should not attempt to retry the errant user_data file as it is wasted effort. If the metadata service is already up, then any user-data should already be present, so a 404 at this time means that no user data exists so retries will not result in finding user-data at a later time. Excerpt of logs indicating metadata is up but user-data does not exist: 2017-07-03 18:26:50,408 - __init__.py[DEBUG]: Seeing if we can get any data from <class 'cloudinit.sources.DataSourceOpenStack.DataSourceOpenStack'> 2017-07-03 18:26:50,558 - url_helper.py[DEBUG]: [0/1] open 'http://169.254.169.254/openstack' with {'timeout': 10.0, 'method': 'GET', 'allow_redirects': True, 'headers': {'User-Agent': 'Cloud-Init/0.7.9'}, 'url': 'http://169.254.169.254/openstack'} configuration 2017-07-03 18:26:51,434 - url_helper.py[DEBUG]: Read from http://169.254.169.254/openstack (200, 83b) after 1 attempts ... 2017-07-03 18:26:51,445 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254/openstack/latest/user_data' with {'timeout': 10.0, 'method': 'GET', 'allow_redirects': True, 'headers': {'User-Agent': 'Cloud-Init/0.7.9'}, 'url': 'http://169.254.169.254/openstack/latest/user_data'} configuration 2017-07-03 18:26:52,514 - url_helper.py[DEBUG]: Please wait 1 seconds while we wait to try again ...2017-07-03 18:26:53,957 - url_helper.py[DEBUG]: Please wait 1 seconds while we wait to try again 2017-07-03 18:26:59,989 - openstack.py[DEBUG]: Failed reading optional path http://169.254.169.254/openstack/latest/user_data due to: 404 Client Error: Not Found for url: http://169.254.169.254/openstack/latest/user_data Validated as well on cmdline minutes later: wget http://169.254.169.254/openstack/latest/user_data --2017-07-03 18:51:33-- http://169.254.169.254/openstack/latest/user_data Connecting to 169.254.169.254:80... connected. HTTP request sent, awaiting response... 404 Not Found 2017-07-03 18:51:34 ERROR 404: Not Found.
2017-07-03 19:04:00 Chad Smith summary OpenStack datasource should not retry user-data on 404s OpenStack datasource should not retry user-data on 404
2017-07-03 22:06:53 Chad Smith cloud-init: importance Undecided Medium
2017-07-03 22:06:55 Chad Smith cloud-init: assignee Chad Smith (chad.smith)
2017-07-03 22:06:58 Chad Smith cloud-init: status New In Progress
2017-12-21 08:54:22 Kurt Garloff attachment added cloud-init-079-fix-openstack-retries.diff https://bugs.launchpad.net/cloud-init/+bug/1702160/+attachment/5025539/+files/openstack-404-noretry.diff
2018-01-13 21:04:33 Paul Graydon bug added subscriber Paul Graydon
2018-03-22 20:28:13 Scott Moser merge proposal linked https://code.launchpad.net/~kgarloff/cloud-init/+git/cloud-init/+merge/341844
2018-03-23 16:41:23 Chad Smith cloud-init: assignee Chad Smith (chad.smith)
2018-03-23 16:54:23 Chad Smith cloud-init: status In Progress Fix Committed
2018-03-23 23:25:11 Launchpad Janitor merge proposal linked https://code.launchpad.net/~chad.smith/cloud-init/+git/cloud-init/+merge/342011
2018-03-27 20:55:11 Chad Smith cloud-init: status Fix Committed Fix Released
2023-05-11 04:06:55 James Falcon bug watch added https://github.com/canonical/cloud-init/issues/2942