Bug 1261982 - rhel-osp-director: "openstack undercloud install" should check for existing "ctlplane" network before creating it.
rhel-osp-director: "openstack undercloud install" should check for existing "...
Status: CLOSED CURRENTRELEASE
Product: Red Hat OpenStack
Classification: Red Hat
Component: rhosp-director (Show other bugs)
unspecified
Unspecified Unspecified
high Severity medium
: ---
: 10.0 (Newton)
Assigned To: James Slagle
Shai Revivo
:
: 1306697 (view as bug list)
Depends On:
Blocks: 1290377
  Show dependency treegraph
 
Reported: 2015-09-10 10:35 EDT by Alexander Chuzhoy
Modified: 2016-10-14 11:49 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-10-14 11:49:04 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Alexander Chuzhoy 2015-09-10 10:35:39 EDT
rhel-osp-director: "openstack undercloud install" should check for existing "ctlplane" network before creating it.


Environment:
python-rdomanager-oscplugin-0.0.8-44.el7ost.noarch
instack-undercloud-2.1.2-23.el7ost.noarch


Upon restoring the undercloud from backup, running "openstack undercloud install" fails due to an existing ctlplane network.



The failure looks as following:

2015-09-04 06:58:41 - os_cloud_config.keystone - INFO - Endpoint for service 2489eb68d5eb437f97035cbc5db0786e and public uri http://192.0.2.1:9696/ already exists.
+ rm /tmp/tmp.ldP5wBLeO4
+ openstack role show heat_stack_user
+-------+----------------------------------+
| Field | Value                            |
+-------+----------------------------------+
| id    | 3fb2059c8c754faa8f544c2727e07288 |
| name  | heat_stack_user                  |
+-------+----------------------------------+
+ openstack role list --user admin --project service
+ grep 'admin.*service.*admin'
| 7ddcb9bd359f45e3923e1a9e70a12f2d | admin         | service | admin |
++ os-apply-config --key neutron.dhcp_start --type netaddress
[2015/09/04 06:58:43 AM] [WARNING] DEPRECATED: falling back to /var/run/os-collect-config/os_config_files.json
+ DHCP_START=192.0.2.5
++ os-apply-config --key neutron.dhcp_end --type netaddress
[2015/09/04 06:58:44 AM] [WARNING] DEPRECATED: falling back to /var/run/os-collect-config/os_config_files.json
+ DHCP_END=192.0.2.24
++ os-apply-config --key neutron.network_cidr --type raw
[2015/09/04 06:58:44 AM] [WARNING] DEPRECATED: falling back to /var/run/os-collect-config/os_config_files.json
+ NETWORK_CIDR=192.0.2.0/24
++ os-apply-config --key neutron.network_gateway --type netaddress
[2015/09/04 06:58:44 AM] [WARNING] DEPRECATED: falling back to /var/run/os-collect-config/os_config_files.json
+ NETWORK_GATEWAY=192.0.2.1
+ METADATA_SERVER=192.0.2.1
+ PHYSICAL_NETWORK=ctlplane
++ mktemp
+ NETWORK_JSON=/tmp/tmp.jGoEmslwGl
+ NETWORK_JSON_DATA='{"physical":{}}'
++ jq '.physical = .physical + {
    "gateway": "192.0.2.1",
    "metadata_server": "192.0.2.1",
    "cidr": "192.0.2.0/24",
    "allocation_start": "192.0.2.5",
    "allocation_end": "192.0.2.24",
    "name": "ctlplane",
}'
+ NETWORK_JSON_DATA='{
  "physical": {
    "gateway": "192.0.2.1",
    "metadata_server": "192.0.2.1",
    "cidr": "192.0.2.0/24",
    "allocation_start": "192.0.2.5",
    "allocation_end": "192.0.2.24",
    "name": "ctlplane"
  }
}'
+ '[' -n '' ']'
+ jq .
+ setup-neutron -n /tmp/tmp.jGoEmslwGl
2015-09-04 06:58:45 - root - ERROR - Unexpected error during command execution
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/os_cloud_config/cmd/setup_neutron.py", line 77, in main
    keystone_client=keystone_client)
  File "/usr/lib/python2.7/site-packages/os_cloud_config/neutron.py", line 46, in initialize_neutron
    net = _create_net(neutron_client, network_desc, network_type, admin_tenant)
  File "/usr/lib/python2.7/site-packages/os_cloud_config/neutron.py", line 95, in _create_net
    return neutron.create_network({'network': network})
  File "/usr/lib/python2.7/site-packages/neutronclient/v2_0/client.py", line 102, in with_params
    ret = self.function(instance, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/neutronclient/v2_0/client.py", line 571, in create_network
    return self.post(self.networks_path, body=body)
  File "/usr/lib/python2.7/site-packages/neutronclient/v2_0/client.py", line 298, in post
    headers=headers, params=params)
  File "/usr/lib/python2.7/site-packages/neutronclient/v2_0/client.py", line 211, in do_request
    self._handle_fault_response(status_code, replybody)
  File "/usr/lib/python2.7/site-packages/neutronclient/v2_0/client.py", line 185, in _handle_fault_response
    exception_handler_v20(status_code, des_error_body)
  File "/usr/lib/python2.7/site-packages/neutronclient/v2_0/client.py", line 70, in exception_handler_v20
    status_code=status_code)
Conflict: Unable to create the flat network. Physical network ctlplane is in use.
[2015-09-04 06:58:45,934] (os-refresh-config) [ERROR] during post-configure phase. [Command '['dib-run-parts', '/usr/libexec/os-refresh-config/post-configure.d']' returned non-zero exit status 1]

[2015-09-04 06:58:45,936] (os-refresh-config) [ERROR] Aborting...
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python2.7/site-packages/instack_undercloud/undercloud.py", line 526, in install
    _run_orc(instack_env)
  File "/usr/lib/python2.7/site-packages/instack_undercloud/undercloud.py", line 461, in _run_orc
    _run_live_command(args, instack_env, 'os-refresh-config')
  File "/usr/lib/python2.7/site-packages/instack_undercloud/undercloud.py", line 297, in _run_live_command
    raise RuntimeError('%s failed. See log for details.', name)
RuntimeError: ('%s failed. See log for details.', 'os-refresh-config')
ERROR: openstack Command 'instack-install-undercloud' returned non-zero exit status 1
[stack@localhost ~]$ . stackrc 
[stack@localhost ~]$ neutron net-list
+--------------------------------------+--------------+-----------------------------------------------------+
| id                                   | name         | subnets                                             |
+--------------------------------------+--------------+-----------------------------------------------------+
| 5c940a1b-a3a5-43f4-a05a-d70fe1261a43 | internal_api | bcc50267-9b09-4711-8bca-4bb7467208b7 172.16.20.0/24 |
| 88fe66bf-2d07-42d7-9f93-74e4b1e06733 | tenant       | 386c9672-b613-435b-af74-4061fc6f6b60 172.16.22.0/24 |
| 144c6590-a12b-4164-b15f-f6c719b2cbbf | external     | 9d7b6268-584b-48a6-87de-5c69ec5a46bd 172.16.23.0/24 |
| c36307a8-f2b1-4bfd-903d-c5a360f77c21 | storage      | 568b8459-59db-4bf6-8898-66f80caae9ca 172.16.21.0/24 |
| 8cad58e5-0402-4490-b145-9d34da92bc25 | ctlplane     | d3585127-19d0-4116-80dc-1fa0f44312a2 192.0.2.0/24   |
+--------------------------------------+--------------+-----------------------------------------------------+


"openstack undercloud install" should check for existing ctlplane network and avoid creating it if exists.
Comment 3 Alexander Chuzhoy 2015-09-10 12:36:56 EDT
The re-run of "openstack undercloud install" shouldn't fail due to an existing "ctlplane" network.
Comment 5 Mike Burns 2016-04-07 16:50:54 EDT
This bug did not make the OSP 8.0 release.  It is being deferred to OSP 10.
Comment 7 Dmitry Tantsur 2016-10-14 11:45:42 EDT
*** Bug 1306697 has been marked as a duplicate of this bug. ***
Comment 8 Dan Sneddon 2016-10-14 11:49:04 EDT
This is fixed in the current releases.

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