cloud-init cannot handle includes using HTTP Basic authentication
This bug was originally filed in Launchpad as LP: #1188917
Launchpad details
affected_projects = [] assignee = None assignee_name = None date_closed = None date_created = 2013-06-08T09:26:03.763569+00:00 date_fix_committed = None date_fix_released = None id = 1188917 importance = medium is_complete = False lp_url = https://bugs.launchpad.net/cloud-init/+bug/1188917 milestone = None owner = u-martijn owner_name = Martijn Bakker private = False status = confirmed submitter = u-martijn submitter_name = Martijn Bakker tags = [] duplicates = []
Launchpad user Martijn Bakker(u-martijn) wrote on 2013-06-08T09:26:03.763569+00:00
As I am migrating away from no a longer supported version of Ubuntu to Ubuntu 13.04 "raring", I came upon the following change in cloud-init's behaviour:
Scenario:
- user-data contains "#include\nhttp://mactijn.eu/cloud-init/main.include"
- main.include in turn includes 4 shell scripts, 2 of which (#2 and #4) are behind HTTP Basic authentication. The user/pass is given in the URL.
Expected results:
- all scripts are downloaded, and executed in order (as was the case with 0.6.1 on ubuntu 11.04)
Actual results:
- script #1 is downloaded
- 10 attempts to download script #2 are done, sans Basic authentication
- cloud-init gives up, not executing any script
Changing "#include" to "#include-once" in main.include did not result in different behaviour.
web server logs: 54.216.72.x - - [08/Jun/2013:10:28:57 +0200] "GET /cloud-init/main.include HTTP/1.0" 200 515 "-" "Cloud-Init/0.7.2" 54.216.72.x - - [08/Jun/2013:10:28:57 +0200] "GET /cloud-init/include-001.sh HTTP/1.0" 200 361 "-" "Cloud-Init/0.7.2" 54.216.72.x - - [08/Jun/2013:10:28:57 +0200] "GET /cloud-init/protected/include-002.sh HTTP/1.0" 401 658 "-" "Cloud-Init/0.7.2" [last line repeated 10 more times, 1 second interval]
console output:
Traceback (most recent call last):
File "/usr/bin/cloud-init", line 509, in
Installed version of cloud-init is 0.7.2~bzr809-0ubuntu1 which seems to be the most current version in 13.04 to date.