Get rid of hardcoded "admin" tenant in puppet modules

Bug #1267431 reported by Anastasia Palkina
22
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Released
High
Sergey Vasilenko

Bug Description

If we change value 'tenant=admin' to 'adm' (for example) Horizon UI doesn't present networks (see screen). It means that new value for administrator's tenant name is not passed properly.

Revision history for this message
Anastasia Palkina (apalkina) wrote :
Revision history for this message
Dmitry Pyzhov (dpyzhov) wrote :

Is it possible to update manifests in order to accept custom tenant names?

Changed in fuel:
assignee: Dmitry Pyzhov (lux-place) → nobody
summary: - Need to delete row 'tenant' from UI. Value tenant=admin is hardcore in
+ Need to delete row 'tenant' from UI. Value tenant=admin is hardcoded in
manifests
Dmitry Pyzhov (dpyzhov)
Changed in fuel:
status: New → Confirmed
importance: Undecided → High
assignee: nobody → Fuel UI Team (fuel-ui)
Revision history for this message
Ivan Kolodyazhny (e0ne) wrote : Re: Need to delete row 'tenant' from UI. Value tenant=admin is hardcoded in manifests

IMO, the better way is to fix it in manifests

Changed in fuel:
status: Confirmed → New
assignee: Fuel UI Team (fuel-ui) → Mike Scherbakov (mihgen)
Revision history for this message
Mike Scherbakov (mihgen) wrote :

Discussed with V.Kuklin, looks like it is bug in Fuel Library. Let's get rid of hardcoded "admin" tenant name in our manifests.

Changed in fuel:
assignee: Mike Scherbakov (mihgen) → nobody
assignee: nobody → Fuel Library Team (fuel-library)
status: New → Confirmed
summary: - Need to delete row 'tenant' from UI. Value tenant=admin is hardcoded in
- manifests
+ Get rid of hardcoded "admin" tenant in puppet modules
description: updated
Changed in fuel:
assignee: Fuel Library Team (fuel-library) → Aleksey (azvyagintsev)
Changed in fuel:
status: Confirmed → In Progress
Revision history for this message
Aleksey Zvyagintsev (azvyagintsev) wrote :

Fixed
Files:

in fuel-library/
git diff create_predefined_networks_and_routers.rb
diff --git a/deployment/puppet/neutron/lib/puppet/parser/functions/create_predefined_networks_and_routers.rb b/deployment/puppet/neutron/lib/puppet/parser/functions/create_predefined_networks_and_routers.rb
index 44517fa..149b0de 100644
--- a/deployment/puppet/neutron/lib/puppet/parser/functions/create_predefined_networks_and_routers.rb
+++ b/deployment/puppet/neutron/lib/puppet/parser/functions/create_predefined_networks_and_routers.rb
@@ -83,6 +83,7 @@ class MrntNeutronNR
       # config network resources parameters
       network_config = get_default_network_config()
       network_config[:net][:name] = net.to_s
+ network_config[:net][:tenant] = ncfg[:tenant]
       network_config[:net][:network_type] = ncfg[:L2][:network_type]
       network_config[:net][:router_ext] = ncfg[:L2][:router_ext]
       network_config[:net][:shared] = ncfg[:shared]
==================================================================

in fuel-web/
diff --git a/nailgun/nailgun/orchestrator/deployment_serializers.py b/nailgun/nailgun/orchestrator/deployment_serializers.py
index 9d2ad66..26cc472 100644
--- a/nailgun/nailgun/orchestrator/deployment_serializers.py
+++ b/nailgun/nailgun/orchestrator/deployment_serializers.py
@@ -623,7 +623,7 @@ class NeutronNetworkDeploymentSerializer(NetworkDeploymentSerializer):
             net_conf['L3']['enable_dhcp'] = enable_dhcp

             net_conf["L2"] = nets_l2_configs[net]
- net_conf['tenant'] = 'admin'
+ net_conf['tenant'] = cluster.attributes.editable['access']['tenant']['value']
             net_conf["shared"] = False

             attrs['predefined_networks'][net] = net_conf

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-library (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-web (master)

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

Changed in fuel:
status: In Progress → Fix Committed
Revision history for this message
Anastasia Palkina (apalkina) wrote :

"build_id": "2014-02-13_13-09-40",
"mirantis": "no",
"build_number": "116",
"nailgun_sha": "0653f2e052cad099686de0e8259d4b861577599e",
"ostf_sha": "f86abe5544b5ffcf621e0c450bca15737c92361f",
"fuelmain_sha": "a4f314699aa97a274513a5ee182b13d25bf137ed",
"astute_sha": "7eed50fc30cec675fff7787c37fcf6da6dd518ee",
"release": "4.1",
"fuellib_sha": "dc45bb0b8520a91a66fd0493a87b4cf4bd33c32c"

1. Create new environment (CentOS, simple mode)
2. Choose GRE segmentation
3. Add controller, compute, cinder nodes
4. Change username = "user", password = "password" and tenant = "adm"
5. Start deployment. It was successful
6. Login to Horizon
7. Try to create instance. UI doesn't present networks but networks is active (see screens)

Changed in fuel:
status: Fix Committed → Triaged
Revision history for this message
Anastasia Palkina (apalkina) wrote :
Revision history for this message
Anastasia Palkina (apalkina) wrote :
Dmitry Pyzhov (dpyzhov)
Changed in fuel:
status: Triaged → Confirmed
Dmitry Pyzhov (dpyzhov)
Changed in fuel:
milestone: 4.1 → 5.0
Revision history for this message
Aleksey Zvyagintsev (azvyagintsev) wrote :

i have not seen patched files in release:

{"build_id": "2014-02-14_14-14-37", "mirantis": "no",.
"build_number": "122",
"nailgun_sha": "c00e635e9093a6cf9cfe559737aedadc8b7260a5",
"ostf_sha": "f86abe5544b5ffcf621e0c450bca15737c92361f",
"fuelmain_sha": "439577ed2795d86d57351d6e7cec6ed0049101c9",
"astute_sha": "7eed50fc30cec675fff7787c37fcf6da6dd518ee",
"release": "4.1",
"fuellib_sha": "ed8b7b8385b5726af43c5e57d6fba263bdc55c08"}

I made a mistake when commit? or it will be committed later?

Mike Scherbakov (mihgen)
Changed in fuel:
milestone: 5.0 → 4.1
Changed in fuel:
assignee: Aleksey Zvyagintsev (azvyagintsev) → Matthew Mosesohn (raytrac3r)
Revision history for this message
Matthew Mosesohn (raytrac3r) wrote :

I see two problems here. We build neutron data with a hardcoded tenant=admin in nailgun provisioning serializer. That's wrong because we pass the same data in the access hash. We should remove the tenant info from neutron in 5.0 (due to time constraints), but simply fix deployment in 4.1 to use the tenant from the access hash in Fuel Library.

Revision history for this message
Mike Scherbakov (mihgen) wrote :

> to use the tenant from the access hash in Fuel Library.
let's do it please.

https://bugs.launchpad.net/fuel/+bug/1279834 is likely caused by this bug, and I suspect that it is not the only thing.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-library (master)

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

Changed in fuel:
status: Confirmed → In Progress
Mike Scherbakov (mihgen)
tags: added: release-notes
removed: ui
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-library (master)

Reviewed: https://review.openstack.org/74347
Committed: https://git.openstack.org/cgit/stackforge/fuel-library/commit/?id=dc5e6c2db4660ca31a146250b84c1d4dee73997d
Submitter: Jenkins
Branch: master

commit dc5e6c2db4660ca31a146250b84c1d4dee73997d
Author: Matthew Mosesohn <email address hidden>
Date: Tue Feb 18 16:13:59 2014 +0400

    Implement user-defined tenant for neutron nets

    Default networks were previously hardcoded to use
    "admin" as the tenant, regardless of user input.
    This patch is a workaround because nailgun creates
    neutron_config with admin tenant hardcoded as well.

    FIXMEs were added to indicate what code needs cleanup
    after nailgun is patched.

    Change-Id: I272b53b6dbb4e972f94e82e81b58920351f4144d
    Partial-Bug: #1267431

Changed in fuel:
status: In Progress → Fix Committed
Mike Scherbakov (mihgen)
Changed in fuel:
status: Fix Committed → Confirmed
Revision history for this message
Mike Scherbakov (mihgen) wrote :

This was reverted here: https://review.openstack.org/#/c/74823/
However I can't reproduce any issue with another tenant name. Instances are created and removed just fine, openrc file is updated with right tenant info.

Changed in fuel:
status: Confirmed → Fix Committed
Revision history for this message
Matthew Mosesohn (raytrac3r) wrote :

The issue was just with creating the default tenant networks in Neutron. If you deployed with nova network, you wouldn't see this problem.

Changed in fuel:
status: Fix Committed → Confirmed
Revision history for this message
Matthew Mosesohn (raytrac3r) wrote :

Since this patch was reverted (without any explanation in the commit), I'm moving this bug back to confirmed.

Revision history for this message
Mike Scherbakov (mihgen) wrote :

Yes, issue in Horizon with unavailable networks still exists, likely because of this. However OSTF passes fine.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-library (master)

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

Changed in fuel:
status: Confirmed → In Progress
Revision history for this message
Matthew Mosesohn (raytrac3r) wrote :

Need snapshot or method to reproduce

Changed in fuel:
assignee: Matthew Mosesohn (raytrac3r) → Sergey Vasilenko (xenolog)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-library (master)

Reviewed: https://review.openstack.org/75837
Committed: https://git.openstack.org/cgit/stackforge/fuel-library/commit/?id=8ce4358d14042172314a7221e85eaae332d1afea
Submitter: Jenkins
Branch: master

commit 8ce4358d14042172314a7221e85eaae332d1afea
Author: Matthew Mosesohn <email address hidden>
Date: Tue Feb 18 16:13:59 2014 +0400

    Implement user-defined tenant for neutron nets

    Default networks were previously hardcoded to use
    "admin" as the tenant, regardless of user input.
    This patch is a workaround because nailgun creates
    neutron_config with admin tenant hardcoded as well.

    FIXMEs were added to indicate what code needs cleanup
    after nailgun is patched.

    Change-Id: I272b53b6dbb4e972f94e82e81b58920351f4144d
    Partial-Bug: #1267431

    Fix spec test for sanitize neutron config

    Added access hash to config to match defaults
    for deployment

    Change-Id: Ib0ab5f2a532db824572f05c94673be48869fe731
    Related-Bug: 1267431

Revision history for this message
Mike Scherbakov (mihgen) wrote :

Let's open another bug to track better fix for this issue in 5.0.
User's problem should go away now with existing fix.

Changed in fuel:
status: In Progress → Fix Committed
Revision history for this message
Andrey Sledzinskiy (asledzinskiy) wrote :

Verified on fuel_5_0_iso#21

Changed in fuel:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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