Bug 1701340

Summary: OSP15 | overcloud can not be deployed with sensu-client templates.
Product: Red Hat OpenStack Reporter: Leonid Natapov <lnatapov>
Component: openstack-tripleo-heat-templatesAssignee: Martin Magr <mmagr>
Status: CLOSED ERRATA QA Contact: Leonid Natapov <lnatapov>
Severity: high Docs Contact:
Priority: urgent    
Version: 15.0 (Stein)CC: jschluet, mburns, mmagr, pkilambi
Target Milestone: rcKeywords: Regression, Triaged
Target Release: 15.0 (Stein)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-tripleo-heat-templates-10.5.1-0.20190605181437.aa5d4b6.el8ost Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-09-21 11:21:34 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Leonid Natapov 2019-04-18 17:08:26 UTC
OSP15 | overcloud can not be deployed with sensu-client templates.

Getting following error:

FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tripleoclient-gbvt1xg2/tripleo-heat-templates/deployment/deprecated/containers-common.yaml'

The problem is here:

https://github.com/openstack/tripleo-heat-templates/blob/master/deployment/deprecated/monitoring/sensu-client-container-puppet.yaml#L96

should be ../../../docker/services/containers-common.yaml


As tripleo-heat-templates were refactored ,there were some services that weren't correctly updated to reflect new location.

Comment 5 Martin Magr 2019-05-20 15:10:17 UTC
Stable/stein merged upstream

Comment 7 Leonid Natapov 2019-05-26 11:45:40 UTC
openstack-tripleo-heat-templates-10.5.1-0.20190520170359.0c31f04.el8ost.noarch

Not fixed.

Getting following error when trying to deploy with sensu-client.yaml template
-----
(undercloud) [stack@undercloud-0 ~]$ ./overcloud_deploy.sh
Removing the current plan files
Uploading new plan files
Plan updated.
Processing templates in the directory /tmp/tripleoclient-jpvm9tcg/tripleo-heat-templates
Exception occured while running the command
Traceback (most recent call last):
  File "/usr/lib64/python3.6/urllib/request.py", line 1474, in open_local_file
    stats = os.stat(localfile)
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tripleoclient-jpvm9tcg/tripleo-heat-templates/docker/services/containers-common.yaml'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/heatclient/common/utils.py", line 415, in read_url_content
    content = request.urlopen(url).read()
  File "/usr/lib64/python3.6/urllib/request.py", line 223, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib64/python3.6/urllib/request.py", line 526, in open
    response = self._open(req, data)
  File "/usr/lib64/python3.6/urllib/request.py", line 544, in _open
    '_open', req)
  File "/usr/lib64/python3.6/urllib/request.py", line 504, in _call_chain
    result = func(*args)
  File "/usr/lib64/python3.6/urllib/request.py", line 1452, in file_open
    return self.open_local_file(req)
  File "/usr/lib64/python3.6/urllib/request.py", line 1491, in open_local_file
    raise URLError(exp)
urllib.error.URLError: <urlopen error [Errno 2] No such file or directory: '/tmp/tripleoclient-jpvm9tcg/tripleo-heat-templates/docker/services/containers-common.yaml'>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/tripleoclient/utils.py", line 1066, in process_multiple_environments
    env_path=env_path)
  File "/usr/lib/python3.6/site-packages/heatclient/common/template_utils.py", line 319, in process_environment_and_files
    env_base_url)
  File "/usr/lib/python3.6/site-packages/heatclient/common/template_utils.py", line 357, in resolve_environment_urls
    is_object=is_object, object_request=object_request)
  File "/usr/lib/python3.6/site-packages/heatclient/common/template_utils.py", line 169, in get_file_contents
    template_url=str_url, files=files)[1]
  File "/usr/lib/python3.6/site-packages/heatclient/common/template_utils.py", line 101, in get_template_contents
    object_request)
  File "/usr/lib/python3.6/site-packages/heatclient/common/template_utils.py", line 122, in resolve_template_get_files
    ignore_if, recurse_if, is_object, object_request)
  File "/usr/lib/python3.6/site-packages/heatclient/common/template_utils.py", line 146, in get_file_contents
    is_object, object_request)
  File "/usr/lib/python3.6/site-packages/heatclient/common/template_utils.py", line 146, in get_file_contents
    is_object, object_request)
  File "/usr/lib/python3.6/site-packages/heatclient/common/template_utils.py", line 161, in get_file_contents
    file_content = utils.read_url_content(str_url)
  File "/usr/lib/python3.6/site-packages/heatclient/common/utils.py", line 417, in read_url_content
    raise exc.CommandError(_('Could not fetch contents for %s') % url)
heatclient.exc.CommandError: Could not fetch contents for file:///tmp/tripleoclient-jpvm9tcg/tripleo-heat-templates/docker/services/containers-common.yaml

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib64/python3.6/urllib/request.py", line 1474, in open_local_file
    stats = os.stat(localfile)
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tripleoclient-jpvm9tcg/tripleo-heat-templates/docker/services/containers-common.yaml'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/heatclient/common/utils.py", line 415, in read_url_content
#!/bin/bash
    content = request.urlopen(url).read()
  File "/usr/lib64/python3.6/urllib/request.py", line 223, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib64/python3.6/urllib/request.py", line 526, in open
    response = self._open(req, data)
  File "/usr/lib64/python3.6/urllib/request.py", line 544, in _open
    '_open', req)
  File "/usr/lib64/python3.6/urllib/request.py", line 504, in _call_chain
    result = func(*args)
  File "/usr/lib64/python3.6/urllib/request.py", line 1452, in file_open
    return self.open_local_file(req)
  File "/usr/lib64/python3.6/urllib/request.py", line 1491, in open_local_file
    raise URLError(exp)
urllib.error.URLError: <urlopen error [Errno 2] No such file or directory: '/tmp/tripleoclient-jpvm9tcg/tripleo-heat-templates/docker/services/containers-common.yaml'>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/tripleoclient/command.py", line 32, in run
    super(Command, self).run(parsed_args)
  File "/usr/lib/python3.6/site-packages/osc_lib/command/command.py", line 41, in run
    return super(Command, self).run(parsed_args)
  File "/usr/lib/python3.6/site-packages/cliff/command.py", line 184, in run
    return_code = self.take_action(parsed_args) or 0
  File "/usr/lib/python3.6/site-packages/tripleoclient/v1/overcloud_deploy.py", line 925, in take_action
    self._deploy_tripleo_heat_templates_tmpdir(stack, parsed_args)
  File "/usr/lib/python3.6/site-packages/tripleoclient/v1/overcloud_deploy.py", line 374, in _deploy_tripleo_heat_templates_tmpdir
    new_tht_root, tht_root)
  File "/usr/lib/python3.6/site-packages/tripleoclient/v1/overcloud_deploy.py", line 452, in _deploy_tripleo_heat_templates
    cleanup=(not parsed_args.no_cleanup))
  File "/usr/lib/python3.6/site-packages/tripleoclient/utils.py", line 1114, in process_multiple_environments
    env_path=f.name)
  File "/usr/lib/python3.6/site-packages/heatclient/common/template_utils.py", line 319, in process_environment_and_files
    env_base_url)
  File "/usr/lib/python3.6/site-packages/heatclient/common/template_utils.py", line 357, in resolve_environment_urls
    is_object=is_object, object_request=object_request)
  File "/usr/lib/python3.6/site-packages/heatclient/common/template_utils.py", line 169, in get_file_contents
    template_url=str_url, files=files)[1]
  File "/usr/lib/python3.6/site-packages/heatclient/common/template_utils.py", line 101, in get_template_contents
    object_request)
  File "/usr/lib/python3.6/site-packages/heatclient/common/template_utils.py", line 122, in resolve_template_get_files
    ignore_if, recurse_if, is_object, object_request)
  File "/usr/lib/python3.6/site-packages/heatclient/common/template_utils.py", line 146, in get_file_contents
    is_object, object_request)
  File "/usr/lib/python3.6/site-packages/heatclient/common/template_utils.py", line 146, in get_file_contents
    is_object, object_request)
  File "/usr/lib/python3.6/site-packages/heatclient/common/template_utils.py", line 161, in get_file_contents
    file_content = utils.read_url_content(str_url)
  File "/usr/lib/python3.6/site-packages/heatclient/common/utils.py", line 417, in read_url_content
    raise exc.CommandError(_('Could not fetch contents for %s') % url)
heatclient.exc.CommandError: Could not fetch contents for file:///tmp/tripleoclient-jpvm9tcg/tripleo-heat-templates/docker/services/containers-common.yaml
Could not fetch contents for file:///tmp/tripleoclient-jpvm9tcg/tripleo-heat-templates/docker/services/containers-common.yaml

Comment 8 Martin Magr 2019-05-27 09:29:33 UTC
Hmm, there has been done some refactoring in THT and docker/services/containers-common.yaml has been moved to deployment directory instead.

Comment 9 Martin Magr 2019-06-10 15:20:00 UTC
Upstream stable/stein fix has been merged. Will check if this got to downstream.

Comment 11 Leonid Natapov 2019-06-26 11:42:47 UTC
sensu-client contsiner is up and running.
openstack-tripleo-heat-templates-10.5.1-0.20190621130403.3db471f.el8ost.noarch

Comment 15 errata-xmlrpc 2019-09-21 11:21:34 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:2811