heat stack update is failed... add/remove of lbaasV2's multiple listeners/ports/healthmonitors
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Heat |
New
|
Undecided
|
Unassigned |
Bug Description
(Note: Attachement is archived file of my test heat templates. please see it and text.)
i installed Newton version openstack...
all is working nicely...
in heat, when i try create just autoscalinggrou
<init stack>
# openstack stack create -e env.yaml -t lbaasv2.yaml TEST-LB-PORTS
but, i update heat template for two port(add http 8080)... and i try update exist stack...
<add new listener/pool for adding port>
# openstack stack update -e env-add-port.yaml -t lbaasv2-
=> result is success... but topology of stack-info is not normal.. anyway.. load-balance of request is working...
and, i try remove http/8080... like below..
<delete one port>
# openstack stack update -e env-delete-
=> result is "Update Failed"...
=> some resource is error... autoscalinggroup resource "group"
+------
| Field | Value |
+------
| attributes | {u'outputs_list': None, u'refs': None, u'refs_map': None, u'outputs': None, u'current_size': None} |
| creation_time | 2017-12-
| description | |
| links | [{u'href': u'http://
| | u'rel': u'self'}, {u'href': u'http://
| | u'rel': u'stack'}, {u'href': u'http://
| | -bf4b-8b34105f7
| logical_resource_id | group |
| physical_
| required_by | [u'scaleup_policy', u'scaledown_
| resource_name | group |
| resource_status | UPDATE_FAILED |
| resource_
| resource_type | OS::Heat:
| updated_time | 2017-12-
+------
resource "pool_id2" is not exist in 'lbaasv2-
heat of newton version don't support add/delete listener/pool of lbaasv2 with "stack update"?
this is bug? or my miss configuration?
anyone.. help me...
========= Attachement =======
(lbaasv2.yaml)
heat_template_
description: A simple auto scaling group with LBaaS V2 Service.
#
# Common parameter definitions:
#
parameters:
my_flavor:
type: string
description: Flavor for the server to be created
default: "t1"
constraints:
- custom_constraint: nova.flavor
my_accesskey:
type: string
description: Name of an existing key-pair
default: "jijeong"
constraints:
- custom_constraint: nova.keypair
my_image:
type: string
description: Image ID or image name to use for the server
default: "Ubuntu 16.04 LTS"
constraints:
- custom_constraint: glance.image
my_public_
type: string
description: Neutron Public Network
default: "ext-net"
constraints:
- custom_constraint: neutron.network
my_private_
type: string
description: Neutron Private Network
default: "demo-net"
constraints:
- custom_constraint: neutron.network
my_private_
type: string
description: Neutron SUB-Network
default: "private-subnet"
my_zone:
type: string
description: Availability Zone
default: "nova"
app_port1:
type: string
description: Aplication TCP Port
default: "80"
application_
type: string
description: HTTP Application to install
default: "apache2"
#
# Resource Definitions
#
# Please note: The AutoScaing group resource "OS::Nova:
# is defined in the environment file. You'll find with this template 3 more
# support files:
# - Template-
# be used with openstack or heat "cli". It assumes your server file is
# located in the same directory as the template
# - Template-
# wich assumes your server file is located in a URL (a web server).
# - webserver_lb.yaml: Your server file. Depending of your environment file,
# you should have this file locally or in a web server.
#
#
resources:
#
# Our LBaaS V2 "Load Balancer"
#
lb:
type: OS::Neutron:
properties:
vip_subnet: { get_param: my_private_subnet }
#
# Our LBaaS V2 Listener
#
listener1:
type: OS::Neutron:
#depends_on: lb
properties:
loadbalancer: { get_resource: lb }
protocol: HTTP
protocol_
#
# Our LBaaS V2 Pool
#
pool1:
type: OS::Neutron:
#depends_on: listener1
properties:
lb_algorithm: ROUND_ROBIN
protocol: HTTP
listener: { get_resource: listener1 }
#
# Our LBaaS V2 Health Monitor.
#
monitor1:
type: OS::Neutron:
#depends_on: pool1
properties:
delay: 5
type: HTTP
timeout: 5
max_retries: 3
pool: { get_resource: pool1 }
#
# Our Floating for LB-VIP
#
floating_ip:
type: OS::Neutron:
#depends_on: lb
properties:
floating_
port_id: { get_attr: [lb, vip_port_id ]}
#
# Security Group with access to icmp, tcp port 22 (ssh) and the web application
# port
#
sec_group:
type: OS::Neutron:
properties:
rules:
- remote_ip_prefix: 0.0.0.0/0
protocol: tcp
- remote_ip_prefix: 0.0.0.0/0
protocol: tcp
- remote_ip_prefix: 0.0.0.0/0
protocol: icmp
#
# Our main autoscaling group
#
group:
type: OS::Heat:
#depends_on: [ sec_group, pool1 ]
properties:
cooldown: 60
desired_
max_size: 3
min_size: 2
resource:
type: OS::Nova:
properties:
metadata: {"metering.stack": {get_param: "OS::stack_id"}}
pool_id1: { get_resource: pool1 }
#
# Scale-up-and-down policies:
#
scaleup_policy:
type: OS::Heat:
#depends_on: group
properties:
adjustmen
auto_
cooldown: 60
scaling_
scaledown_policy:
type: OS::Heat:
#depends_on: group
properties:
adjustmen
auto_
cooldown: 60
scaling_
#
# Our alarms:
#
cpu_alarm_high:
type: OS::Ceilometer:
#depends_on: scaleup_policy
properties:
meter_name: cpu_util
description: Scale-up if the average CPU > 50% for 1 minute
statistic: avg
period: 60
evaluatio
threshold: 50
alarm_
- {get_attr: [scaleup_policy, alarm_url]}
# - str_replace:
# template: http://
# params:
# $STACK_ID: {get_param: "OS::stack_id"}
compariso
matching_
cpu_alarm_low:
type: OS::Ceilometer:
#depends_on: scaledown_policy
properties:
meter_name: cpu_util
description: Scale-down if the average CPU < 15% for 10 minutes
statistic: avg
period: 600
evaluatio
threshold: 15
alarm_
- {get_attr: [scaledown_policy, alarm_url]}
# - str_replace:
# template: http://
# params:
# $STACK_ID: {get_param: "OS::stack_id"}
compariso
matching_
#
# And, our output:
#
outputs:
Scale-UP-URL:
value: {get_attr: [scaleup_policy, alarm_url]}
description: Scale-UP ALARM URL
Scale-DOWN-URL:
value: {get_attr: [scaledown_policy, alarm_url]}
description: Scale-DOWN ALARM URL
Scale-
value: {get_attr: [scaleup_policy, signal_url]}
description: Scale-UP Signal URL
Scale-
value: {get_attr: [scaledown_policy, signal_url]}
description: Scale-DOWN Signal URL
LB-URL1:
value:
str_replace:
template: http://
params:
PORT1: { get_param: app_port1 }
(webserver.yaml)
heat_template_
description: Simple Ubuntu BASED Server with Apache and included in a pool.
#
# Common parameter definitions:
# Thos parameters are passed by the main HEAT template
#
parameters:
metadata:
type: json
pool_id1:
type: string
description: LB Service Pool
instance_flavor:
type: string
description: Instance Flavor
server_network:
type: string
description: Instance Network
server_subnet:
type: string
description: Instance Subnet (as a "member")
server_image:
type: string
description: Instance Base Image
server_zone:
type: string
description: Instance Availability Zone
server_secgroup:
type: string
description: Instance Security Group
server_port1:
type: string
description: Instance Application Group
server_key:
type: string
description: Instance SSH Access Key
app_install:
type: string
description: Instance HTTP Application
#
# Our resources:
#
resources:
#
# Our NOVA Instance definition:
#
server:
type: OS::Nova::Server
properties:
key_name: {get_param: server_key}
security_
image: {get_param: server_image}
availabil
flavor: {get_param: instance_flavor}
networks:
- network: {get_param: server_network}
user_
metadata: {get_param: metadata}
user_data:
template: |
# This is our bootstrap secuence
echo "MY APP IS $myapp"
echo "INSTALLING APACHE2"
apt-get update
apt-get -y install apache2
echo "<br>" >> /var/www/
curl -s http://
sed -i '/^Listen/a Listen 8080' /etc/apache2/
# Comment the following two lines in order if you don't want to force
# a autoscale event at boot
while [ 1 ] ; do echo $((13**99)) 1>/dev/null 2>&1; done &
while [ 1 ] ; do echo $((13**99)) 1>/dev/null 2>&1; done &
params:
#
# LBaaS V2 Member definition
#
member1:
type: OS::Neutron:
#depends_on: server
properties:
pool: { get_param: pool_id1 }
address: { get_attr: [server, first_address] }
protocol_
subnet: { get_param: server_subnet }
(env.yaml)
resource_registry:
"OS:
(lbaasv2-
heat_template_
description: A simple auto scaling group with LBaaS V2 Service.
#
# Common parameter definitions:
#
parameters:
my_flavor:
type: string
description: Flavor for the server to be created
default: "t1"
constraints:
- custom_constraint: nova.flavor
my_accesskey:
type: string
description: Name of an existing key-pair
default: "jijeong"
constraints:
- custom_constraint: nova.keypair
my_image:
type: string
description: Image ID or image name to use for the server
default: "Ubuntu 16.04 LTS"
constraints:
- custom_constraint: glance.image
my_public_
type: string
description: Neutron Public Network
default: "ext-net"
constraints:
- custom_constraint: neutron.network
my_private_
type: string
description: Neutron Private Network
default: "demo-net"
constraints:
- custom_constraint: neutron.network
my_private_
type: string
description: Neutron SUB-Network
default: "private-subnet"
my_zone:
type: string
description: Availability Zone
default: "nova"
app_port1:
type: string
description: Aplication TCP Port
default: "80"
app_port2:
type: string
description: Aplication TCP Port
default: "8080"
application_
type: string
description: HTTP Application to install
default: "apache2"
#
# Resource Definitions
#
# Please note: The AutoScaing group resource "OS::Nova:
# is defined in the environment file. You'll find with this template 3 more
# support files:
# - Template-
# be used with openstack or heat "cli". It assumes your server file is
# located in the same directory as the template
# - Template-
# wich assumes your server file is located in a URL (a web server).
# - webserver_lb.yaml: Your server file. Depending of your environment file,
# you should have this file locally or in a web server.
#
#
resources:
#
# Our LBaaS V2 "Load Balancer"
#
lb:
type: OS::Neutron:
properties:
vip_subnet: { get_param: my_private_subnet }
#
# Our LBaaS V2 Listener
#
listener1:
type: OS::Neutron:
#depends_on: lb
properties:
loadbalancer: { get_resource: lb }
protocol: HTTP
protocol_
listener2:
type: OS::Neutron:
#depends_on: lb
properties:
loadbalancer: { get_resource: lb }
protocol: HTTP
protocol_
#
# Our LBaaS V2 Pool
#
pool1:
type: OS::Neutron:
#depends_on: listener1
properties:
lb_algorithm: ROUND_ROBIN
protocol: HTTP
listener: { get_resource: listener1 }
pool2:
type: OS::Neutron:
#depends_on: listener2
properties:
lb_algorithm: ROUND_ROBIN
protocol: HTTP
listener: { get_resource: listener2 }
#
# Our LBaaS V2 Health Monitor.
#
monitor1:
type: OS::Neutron:
#depends_on: pool1
properties:
delay: 5
type: HTTP
timeout: 5
max_retries: 3
pool: { get_resource: pool1 }
monitor2:
type: OS::Neutron:
#depends_on: pool2
properties:
delay: 5
type: HTTP
timeout: 5
max_retries: 3
pool: { get_resource: pool2 }
#
# Our Floating for LB-VIP
#
floating_ip:
type: OS::Neutron:
#depends_on: lb
properties:
floating_
port_id: { get_attr: [lb, vip_port_id ]}
#
# Security Group with access to icmp, tcp port 22 (ssh) and the web application
# port
#
sec_group:
type: OS::Neutron:
properties:
rules:
- remote_ip_prefix: 0.0.0.0/0
protocol: tcp
- remote_ip_prefix: 0.0.0.0/0
protocol: tcp
# - remote_ip_prefix: 0.0.0.0/0
# protocol: tcp
# port_range_min: 22
# port_range_max: 22
- remote_ip_prefix: 0.0.0.0/0
protocol: icmp
#
# Our main autoscaling group
#
group:
type: OS::Heat:
#depends_on: [ sec_group, pool1, pool2 ]
properties:
cooldown: 60
desired_
max_size: 10
min_size: 2
resource:
type: OS::Nova:
properties:
metadata: {"metering.stack": {get_param: "OS::stack_id"}}
pool_id1: { get_resource: pool1 }
pool_id2: { get_resource: pool2 }
#
# Scale-up-and-down policies:
#
scaleup_policy:
type: OS::Heat:
#depends_on: group
properties:
adjustmen
auto_
cooldown: 60
scaling_
scaledown_policy:
type: OS::Heat:
#depends_on: group
properties:
adjustmen
auto_
cooldown: 60
scaling_
#
# Our alarms:
#
cpu_alarm_high:
type: OS::Ceilometer:
#depends_on: scaleup_policy
properties:
meter_name: cpu_util
description: Scale-up if the average CPU > 50% for 1 minute
statistic: avg
period: 60
evaluatio
threshold: 50
alarm_
- {get_attr: [scaleup_policy, alarm_url]}
compariso
matching_
cpu_alarm_low:
type: OS::Ceilometer:
#depends_on: scaledown_policy
properties:
meter_name: cpu_util
description: Scale-down if the average CPU < 15% for 10 minutes
statistic: avg
period: 600
evaluatio
threshold: 15
alarm_
- {get_attr: [scaledown_policy, alarm_url]}
compariso
matching_
#
# And, our output:
#
outputs:
Scale-UP-URL:
value: {get_attr: [scaleup_policy, alarm_url]}
description: Scale-UP ALARM URL
Scale-DOWN-URL:
value: {get_attr: [scaledown_policy, alarm_url]}
description: Scale-DOWN ALARM URL
Scale-
value: {get_attr: [scaleup_policy, signal_url]}
description: Scale-UP Signal URL
Scale-
value: {get_attr: [scaledown_policy, signal_url]}
description: Scale-DOWN Signal URL
LB-URL1:
value:
str_replace:
template:
http://
params:
PORT1: { get_param: app_port1 }
LB-URL2:
value:
str_replace:
template:
http://
params:
PORT2: { get_param: app_port2 }
(webserver-
heat_template_
description: Simple Ubuntu BASED Server with Apache and included in a pool.
#
# Common parameter definitions:
# Thos parameters are passed by the main HEAT template
#
parameters:
metadata:
type: json
pool_id1:
type: string
description: LB Service Pool
pool_id2:
type: string
description: LB Service Pool
instance_flavor:
type: string
description: Instance Flavor
server_network:
type: string
description: Instance Network
server_subnet:
type: string
description: Instance Subnet (as a "member")
server_image:
type: string
description: Instance Base Image
server_zone:
type: string
description: Instance Availability Zone
server_secgroup:
type: string
description: Instance Security Group
server_port1:
type: string
description: Instance Application Group
server_port2:
type: string
description: Instance Application Group
server_key:
type: string
description: Instance SSH Access Key
app_install:
type: string
description: Instance HTTP Application
#
# Our resources:
#
resources:
#
# Our NOVA Instance definition:
#
server:
type: OS::Nova::Server
properties:
key_name: {get_param: server_key}
security_
image: {get_param: server_image}
availabil
flavor: {get_param: instance_flavor}
networks:
- network: {get_param: server_network}
user_
metadata: {get_param: metadata}
user_data:
template: |
# This is our bootstrap secuence
echo "MY APP IS $myapp"
echo "INSTALLING APACHE2"
apt-get update
apt-get -y install apache2
echo "<br>" >> /var/www/
curl -s http://
sed -i '/^Listen/a Listen 8080' /etc/apache2/
# Comment the following two lines in order if you don't want to force
# a autoscale event at boot
#while [ 1 ] ; do echo $((13**99)) 1>/dev/null 2>&1; done &
#while [ 1 ] ; do echo $((13**99)) 1>/dev/null 2>&1; done &
params:
#
# LBaaS V2 Member definition
#
member1:
type: OS::Neutron:
#depends_on: server
properties:
pool: { get_param: pool_id1 }
address: { get_attr: [server, first_address] }
protocol_
subnet: { get_param: server_subnet }
member2:
type: OS::Neutron:
#depends_on: server
properties:
pool: { get_param: pool_id2 }
address: { get_attr: [server, first_address] }
protocol_
subnet: { get_param: server_subnet }
(env-add-port.yaml)
resource_registry:
"OS:
(lbaasv2-
heat_template_
description: A simple auto scaling group with LBaaS V2 Service.
#
# Common parameter definitions:
#
parameters:
my_flavor:
type: string
description: Flavor for the server to be created
default: "t1"
constraints:
- custom_constraint: nova.flavor
my_accesskey:
type: string
description: Name of an existing key-pair
default: "jijeong"
constraints:
- custom_constraint: nova.keypair
my_image:
type: string
description: Image ID or image name to use for the server
default: "Ubuntu 16.04 LTS"
constraints:
- custom_constraint: glance.image
my_public_
type: string
description: Neutron Public Network
default: "ext-net"
constraints:
- custom_constraint: neutron.network
my_private_
type: string
description: Neutron Private Network
default: "demo-net"
constraints:
- custom_constraint: neutron.network
my_private_
type: string
description: Neutron SUB-Network
default: "private-subnet"
my_zone:
type: string
description: Availability Zone
default: "nova"
app_port1:
type: string
description: Aplication TCP Port
default: "80"
application_
type: string
description: HTTP Application to install
default: "apache2"
#
# Resource Definitions
#
# Please note: The AutoScaing group resource "OS::Nova:
# is defined in the environment file. You'll find with this template 3 more
# support files:
# - Template-
# be used with openstack or heat "cli". It assumes your server file is
# located in the same directory as the template
# - Template-
# wich assumes your server file is located in a URL (a web server).
# - webserver_lb.yaml: Your server file. Depending of your environment file,
# you should have this file locally or in a web server.
#
#
resources:
#
# Our LBaaS V2 "Load Balancer"
#
lb:
type: OS::Neutron:
properties:
vip_subnet: { get_param: my_private_subnet }
#
# Our LBaaS V2 Listener
#
listener1:
type: OS::Neutron:
#depends_on: lb
properties:
loadbalancer: { get_resource: lb }
protocol: HTTP
protocol_
#
# Our LBaaS V2 Pool
#
pool1:
type: OS::Neutron:
#depends_on: listener1
properties:
lb_algorithm: ROUND_ROBIN
protocol: HTTP
listener: { get_resource: listener1 }
#
# Our LBaaS V2 Health Monitor.
#
monitor1:
type: OS::Neutron:
#depends_on: pool1
properties:
delay: 5
type: HTTP
timeout: 5
max_retries: 3
pool: { get_resource: pool1 }
#
# Our Floating for LB-VIP
#
floating_ip:
type: OS::Neutron:
#depends_on: lb
properties:
floating_
port_id: { get_attr: [lb, vip_port_id ]}
#
# Security Group with access to icmp, tcp port 22 (ssh) and the web application
# port
#
sec_group:
type: OS::Neutron:
properties:
rules:
- remote_ip_prefix: 0.0.0.0/0
protocol: tcp
# - remote_ip_prefix: 0.0.0.0/0
# protocol: tcp
# port_range_min: 22
# port_range_max: 22
- remote_ip_prefix: 0.0.0.0/0
protocol: icmp
#
# Our main autoscaling group
#
group:
type: OS::Heat:
#depends_on: [ sec_group, pool1 ]
properties:
cooldown: 60
desired_
max_size: 10
min_size: 2
resource:
type: OS::Nova:
properties:
metadata: {"metering.stack": {get_param: "OS::stack_id"}}
pool_id1: { get_resource: pool1 }
#
# Scale-up-and-down policies:
#
scaleup_policy:
type: OS::Heat:
#depends_on: group
properties:
adjustmen
auto_
cooldown: 60
scaling_
scaledown_policy:
type: OS::Heat:
#depends_on: group
properties:
adjustmen
auto_
cooldown: 60
scaling_
#
# Our alarms:
#
cpu_alarm_high:
type: OS::Ceilometer:
#depends_on: scaleup_policy
properties:
meter_name: cpu_util
description: Scale-up if the average CPU > 50% for 1 minute
statistic: avg
period: 60
evaluatio
threshold: 50
alarm_
- {get_attr: [scaleup_policy, alarm_url]}
compariso
matching_
cpu_alarm_low:
type: OS::Ceilometer:
#depends_on: scaledown_policy
properties:
meter_name: cpu_util
description: Scale-down if the average CPU < 15% for 10 minutes
statistic: avg
period: 600
evaluatio
threshold: 15
alarm_
- {get_attr: [scaledown_policy, alarm_url]}
compariso
matching_
#
# And, our output:
#
outputs:
Scale-UP-URL:
value: {get_attr: [scaleup_policy, alarm_url]}
description: Scale-UP ALARM URL
Scale-DOWN-URL:
value: {get_attr: [scaledown_policy, alarm_url]}
description: Scale-DOWN ALARM URL
Scale-
value: {get_attr: [scaleup_policy, signal_url]}
description: Scale-UP Signal URL
Scale-
value: {get_attr: [scaledown_policy, signal_url]}
description: Scale-DOWN Signal URL
LB-URL1:
value:
str_replace:
template:
http://
params:
PORT1: { get_param: app_port1 }
(wwebserver-
heat_template_
description: Simple Ubuntu BASED Server with Apache and included in a pool.
#
# Common parameter definitions:
# Thos parameters are passed by the main HEAT template
#
parameters:
metadata:
type: json
pool_id1:
type: string
description: LB Service Pool
instance_flavor:
type: string
description: Instance Flavor
server_network:
type: string
description: Instance Network
server_subnet:
type: string
description: Instance Subnet (as a "member")
server_image:
type: string
description: Instance Base Image
server_zone:
type: string
description: Instance Availability Zone
server_secgroup:
type: string
description: Instance Security Group
server_port1:
type: string
description: Instance Application Group
server_key:
type: string
description: Instance SSH Access Key
app_install:
type: string
description: Instance HTTP Application
#
# Our resources:
#
resources:
#
# Our NOVA Instance definition:
#
server:
type: OS::Nova::Server
properties:
key_name: {get_param: server_key}
security_
image: {get_param: server_image}
availabil
flavor: {get_param: instance_flavor}
networks:
- network: {get_param: server_network}
user_
metadata: {get_param: metadata}
user_data:
template: |
# This is our bootstrap secuence
echo "MY APP IS $myapp"
echo "INSTALLING APACHE2"
apt-get update
apt-get -y install apache2
echo "<br>" >> /var/www/
curl -s http://
sed -i '/^Listen/a Listen 8080' /etc/apache2/
# Comment the following two lines in order if you don't want to force
# a autoscale event at boot
#while [ 1 ] ; do echo $((13**99)) 1>/dev/null 2>&1; done &
#while [ 1 ] ; do echo $((13**99)) 1>/dev/null 2>&1; done &
params:
#
# LBaaS V2 Member definition
#
member1:
type: OS::Neutron:
#depends_on: server
properties:
pool: { get_param: pool_id1 }
address: { get_attr: [server, first_address] }
protocol_
subnet: { get_param: server_subnet }
(env-delete-
resource_registry:
"OS:
tags: | added: lbaas listener |
description: | updated |
description: | updated |
Changed in heat: | |
milestone: | none → no-priority-tag-bugs |
information type: | Public → Public Security |