Defining networks inconvenient when deploying multiple overclouds

Bug #1632327 reported by Rhys Oxenham
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Expired
Undecided
Unassigned

Bug Description

TripleO can now be used to deploy multiple overclouds with the "--stack" option. Whilst this is nice, you cannot deploy >1 overcloud that uses the same templates with the same overcloud network names. It's only possible to utilise the ctlplane network for both, which limits its use. It would be great to deploy multiple overclouds, utilising the same network names, albeit with different subnet allocations or VLANs.

Error shown upon deployment of second overcloud:

2016-10-11 11:05:41Z [region-two]: CREATE_FAILED Resource CREATE failed: Conflict: resources.Networks.resources.ExternalNetwork.resources.ExternalNetwork: Unable to create the flat network. Physical network external is in use.

It doesn't make sense to have to create a new templates branch with different network names given the amount of references that exist within the templates directory.

Revision history for this message
Steven Hardy (shardy) wrote :

Thanks for the report Rhys - I'm not certain tho if this is a bug or a usability issue - I think we by design don't want multiple overclouds to use the same networks (or they will no longer be isolated), but we do need a better way to easily set the parameters so that things (names in this case) don't collide or overlap.

To get past the issue you're encountering, I think it's probably enough to simply pass a non-default name (e.g something that's unique per stack):

$ cat net-env.yaml
parameter_defaults:
  ExternalNetName: external2
  InternalApiNetName: internal2
  ManagementNetName: management2
  StorageMgmtNetName: storagemgmt2
  StorageNetName: storage2
  TenantNetName: tenant2

etc

Would that resolve your problem?

Revision history for this message
Rhys Oxenham (rdoxenham) wrote :
Download full text (9.9 KiB)

Thanks, Steve. I tried this but unfortunately it still wouldn't let me override the name of the network it's trying to create. Perhaps it's hard coded somewhere?

[stack@undercloud templates]$ heat stack-show 8d7d3fa7-ae27-4361-a271-8468f07354b3
WARNING (shell) "heat stack-show" is deprecated, please use "openstack stack show" instead
+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Property | Value |
+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| capabilities | [] |
| creation_time | 2016-10-12T12:52:08Z |
| deletion_time | None |
| description | External network. Public traffic, Neutron l3router for |
| | floating IPs/SNAT, etc. |
| disable_rollback | True |
| id | 8d7d3fa7-ae27-4361-a271-8468f07354b3 |
| links | http://172.16.0.1:8004/v1/8d35712bab764e4cb8666dcd0c9a6a50/stacks/region-two-Networks-gp55udj5jo3g-ExternalNetwork-o6mko4qco7i5/8d7d3fa7-ae27-4361-a271-8468f07354b3 (self) |
| notification_topics | [] |
| outputs | [ |
| | { |
| | "output_value": null, ...

Changed in tripleo:
milestone: none → ocata-1
status: New → Triaged
Revision history for this message
Steven Hardy (shardy) wrote :
Download full text (3.5 KiB)

So I think this is actually a configuration problem, not a bug as such.

There's two ways to configure the overlay networks, you can either use Neutron flat networks or define a vlan per network, but in both cases the underlying network (flat name or vlan) must be unique, and just changing the *NetName parameter isn't enough.

# Default networks look like
#| 029108dc-760e-4e90-bbf8-59519d64840c | external | 6933a383-6b7f-4012-8843-b9e4d3c29b83 10.0.0.0/24 |
#| 2317b290-6f74-46e7-8269-d05cd593048f | tenant | 3e6b1de4-486b-48c4-b94a-ec31d316152e 172.16.0.0/24 |
#| 7893b3bd-692c-443c-a9b3-6cc929c91bb1 | ctlplane | dd1f2ee9-499b-4abd-a7bf-de60214bed5e 192.0.2.0/24 |
#| b0418dc1-476b-41c2-a12d-b82fb3f344f1 | internal_api | c3e045ea-570e-4080-a219-603a3c5667ae 172.16.2.0/24 |
#| bd06fc37-7e85-4212-a1c7-1376cf7978a3 | storage | b46d3239-00b2-4d72-84f0-0d5e4d9e0468 172.16.1.0/24 |
#| eadeb10f-b361-49c0-9769-6d6983fa1857 | storage_mgmt | 4b81fc4a-7dbe-4883-8a0f-eb52d07c00eb 172.16.3.0/24 |

And to override it you need to change *NetName and also *NetValueSpecs (because *NetValueSpecs has hard-coded references to the flat network name).

I tested this, which uses flat networking for all except the external network (where I created a new vlan.

parameter_defaults:
  ExternalNetName: external2
  InternalApiNetName: internal2
  ManagementNetName: management2
  StorageMgmtNetName: storagemgt2
  StorageNetName: storage2
  TenantNetName: tenant2

  ExternalSubnetName: external_subnet2
  InternalSubnetName: internal_subnet2
  ManagementSubnetName: management_subnet2
  StorageMgmtSubnetName: storagemgmt_subnet2
  StorageSubnetName: storage_subnet2
  TenantSubnetName: tenant_subnet2

  ExternalAllocationPools: [{'start': '10.0.1.4', 'end': '10.0.1.250'}]
  ExternalInterfaceDefaultRoute: '10.0.1.1'
  # Note this has been created via /etc/sysconfig/network-scripts/ifcfg-vlan20
  # DEVICE=vlan20
  # ONBOOT=yes
  # HOTPLUG=no
  # TYPE=OVSIntPort
  # OVS_BRIDGE=br-ctlplane
  # OVS_OPTIONS="tag=10"
  # BOOTPROTO=static
  # IPADDR=10.0.1.1
  # PREFIX=24
  # NM_CONTROLLED=no
  ExternalNetworkVlanID: 20

  InternalApiNetCidr: '172.16.4.0/24'
  StorageMgmtNetCidr: '172.16.5.0/24'
  StorageNetCidr: '172.16.6.0/24'
  TenantNetCidr: '172.16.7.0/24'
  ManagementNetCidr: '172.16.8.0/24'

  InternalAllocationPools: [{'start': '172.16.4.4', 'end': '172.16.4.250'}]
  StorageMgmtAllocationPools: [{'start': '172.16.5.4', 'end': '172.16.5.250'}]
  StorageAllocationPools: [{'start': '172.16.6.4', 'end': '172.16.6.250'}]
  TenantAllocationPools: [{'start': '172.16.7.4', 'end': '172.16.7.250'}]
  ManagementAllocationPools: [{'start': '172.16.8.4', 'end': '172.16.8.250'}]

  InternalApiNetValueSpecs: {'provider:physical_network': 'internal_api2', 'provider:network_type': 'flat'}
  ManagementNetValueSpecs: {'provider:physical_network': 'management2', 'provider:network_type': 'flat'}
  StorageMgmtNetValueSpecs: {'provider:physical_network': 'storagemgmt2', 'provider:network_type': 'flat'}
  StorageNetValueSpecs: {'provider:physical_network': 'storage2', 'provider:network_type': 'flat'}
  TenantNetValueSpecs: {'provider:physical_network': 'tenant2', 'provider:network...

Read more...

Revision history for this message
Steven Hardy (shardy) wrote :

paste version of the environment file above https://review.openstack.org/#/c/368840/

Changed in tripleo:
status: Triaged → Incomplete
Revision history for this message
Steven Hardy (shardy) wrote :

So, the paste above actually doesn't work, here's an updated version:

http://paste.fedoraproject.org/449607/63726021

You also need to increase the network quota:

openstack quota set --network 100 --subnets 100 admin

You can then deploy an additional overcloud via

[stack@instack ~]$ cat deploy_netiso2.sh
TEMPLATES=/tmp/tripleo-heat-templates
openstack overcloud deploy \
--templates=$TEMPLATES \
-e $TEMPLATES/environments/network-isolation.yaml \
-e $TEMPLATES/environments/net-single-nic-with-vlans.yaml \
-e /home/stack/custom.yaml \
-e netiso2.yaml \
--stack netiso2
[stack@instack ~]$ cat custom.yaml
parameter_defaults:
  EC2MetadataIp: 192.0.2.1
  ControlPlaneDefaultRoute: 192.0.2.1

Changed in tripleo:
status: Incomplete → Triaged
Revision history for this message
Steven Hardy (shardy) wrote :

Rhys if you're happy with the above, I'd like to reword the bug description to say switching the network names is inconvenient and error prone, so it'd be better if we optionally allowed a network prefix (which could just be the stack name), the a lot of the stuff above could be removed.

Changed in tripleo:
assignee: nobody → Steven Hardy (shardy)
summary: - Cannot reuse existing networks when deploying multiple overclouds
+ Defining networks inconvenient when deploying multiple overclouds
Revision history for this message
Rhys Oxenham (rdoxenham) wrote :

Thanks a lot for your support, Steve.

Steven Hardy (shardy)
Changed in tripleo:
milestone: ocata-1 → ocata-2
importance: Low → Medium
Changed in tripleo:
milestone: ocata-2 → ocata-3
Steven Hardy (shardy)
Changed in tripleo:
milestone: ocata-3 → pike-1
Revision history for this message
Joe Talerico (jtaleric) wrote :
Download full text (3.1 KiB)

I have used this method to deploy two different stacks.

Stack 1) All Baremetal nodes for OpenShift
*This stack used the default networks

Stack 2) OpenStack deployment
* This stack uses
parameter_defaults:

  ExternalNetName: external2
  InternalApiNetName: internal_api2
  StorageMgmtNetName: storagemgt2
  StorageNetName: storage2
  TenantNetName: tenant2

  ExternalSubnetName: external_subnet2
  InternalSubnetName: internal_api_subnet2
  StorageMgmtSubnetName: storagemgmt_subnet2
  StorageSubnetName: storage_subnet2
  TenantSubnetName: tenant_subnet2

  InternalApiNetValueSpecs:
      'provider:physical_network': 'internal_api2'
      'provider:network_type': 'flat'
  ExternalNetValueSpecs:
      'provider:physical_network': 'external2'
      'provider:network_type': 'flat'
  StorageNetValueSpecs:
      'provider:physical_network': 'storage2'
      'provider:network_type': 'flat'
  StorageMgmtNetValueSpecs:
      'provider:physical_network': 'storagemgt2'
      'provider:network_type': 'flat'
  TenantNetValueSpecs:
      'provider:physical_network': 'tenant2'
      'provider:network_type': 'flat'

However, on my controllers, it seems to be using resources from Stack1, such as the internal_api.

 [stack@undercloud ~]$ neutron net-list
+--------------------------------------+---------------+----------------------------------------------------+
| id | name | subnets |
+--------------------------------------+---------------+----------------------------------------------------+
| 0aa5ef18-06ac-47c0-b424-22d5fee09606 | internal_api | 62713943-bcaa-4fcb-88a7-329fe8f144a8 172.16.0.0/16 |
| 1366beab-40ff-46bb-abb4-e61c47f37863 | tenant2 | 0eea909c-969b-45eb-b5ad-05d35f623678 172.17.0.0/16 |
| 4005a7de-d43f-4d67-b6fd-0e6ed547882c | tenant | 90267149-42a5-4a8a-82c2-32024267fee8 172.17.0.0/16 |
| 4516cbf4-3258-431f-8939-69c18d994f32 | internal_api2 | 215f46a3-ec1b-42c1-8406-66263819a53b 172.16.0.0/16 |
| 472dc57b-6b22-4962-956f-e37e6dfb2dcc | storage | 8a4c22b0-9fe8-4ace-9bf9-8898fd96c9e6 172.18.0.0/16 |
| 62584d24-fcd1-44c2-a992-60b53c29d540 | ctlplane | f46b26ab-aa9a-4e04-a8db-0e5f02c64574 192.0.0.0/16 |
| a21a3587-42ed-4268-b45b-a21a20cbf3fc | external2 | e2e376e3-d32f-41bf-ac81-ceef26d54e23 10.2.0.0/21 |
| a5b7450e-8f52-40f2-9cee-61e2e3bef7e2 | storagemgt2 | 2dab5417-623d-4673-89e9-687bec96e07f 172.19.0.0/16 |
| aa302c55-f24e-4e44-9d15-ca180ff270df | external | 2d2db959-c191-4e75-8237-2e97b10223ea 10.2.0.0/21 |
| ebd9e5e1-1387-4d37-b334-729b62f6d554 | storage_mgmt | 62a48e37-da59-4651-9d51-4798ec331400 172.19.0.0/16 |
| f08e6d74-f29c-4093-adca-7fa3bb11b436 | storage2 | 47567f2b-6a80-4de3-ab9e-a75c0438b052 172.18.0.0/16 |
+--------------------------------------+---------------+----------------------------------------------------+

| 065b7c04-9354-4663-8b43-1a1546f47468 | redis_virtual_ip | fa:16:3e:06:2b:0f | {"subnet_id": "62713943-bcaa-4fc
b-88a7-329fe8f144a8", "ip_address": "172.16.0.106"} |

^ Is a IP on my controller. However, Stack2 should be using internal_api2,215f46a3-ec1b-42c1-8406-66263819a...

Read more...

Steven Hardy (shardy)
Changed in tripleo:
milestone: pike-1 → pike-2
Changed in tripleo:
milestone: pike-2 → pike-3
Revision history for this message
Emilien Macchi (emilienm) wrote :

There are no currently open reviews on this bug, changing the status back to the previous state and unassigning. If there are active reviews related to this bug, please include links in comments.

Changed in tripleo:
assignee: Steven Hardy (shardy) → nobody
Changed in tripleo:
milestone: pike-3 → pike-rc1
Changed in tripleo:
milestone: pike-rc1 → queens-1
Changed in tripleo:
milestone: queens-1 → queens-2
Changed in tripleo:
milestone: queens-2 → queens-3
Changed in tripleo:
milestone: queens-3 → queens-rc1
Changed in tripleo:
milestone: queens-rc1 → rocky-1
Changed in tripleo:
milestone: rocky-1 → rocky-2
Changed in tripleo:
milestone: rocky-2 → rocky-3
Changed in tripleo:
milestone: rocky-3 → rocky-rc1
Changed in tripleo:
milestone: rocky-rc1 → stein-1
Changed in tripleo:
milestone: stein-1 → stein-2
Revision history for this message
Emilien Macchi (emilienm) wrote : Cleanup EOL bug report

This is an automated cleanup. This bug report has been closed because it
is older than 18 months and there is no open code change to fix this.
After this time it is unlikely that the circumstances which lead to
the observed issue can be reproduced.

If you can reproduce the bug, please:
* reopen the bug report (set to status "New")
* AND add the detailed steps to reproduce the issue (if applicable)
* AND leave a comment "CONFIRMED FOR: <RELEASE_NAME>"
  Only still supported release names are valid (FUTURE, PIKE, QUEENS, ROCKY, STEIN).
  Valid example: CONFIRMED FOR: FUTURE

Changed in tripleo:
importance: Medium → Undecided
status: Triaged → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related blueprints

Remote bug watches

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