diff options
author | Kurt Garloff <kurt@garloff.de> | 2018-03-23 12:31:20 -0400 |
---|---|---|
committer | Scott Moser <smoser@brickies.net> | 2018-03-23 12:31:20 -0400 |
commit | 097a2967abd6c78edfbdc035e7141f2d142f17ae (patch) | |
tree | dad2304c3a97b2a43eab83871bacad2de930f1ef /templates | |
parent | 0d51e912146b3031c458ce415b7d4cd6eb17d06e (diff) | |
download | vyos-cloud-init-097a2967abd6c78edfbdc035e7141f2d142f17ae.tar.gz vyos-cloud-init-097a2967abd6c78edfbdc035e7141f2d142f17ae.zip |
Revert the logic of exception_cb in read_url.
In commit e9e8616, there was an inversion of the logic of the
exception_cb return value meaning, breaking the (network) OpenStack
DataSource, which implemented exception_cb as should_retry_cb, returning
True when a retry should be done and False when the retry loop should
be broken and the exception reraised again immediately.
The OpenStack DS was the only user of this callback at the time and not
touched by the commit (nor did the commit message mention an intended
change), so this almost certainly happened by mistake.
These days, we have a second user of the callback in DataSourceScaleway.
It uses the new logic, so it needs change if we fix the meaning of the
return value.
This patch reverts the meaning of url_helper.read_url() execption_cb
to the old semantics. It updates the comment and adjusts the Scaleway
datasource.
The patch has been tested on Open Telekom Cloud (which uses the
OpenStack network Datasource) where previously a missing user_data
and network_data.json would be retried 6 times each despite them
not being present (they are optional!) and the server repsonding
with a correct 404. After the patch, boot times are 10s faster,
as we no longer pointlessly retry these files.
LP: #1702160
LP: #1298921
Diffstat (limited to 'templates')
0 files changed, 0 insertions, 0 deletions