Undercloud installation fails when using a hostname different than 'undercloud'

Bug #1784910 reported by Marius Cornea
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
High
Emilien Macchi

Bug Description

Description of problem:
Undercloud installation fails when using a hostname different than 'undercloud'.

The failure reason is because the container images do not get uploaded to the local undercloud registry so the deployment fails not being able to find the images.

After https://review.openstack.org/#/c/581917/ landed the container image prepare steps get run in external_deploy_tasks but we can see in the logs that the external tasks get skipped with no hosts matched

2018-07-31 13:12:19.807 5539 WARNING tripleoclient.v1.tripleo_deploy.Deploy [ ] PLAY [External deployment step 1] *********************************************************************************************************************************************************************************
2018-07-31 13:12:19.807 5539 WARNING tripleoclient.v1.tripleo_deploy.Deploy [ ] skipping: no hosts matched

Checking the inventory we can see:

Undercloud:
  hosts:
    undercloud75:
      ansible_host: 192.168.0.1
      ctlplane_ip: 192.168.0.1
      deploy_server_id: 57075f39-3917-4660-b667-fa661305f19c
      enabled_networks: [management, storage, ctlplane, external, internal_api, storage_mgmt,
        tenant]
      external_ip: 192.168.0.1
      internal_api_ip: 192.168.0.1
      management_ip: 192.168.0.1
      storage_ip: 192.168.0.1
      storage_mgmt_ip: 192.168.0.1
      tenant_ip: 192.168.0.1
  vars: {ansible_connection: local, ansible_ssh_user: root, bootstrap_server_id: 57075f39-3917-4660-b667-fa661305f19c,
    tripleo_role_name: Undercloud}

so the playbook which runs the external_deploy_steps_tasks.yaml fails because the inventory doesn't contain an 'undercloud' host but'undercloud75' which is the undercloud machine hostname(undercloud75.localdomain) and the 'Undercloud' group(note the capital U)

- hosts: undercloud
  name: External deployment step 1
  gather_facts: no
  any_errors_fatal: yes
  become: false
  vars:
    step: '1'
  tasks:
    - import_tasks: external_deploy_steps_tasks.yaml
  tags:
    - external
    - external_deploy_steps

We can test the inventory by:

[stack@undercloud75 undercloud-ansible-AV9shq]$ ansible -i inventory.yaml -m ping undercloud
 [WARNING]: Could not match supplied host pattern, ignoring: undercloud

 [WARNING]: No hosts matched, nothing to do

[stack@undercloud75 undercloud-ansible-AV9shq]$ ansible -i inventory.yaml -m ping undercloud75
undercloud75 | SUCCESS => {
    "changed": false,
    "ping": "pong"
}
[stack@undercloud75 undercloud-ansible-AV9shq]$ vi inventory.yaml
[stack@undercloud75 undercloud-ansible-AV9shq]$ ansible -i inventory.yaml -m ping Undercloud
undercloud75 | SUCCESS => {
    "changed": false,
    "ping": "pong"
}
[stack@undercloud75 undercloud-ansible-AV9shq]$ ansible -i inventory.yaml -m ping Undercloud
vundercloud75 | SUCCESS => {
    "changed": false,
    "ping": "pong"
}

Version-Release number of selected component (if applicable):
openstack-tripleo-heat-templates-9.0.0-0.20180726103746.5fefd0b.el7ost.noarch

How reproducible:
100%

Steps to Reproduce:
1. Deploy containerized undercloud(with uploading images to local undercloud registry) on a machine with hostname != 'undercloud'

Actual results:
Deployment fails because of missing images.

Expected results:
Deployment succeeds.

Additional info:

Changed in tripleo:
milestone: none → rocky-rc1
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-heat-templates (master)

Fix proposed to branch: master
Review: https://review.openstack.org/588075

Changed in tripleo:
assignee: nobody → Emilien Macchi (emilienm)
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-heat-templates (master)

Reviewed: https://review.openstack.org/588075
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=6860fb84f567bcb38a6dc84eae38d361cca52b15
Submitter: Zuul
Branch: master

commit 6860fb84f567bcb38a6dc84eae38d361cca52b15
Author: Emilien Macchi <email address hidden>
Date: Wed Aug 1 16:35:21 2018 -0400

    Switch deployment_source_hosts default to "Undercloud"

    "undercloud" host is too opinionated and hostnames can change. We should
    rather apply the tasks to the Undercloud HostGroup, which contains one
    host for now: the actual undercloud hostname.

    So this patch switches "undercloud" to "Undercloud" so when the hostname
    isn't "undercloud", the external tasks will run correctly on this host.

    Change-Id: I7200f930387406e6cc8e6fee6d5278768074c892
    Closes-Bug: #1784910

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-heat-templates 9.0.0.0rc1

This issue was fixed in the openstack/tripleo-heat-templates 9.0.0.0rc1 release candidate.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.