yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #65577
[Bug 1702160] [NEW] OpenStack datasource should not retry user-data on 404s
Public bug reported:
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.
** Affects: cloud-init
Importance: Undecided
Status: New
** Description changed:
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.
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/1702160
Title:
OpenStack datasource should not retry user-data on 404s
Status in cloud-init:
New
Bug 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
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.
To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1702160/+subscriptions
Follow ups