Bug 1593616

Summary: [OSP13] Path to composable services resource in environment file is ignored when stack name is different than overcloud
Product: Red Hat OpenStack Reporter: Bartosz Kupidura <bartosz>
Component: python-tripleoclientAssignee: Alex Schultz <aschultz>
Status: CLOSED DUPLICATE QA Contact: Gurenko Alex <agurenko>
Severity: low Docs Contact:
Priority: low    
Version: 13.0 (Queens)CC: aschultz, dpeacock, hbrock, jpichon, jslagle, mburns
Target Milestone: ---Keywords: Triaged, ZStream
Target Release: 13.0 (Queens)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-03-12 19:21:40 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 Bartosz Kupidura 2018-06-21 08:26:31 UTC
Description of problem:

Composable services defined as:

(undercloud) [stack@undercloud ~]$ head -20  tripleo-heat-templates/environments/contrail/contrail-services.yaml
# A Heat environment file which can be used to enable OpenContrail
# # extensions, configured via puppet
resource_registry:
  OS::TripleO::Services::ContrailConfigDatabase: ../../docker/services/contrail/contrail-config-database.yaml
  OS::TripleO::Services::ContrailAnalyticsDatabase: ../../docker/services/contrail/contrail-analytics-database.yaml
  OS::TripleO::Services::ContrailConfig: ../../docker/services/contrail/contrail-config.yaml
  OS::TripleO::Services::ContrailAnalytics: ../../docker/services/contrail/contrail-analytics.yaml
  OS::TripleO::Services::ContrailControl: ../../docker/services/contrail/contrail-control.yaml
  OS::TripleO::Services::ContrailWebui: ../../docker/services/contrail/contrail-webui.yaml
  OS::TripleO::Services::ContrailVrouter: ../../docker/services/contrail/contrail-vrouter.yaml
  OS::TripleO::Services::NeutronCorePlugin: ../../docker/services/contrail/contrail-neutron-container-plugin.yaml
  OS::TripleO::Services::ComputeNeutronCorePlugin: ../../docker/services/contrail/contrail-vrouter.yaml
  OS::TripleO::Services::ContrailHeatApiPlugin: ../../docker/services/contrail/contrail-heat-container-plugin.yaml

(undercloud) [stack@undercloud contrail]$ ll ../../docker/services/contrail/contrail-analytics-database.yaml
-rw-rw-r--. 1 stack stack 11915 Jun 20 02:44 ../../docker/services/contrail/contrail-analytics-database.yaml

(undercloud) [stack@undercloud tripleo-heat-templates]$ grep -r OS::TripleO::Services::ContrailAnalyticsDatabase environments/contrail/roles_data.yaml
    - OS::TripleO::Services::ContrailAnalyticsDatabase

The service is added to the Control role.

Deploying stack:
openstack overcloud deploy --stack overcloudabc --templates /home/stack/tripleo-heat-templates --roles-file /home/stack/tripleo-heat-templates/environments/contrail/roles_data.yaml -e /home/stack/tripleo-heat-templates/environments/docker_registry.yaml -e /home/stack/tripleo-heat-templates/environments/docker-ha.yaml -e /home/stack/tripleo-heat-templates/environments/network-isolation.yaml -e /home/stack/tripleo-heat-templates/environments/contrail/contrail-services.yaml -e /home/stack/tripleo-heat-templates/environments/contrail/contrail-net-bond-vlan.yaml -e /home/stack/tripleo-heat-templates/environments/contrail/environment-extra.yaml -e /home/stack/tripleo-heat-templates/environments/enable-tls.yaml -e /home/stack/tripleo-heat-templates/environments/inject-trust-anchor.yaml -e /home/stack/tripleo-heat-templates/environments/tls-endpoints-public-ip.yaml -e /home/stack/tripleo-heat-templates/environments/contrail/disable-telemetry.yaml -e /home/stack/tripleo-heat-templates/environments/contrail/controller-extra.yaml -e /home/stack/tripleo-heat-templates/environments/contrail/deployment-artifacts.yaml -e /home/stack/tripleo-heat-templates/environments/contrail/post_deployment_resource.yaml -e /home/stack/tripleo-heat-templates/environments/contrail/rhel_unregistration_resource.yaml
Waiting for messages on queue 'tripleo' with no timeout.
Exception creating plan: Error validating environment for plan overcloudabc: ERROR: The Resource Type (OS::TripleO::Services::ContrailAnalyticsDatabase) could not be found.
Started Mistral Workflow tripleo.validations.v1.check_pre_deployment_validations. Execution ID: 32ad681f-7489-4bd8-b1c4-669e49db815a
Creating Swift container to store the plan
Creating plan from template files in: /tmp/tripleoclient-7dy3Wb/tripleo-heat-templates
Started Mistral Workflow tripleo.plan_management.v1.create_deployment_plan. Execution ID: 9327c392-504c-4573-8c01-9a2a4c955f57
Error validating environment for plan overcloudabc: ERROR: The Resource Type (OS::TripleO::Services::ContrailAnalyticsDatabase) could not be found.

When adding the services to ~/tripleo-heat-templates/environments/docker.yaml it works.
Changing stack name from `overcloud{random_suffix}` to `overcloud` also solves problem.

This looks very similar to https://bugzilla.redhat.com/show_bug.cgi?id=1577536

Version-Release number of selected component (if applicable): OSP13

Actual results:

Resource is not found

Expected results:

Resource is found

Comment 1 Alex Schultz 2019-03-12 19:21:23 UTC
Looks like we fixed Bug 1677230 which was similar to this one. Closing this one as a duplicate. Feel free to reopen if it still persists even with the fix for Bug 1677230

Comment 2 Alex Schultz 2019-03-12 19:21:40 UTC

*** This bug has been marked as a duplicate of bug 1677230 ***