Skip to content

Commit

Permalink
Closes-Bug: #1550650
Browse files Browse the repository at this point in the history
    When upgrading from 2.2x code to 3.0, keystone.conf admin_token is changed to newly generated value,
    however all other contrail files which used to have admin_token in 2.2x code and were generated with
    value from 2.2x code retained the old value. In 3.x code, none of the contrail files use token, but since
    in upgrade case, old files were retained and had token, we had token mismatch in config files and this resulted
    in openstack neutron commands failing on upgrade.
    The change is to use the admin_token value from cluster.json (will be the case when cluster is created with 2.2x SM)
    in SM 3.0 when populating hiera data for openstack. If cluster.json does not have admin_token, then only use
    generated value.
    Tested : Successful upgrade from contrail 2.22b117 provisioned using SM 2.22build117, then upgrade SM to R3.0b2723 and
    upgrade contrail to 3.0B2723.
    Also tested fresh provision of contrail 3.0b 2723 with SM 3.0b2723.

Change-Id: Ieec1645bf9c340a5db8b47fcbc0771aebc9847eb
  • Loading branch information
ajoshi9 committed Mar 11, 2016
1 parent a2b6679 commit 3669b82
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/server_mgr_puppet.py
Expand Up @@ -735,7 +735,9 @@ def build_openstack_hiera_file(
mysql_allowed_hosts = list(
set(mysql_allowed_hosts + os_ip_list + config_ip_list + role_ips_dict['config'] + role_ips_dict['openstack'] ))
# end else openstack_params
keystone_admin_token = (subprocess.Popen(["openssl", "rand", "-hex", "10"],stdout=subprocess.PIPE).communicate()[0]).rstrip()
keystone_admin_token = cluster_params.get(
"service_token",
(subprocess.Popen(["openssl", "rand", "-hex", "10"],stdout=subprocess.PIPE).communicate()[0]).rstrip())
template_vals = {
'__openstack_ip__': openstack_ip,
'__subnet_mask__': subnet_mask,
Expand Down

0 comments on commit 3669b82

Please sign in to comment.