Project

General

Profile

Actions

Feature #16665

open

Support dual user data and SSH finish script provisioning

Added by Fab Ien over 8 years ago. Updated over 7 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Compute resources
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

When a OperatingSystem has:
- finish Template
- user-data Template

The finish is not processed, and no error in log.

Actions #1

Updated by Dominic Cleal over 8 years ago

  • Category set to Compute resources - VMware
  • Status changed from New to Feedback

This is normal behaviour - when user data is disabled, Foreman will SSH to the host to complete configuration and executes the finish template. When user data is enabled, the user data template is rendered instead and provided to the hypervisor to complete initial configuration. They're mutually exclusive.

Actions #2

Updated by Fab Ien over 8 years ago

Dominic Cleal wrote:

This is normal behaviour - when user data is disabled, Foreman will SSH to the host to complete configuration and executes the finish template. When user data is enabled, the user data template is rendered instead and provided to the hypervisor to complete initial configuration. They're mutually exclusive.

In case of VMWare Image, the user-data is converted to "OS Guest Customization format" which only contains network/dns/hostname configuration.

So i can not notify TheForeman to tell him, the VM is installed ?
(i also need to execute some bootstrap script).

And can not execute "wget -q -O /dev/null --no-check-certificate <%= foreman_url %>" on the Host.

It would be good to process the Finish (via SSH).

Actions #3

Updated by Dominic Cleal over 8 years ago

  • Tracker changed from Bug to Feature
  • Subject changed from VMWare image: finish not processed when user-data is set to Support dual user data and SSH finish script provisioning
  • Category changed from Compute resources - VMware to Compute resources
  • Status changed from Feedback to New

Consider putting a script in the image instead, Foreman will not SSH to the host. The script may even retrieve the assigned finish script from /unattended/finish.

Actions #4

Updated by Fab Ien over 8 years ago

ok but it would be more consistent with to execute both user-data and finish.
As "VMWare user-data" is not as flexible as "EC2 user-data"

Actions #5

Updated by Matt Arva almost 8 years ago

Fab Ien wrote:

ok but it would be more consistent with to execute both user-data and finish.
As "VMWare user-data" is not as flexible as "EC2 user-data"

I agree that if a user-data template is used as a "OS Guest Customization format" for VMware template provisioning, that a finishing template would be beneficial for completing additional customization, like registering the host in Foreman (subscription-manager w/ activation keys linked to a particular content-view), installing the katello-agent and puppet, etc). Currently, when I create a host using user-data template (OS Guest Customization), the VM deployment completes, the host networking is modified and is accessible on the network. At this point the status of the host build is "Pending Installation" and no other activities occur.

Actions

Also available in: Atom PDF