Bug 1610549 - Undercloud installation fails when using a hostname different than 'undercloud'
Summary: Undercloud installation fails when using a hostname different than 'undercloud'
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-tripleo-heat-templates
Version: 14.0 (Rocky)
Hardware: Unspecified
OS: Unspecified
high
urgent
Target Milestone: beta
: 14.0 (Rocky)
Assignee: Emilien Macchi
QA Contact: Gurenko Alex
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-07-31 21:51 UTC by Marius Cornea
Modified: 2023-02-22 23:02 UTC (History)
9 users (show)

Fixed In Version: openstack-tripleo-heat-templates-9.0.0-0.20180726103747.5fefd0b.el7ost python-tripleoclient-10.3.1-0.20180726104131.80ac3b9.el7ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-01-11 11:51:11 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1784910 0 None None None 2018-08-01 17:39:36 UTC
OpenStack gerrit 588075 0 'None' MERGED Switch deployment_source_hosts default to "Undercloud" 2020-07-13 08:08:55 UTC
OpenStack gerrit 588098 0 'None' MERGED Revert "Allow operators to override docker_insecure_registries" 2020-07-13 08:08:55 UTC
Red Hat Product Errata RHEA-2019:0045 0 None None None 2019-01-11 11:51:19 UTC

Description Marius Cornea 2018-07-31 21:51:03 UTC
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:

Comment 3 Marius Cornea 2018-08-01 22:05:18 UTC
https://review.openstack.org/#/c/588075/ makes the external task run but it fails right after that with:

TASK [Run openstack tripleo container image prepare] ***************************
fatal: [undercloud-0]: FAILED! => {"changed": true, "cmd": ["openstack", "tripleo", "container", "image", "prepare", "--log-file", "../install-undercloud.log", "--roles-file", "/tmp/ansible.ZRx0XL-role-data", "--environment-file", "/tmp/ansible.xgQPU3-prepare-param", "--cleanup", "partial", "--verbose"], "delta": "0:00:38.172680", "end": "2018-08-01 17:50:48.616070", "msg": "non-zero return code", "rc": 1, "start": "2018-08-01 17:50:10.443390", "stderr": "START with options: [u'tripleo', u'container', u'image', u'prepare', u'--log-file', u'../install-undercloud.log', u'--roles-file', u'/tmp/ansible.ZRx0XL-role-data', u'--environment-file', u'/tmp/ansible.xgQPU3-prepare-param', u'--cleanup', u'partial', u'--verbose']\ncommand: tripleo container image prepare -> tripleoclient.v1.container_image.TripleOImagePrepare (auth=False)\nUsing config files: ['/tmp/tmp8I6_0V']\nimagename: docker-registry.engineering.redhat.com/rhosp14/openstack-tempest:2018-08-01.1\nRunning skopeo inspect --tls-verify=false docker://docker-registry.engineering.redhat.com/rhosp14/openstack-tempest:2018-08-01.1\nRunning skopeo inspect --tls-verify=false docker://192.168.24.1:8787/rhosp14/openstack-tempest:2018-08-01.1\nPulling docker-registry.engineering.redhat.com/rhosp14/openstack-tempest\nPushing 192.168.24.1:8787/rhosp14/openstack-tempest\ndocker push failed: Get https://192.168.24.1:8787/v1/_ping: http: server gave HTTP response to HTTPS client\nPushing 192.168.24.1:8787/rhosp14/openstack-tempest\ndocker push failed: Get https://192.168.24.1:8787/v1/_ping: http: server gave HTTP response to HTTPS client\nPushing 192.168.24.1:8787/rhosp14/openstack-tempest\ndocker push failed: Get https://192.168.24.1:8787/v1/_ping: http: server gave HTTP response to HTTPS client\nPushing 192.168.24.1:8787/rhosp14/openstack-tempest\ndocker push failed: Get https://192.168.24.1:8787/v1/_ping: http: server gave HTTP response to HTTPS client\nPushing 192.168.24.1:8787/rhosp14/openstack-tempest\ndocker push failed: Get https://192.168.24.1:8787/v1/_ping: http: server gave HTTP response to HTTPS client\nCould not push image 192.168.24.1:8787/rhosp14/openstack-tempest\nEND return value: 1", "stderr_lines": ["START with options: [u'tripleo', u'container', u'image', u'prepare', u'--log-file', u'../install-undercloud.log', u'--roles-file', u'/tmp/ansible.ZRx0XL-role-data', u'--environment-file', u'/tmp/ansible.xgQPU3-prepare-param', u'--cleanup', u'partial', u'--verbose']", "command: tripleo container image prepare -> tripleoclient.v1.container_image.TripleOImagePrepare (auth=False)", "Using config files: ['/tmp/tmp8I6_0V']", "imagename: docker-registry.engineering.redhat.com/rhosp14/openstack-tempest:2018-08-01.1", "Running skopeo inspect --tls-verify=false docker://docker-registry.engineering.redhat.com/rhosp14/openstack-tempest:2018-08-01.1", "Running skopeo inspect --tls-verify=false docker://192.168.24.1:8787/rhosp14/openstack-tempest:2018-08-01.1", "Pulling docker-registry.engineering.redhat.com/rhosp14/openstack-tempest", "Pushing 192.168.24.1:8787/rhosp14/openstack-tempest", "docker push failed: Get https://192.168.24.1:8787/v1/_ping: http: server gave HTTP response to HTTPS client", "Pushing 192.168.24.1:8787/rhosp14/openstack-tempest", "docker push failed: Get https://192.168.24.1:8787/v1/_ping: http: server gave HTTP response to HTTPS client", "Pushing 192.168.24.1:8787/rhosp14/openstack-tempest", "docker push failed: Get https://192.168.24.1:8787/v1/_ping: http: server gave HTTP response to HTTPS client", "Pushing 192.168.24.1:8787/rhosp14/openstack-tempest", "docker push failed: Get https://192.168.24.1:8787/v1/_ping: http: server gave HTTP response to HTTPS client", "Pushing 192.168.24.1:8787/rhosp14/openstack-tempest", "docker push failed: Get https://192.168.24.1:8787/v1/_ping: http: server gave HTTP response to HTTPS client", "Could not push image 192.168.24.1:8787/rhosp14/openstack-tempest", "END return value: 1"], "stdout": "", "stdout_lines": []}


It looks that the client is trying to do an https request to an http endpoint(192.168.24.1:8787):

[stack@undercloud-0 ~]$ curl -I https://192.168.24.1:8787
curl: (35) SSL received a record that exceeded the maximum permissible length.
[stack@undercloud-0 ~]$ curl -I http://192.168.24.1:8787
HTTP/1.1 200 OK
Cache-Control: no-cache
Date: Wed, 01 Aug 2018 22:04:45 GMT
Content-Type: text/plain; charset=utf-8

Comment 4 Emilien Macchi 2018-08-01 23:25:37 UTC
yeah, we'll need https://review.openstack.org/588098 as well.

Comment 15 errata-xmlrpc 2019-01-11 11:51:11 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2019:0045


Note You need to log in before you can comment on or make changes to this bug.