Fix upload TestVM failure in HA mode.
Change-Id: Ife3ecbc68b664594965605ee45ae454057223f78
This commit is contained in:
parent
1328c240af
commit
cd34842ffc
|
@ -4,6 +4,7 @@ $fuel_settings = parseyaml(file('/etc/astute.yaml'))
|
|||
if $fuel_settings['swiftstack']['metadata']['enabled'] {
|
||||
|
||||
notice("Enable SwiftStack Swift cluster ingegtation in $deployment_mode")
|
||||
$role = $fuel_settings['role']
|
||||
$deployment_mode = $fuel_settings['deployment_mode']
|
||||
$keystone_vip = $fuel_settings['management_vip']
|
||||
|
||||
|
@ -23,6 +24,7 @@ if $fuel_settings['swiftstack']['metadata']['enabled'] {
|
|||
glance_user => $glance_user,
|
||||
glance_password => $glance_password,
|
||||
tenant => $default_tenant,
|
||||
role => $role,
|
||||
}
|
||||
|
||||
} else {
|
||||
|
|
|
@ -8,6 +8,7 @@ class sscluster (
|
|||
$glance_user = 'glance',
|
||||
$glance_password = 'PASSWORD',
|
||||
$tenant = 'services',
|
||||
$role = 'controller',
|
||||
)
|
||||
{
|
||||
case $::osfamily {
|
||||
|
@ -66,17 +67,19 @@ class sscluster (
|
|||
'glance_store/stores': value => 'glance.store.swift.Store';
|
||||
}
|
||||
|
||||
notice("Update a keystone user for Swift Cluster: ${tenant}:${swift_user}")
|
||||
class {'swift::keystone::auth':
|
||||
auth_name => $swift_user,
|
||||
password => $swift_password,
|
||||
tenant => $tenant,
|
||||
port => '80',
|
||||
public_protocol => 'http',
|
||||
public_address => $api_address,
|
||||
admin_protocol => 'http',
|
||||
admin_address => $api_address,
|
||||
endpoint_prefix => 'KEY',
|
||||
if $role == 'primary-controller' {
|
||||
notice("Update a keystone user for Swift Cluster: ${tenant}:${swift_user}")
|
||||
class {'swift::keystone::auth':
|
||||
auth_name => $swift_user,
|
||||
password => $swift_password,
|
||||
tenant => $tenant,
|
||||
port => '80',
|
||||
public_protocol => 'http',
|
||||
public_address => $api_address,
|
||||
admin_protocol => 'http',
|
||||
admin_address => $api_address,
|
||||
endpoint_prefix => 'KEY',
|
||||
}
|
||||
}
|
||||
|
||||
notice("Start Glance API Service")
|
||||
|
|
|
@ -86,12 +86,12 @@ def upload_image(image)
|
|||
return_code = $?.exitstatus
|
||||
if return_code == 0
|
||||
puts "Image '#{image['img_name']}' is already present!"
|
||||
return 0
|
||||
else
|
||||
stdout = `glance image-delete #{list_of_images[:uuid][0]}`
|
||||
return_code = $?.exitstatus
|
||||
[ stdout, return_code ]
|
||||
end
|
||||
return 0
|
||||
end
|
||||
|
||||
stdout, return_code = image_create(image)
|
||||
|
|
|
@ -5,14 +5,14 @@
|
|||
|
||||
|
||||
- role: ['primary-controller']
|
||||
stage: post_deployment
|
||||
stage: post_deployment/6000
|
||||
type: shell
|
||||
parameters:
|
||||
cmd: ruby delete_entrypoint.rb
|
||||
timeout: 120
|
||||
|
||||
- role: ['primary-controller','controller']
|
||||
stage: post_deployment
|
||||
stage: post_deployment/6100
|
||||
type: puppet
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/sscluster.pp
|
||||
|
@ -20,7 +20,7 @@
|
|||
timeout: 420
|
||||
|
||||
- role: ['primary-controller']
|
||||
stage: post_deployment
|
||||
stage: post_deployment/6200
|
||||
type: shell
|
||||
parameters:
|
||||
cmd: ruby upload_cirros.rb
|
||||
|
|
Loading…
Reference in New Issue