Project

General

Profile

Actions

Bug #15074

closed

cloud init fails to mark instance as built

Added by Kim St. Dennis almost 8 years ago. Updated almost 8 years ago.

Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
Unattended installations
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

When building instance that uses cloud-init the phone home function uses a POST while the foreman routing only supports GET.

the cloud-init cc_phone_home script uses a POST to mark the end of a foreman build,

https://github.com/theforeman/foreman/blob/9b6c84d45289e83567752eb35e38edeaaafe9dc4/config/routes.rb#L430

but when this task is executed by cloud-init the following error shows in the foreman/production.log and the status of the instance in the foreman gui is "pending installation."

foreman/production log:
@2016-05-17T01:34:47 [app] [I] Started POST "/unattended/built?token=136dec6f-d643-4dac-ba29-2037fb3979d0" for 127.0
.0.1 at 2016-05-17 01:34:47 +0000
Log trace: /usr/share/foreman/vendor/ruby/2.0.0/gems/railties-3.2.21/lib/rails/rack/logger.rb:31 method: call_app
2016-05-17T01:34:47 [app] [F] | ActionController::RoutingError (No route matches [POST] "/unattended/built"): | |
@

cloud init log on the new host;
test36-pp-use1 [CLOUDINIT] util.py[WARNING]: Failed to post phone home data to https://foremanmaster.testurl.com:443/unattended/built?token= in 10 tries

user_data script:

phone_home:
url: <%= foreman_url('built') %>
tries: 10


Related issues 1 (0 open1 closed)

Is duplicate of Foreman - Bug #5754: Cloud-init phone_home raise 500 error because of POST contentClosedRomain Vrignaud05/16/2014Actions
Actions #1

Updated by Dominic Cleal almost 8 years ago

  • Is duplicate of Bug #5754: Cloud-init phone_home raise 500 error because of POST content added
Actions #2

Updated by Dominic Cleal almost 8 years ago

  • Status changed from New to Duplicate

I think this can be fixed by specifying post: [] as we do in #5754 and our templates: https://github.com/theforeman/community-templates/blob/develop/cloudinit/userdata_cloudinit.erb#L47

Actions

Also available in: Atom PDF