<div dir="ltr"><div><div><div><div>When I use the type OS::Heat::Stack inside of the OS::Heat:AutoScalingGroup I get the error Unknown type OS::Heat::Stack. By the way I'm using the version juno of RDO.<br><br></div>Is there any other way to make this work??<br></div>If there is anyone else who can help please don't hesitate. You can find my templates attached. <br><br></div>B.regards,<br></div>Sara<br></div><div class="gmail_extra"><br><div class="gmail_quote">2015-07-28 9:31 GMT+02:00 ICHIBA Sara <span dir="ltr"><<a href="mailto:ichi.sara@gmail.com" target="_blank">ichi.sara@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Ok. I see. Thank you very much. I'll try it :)<br><br></div>B.regards,<br></div>Sara<br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">2015-07-27 18:37 GMT+02:00 Fox, Kevin M <span dir="ltr"><<a href="mailto:Kevin.Fox@pnnl.gov" target="_blank">Kevin.Fox@pnnl.gov</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div style="direction:ltr;font-family:Tahoma;color:#000000;font-size:10pt">No, I mean, use the an OS::Heat::Stack as the type inside the AutoScaling group.<br>
<a href="http://docs.openstack.org/developer/heat/template_guide/openstack.html#OS::Heat::Stack" target="_blank">http://docs.openstack.org/developer/heat/template_guide/openstack.html#OS::Heat::Stack</a><br>
<br>
You can pass in params in like the security group, and inside the nested template, you can put the OS::Nova::Server, OS::Neutron::Port, any SoftwareConfig's, etc.<br>
<br>
Thanks,<br>
Kevin<br>
<br>
<div style="font-family:Times New Roman;color:#000000;font-size:16px">
<hr>
<div style="direction:ltr"><font color="#000000" face="Tahoma" size="2"><b>From:</b> ICHIBA Sara [<a href="mailto:ichi.sara@gmail.com" target="_blank">ichi.sara@gmail.com</a>]<br>
<b>Sent:</b> Monday, July 27, 2015 8:59 AM<br>
<b>To:</b> Fox, Kevin M<br>
<b>Subject:</b> Re: [Rdo-list] [heat] assign securitu group to an autoscaling group<br>
</font><br>
</div><div><div>
<div></div>
<div>
<div dir="ltr">
<div>
<div>thank you Kevin for your response,<br>
</div>
What do you mean by making the group a nested stack ? if you suggest that I use a server of type OS::Nova::Server rather than an autoscaling group it won't be intersting for me any more as I'm looking for a method to scale cassandra. and I despperatly need
a working method to configure the related security group and associate it with each server at the creation.<br>
<br>
</div>
thanks,<br>
sara<br>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">2015-07-27 15:16 GMT+02:00 Fox, Kevin M <span dir="ltr">
<<a href="mailto:Kevin.Fox@pnnl.gov" target="_blank">Kevin.Fox@pnnl.gov</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>I dont think you can share one port across multiple servers.<br>
<br>
Usually its easiest to make the group a nested stack and pass things like security groups to it.<br>
<br>
Thanks,<br>
Kevin <strong>
<div><font color="#000000" face="Tahoma" size="2"> </font></div>
</strong>
<hr>
<font face="Tahoma" size="2"><b>From:</b> <a href="mailto:rdo-list-bounces@redhat.com" target="_blank">
rdo-list-bounces@redhat.com</a> on behalf of ICHIBA Sara<br>
<b>Sent:</b> Monday, July 27, 2015 5:14:16 AM<br>
<b>To:</b> <a href="mailto:rdo-list@redhat.com" target="_blank">rdo-list@redhat.com</a><br>
<b>Subject:</b> [Rdo-list] [heat] assign securitu group to an autoscaling group<br>
</font>
<div>
<div><br>
<div></div>
<div>
<div dir="ltr">
<div>
<div>Hey there. When trying to assign a security group to an autoscaling groups i get some errors. I would really appreciate if you can help me.<br>
</div>
please find below the part of the template which describes the security groups and its usage + the associated logs.<br>
<br>
<br>
=======cassandra_scaling_up_down2.yaml<br>
resources:<br>
security_groups:<br>
type: OS::Neutron::SecurityGroup<br>
properties:<br>
name: security_groups<br>
rules:<br>
- protocol: tcp<br>
port_range_min: 8888<br>
port_range_max: 8888<br>
- protocol: tcp<br>
port_range_min: 7000<br>
port_range_max: 7000<br>
- protocol: tcp<br>
port_range_min: 7001<br>
port_range_max: 7001<br>
- protocol: icmp<br>
- protocol: tcp<br>
port_range_min: 22<br>
port_range_max: 22<br>
- protocol: tcp<br>
port_range_min: 7199<br>
port_range_max: 7199<br>
- protocol: tcp<br>
port_range_min: 9042<br>
port_range_max: 9042<br>
- protocol: tcp<br>
port_range_min: 9160<br>
port_range_max: 9160<br>
db_port:<br>
type: OS::Neutron::Port<br>
properties:<br>
network_id: { get_param: network }<br>
fixed_ips:<br>
- subnet_id: { get_param: subnet_id }<br>
security_groups:<br>
- {get_resource: security_groups}<br>
<br>
group:<br>
type: OS::Heat::AutoScalingGroup<br>
properties:<br>
cooldown: 60<br>
desired_capacity: 1<br>
max_size: 5<br>
min_size: 1<br>
resource:<br>
type: OS::Nova::Server::Cassandra<br>
properties:<br>
flavor: {get_param: flavor}<br>
image: {get_param: image}<br>
key_name: {get_param: key_name}<br>
networks:<br>
- port: {get_resource: db_port}<br>
<br>
<br>
<br>
<br>
<br>
===========environment.cassandra.yaml<br>
resource_registry:<br>
"OS::Nova::Server::Cassandra": "cassandra_envir.yaml"<br>
<br>
<br>
==========cassandra_envir.yaml<br>
resources:<br>
server:<br>
type: OS::Nova::Server<br>
properties:<br>
image: {get_param: image}<br>
flavor: {get_param: flavor}<br>
key_name: {get_param: key_name}<br>
networks:<br>
- port: { get_param: db_port }<br>
metadata: {get_param: metadata}<br>
user_data: {get_param: user_data}<br>
user_data_format: RAW<br>
<br>
<br>
</div>
========/var/log/heat/heat-
<div dir="ltr">engine.log<br>
2015-07-27 13:59:08.423 4665 INFO heat.engine.environment [req-ca831d72-de65-459e-b330-8d89646f522a None] Registering OS::Nova::Server::Cassandra -> file:///etc/heat/templates/cassandra_envir.yaml<br>
2015-07-27 13:59:08.449 4665 INFO heat.engine.environment [req-f6dfcf2b-1936-4be1-b93f-c5cd151207e5 None] Registering OS::Nova::Server::Cassandra -> file:///etc/heat/templates/cassandra_envir.yaml<br>
2015-07-27 13:59:10.678 4665 INFO heat.engine.service [req-d240c68d-3be5-4254-b6bf-fc9dbca09bb6 None] Creating stack cassandra_up_down_lb2<br>
2015-07-27 13:59:10.695 4665 INFO heat.engine.environment [req-d240c68d-3be5-4254-b6bf-fc9dbca09bb6 None] Registering OS::Nova::Server::Cassandra -> file:///etc/heat/templates/cassandra_envir.yaml<br>
2015-07-27 13:59:10.710 4665 INFO heat.engine.resource [req-d240c68d-3be5-4254-b6bf-fc9dbca09bb6 None] Validating HealthMonitor "monitor"<br>
2015-07-27 13:59:10.711 4665 INFO heat.engine.resource [req-d240c68d-3be5-4254-b6bf-fc9dbca09bb6 None] Validating SecurityGroup "security_groups"<br>
2015-07-27 13:59:10.714 4665 INFO heat.engine.resource [req-d240c68d-3be5-4254-b6bf-fc9dbca09bb6 None] Validating Port "lb_vip_port"<br>
2015-07-27 13:59:10.715 4665 INFO heat.engine.resource [req-d240c68d-3be5-4254-b6bf-fc9dbca09bb6 None] Validating FloatingIP "lb_vip_floating_ip"<br>
2015-07-27 13:59:10.715 4665 INFO heat.engine.resource [req-d240c68d-3be5-4254-b6bf-fc9dbca09bb6 None] Validating Port "db_port"<br>
2015-07-27 13:59:10.716 4665 INFO heat.engine.resource [req-d240c68d-3be5-4254-b6bf-fc9dbca09bb6 None] Validating Pool "pool"<br>
2015-07-27 13:59:10.717 4665 INFO heat.engine.resource [req-d240c68d-3be5-4254-b6bf-fc9dbca09bb6 None] Validating LoadBalancer "lb"<br>
2015-07-27 13:59:10.718 4665 INFO heat.engine.resource [req-d240c68d-3be5-4254-b6bf-fc9dbca09bb6 None] Validating AutoScalingResourceGroup "group"<br>
2015-07-27 13:59:10.719 4665 INFO heat.engine.resource [req-d240c68d-3be5-4254-b6bf-fc9dbca09bb6 None] Validating AutoScalingPolicy "scaledown_policy"<br>
2015-07-27 13:59:10.719 4665 INFO heat.engine.resource [req-d240c68d-3be5-4254-b6bf-fc9dbca09bb6 None] Validating AutoScalingPolicy "scaleup_policy"<br>
2015-07-27 13:59:10.720 4665 INFO heat.engine.resource [req-d240c68d-3be5-4254-b6bf-fc9dbca09bb6 None] Validating CeilometerAlarm "cpu_alarm_high"<br>
2015-07-27 13:59:10.721 4665 INFO heat.engine.resource [req-d240c68d-3be5-4254-b6bf-fc9dbca09bb6 None] Validating CeilometerAlarm "cpu_alarm_low"<br>
2015-07-27 13:59:10.722 4665 INFO heat.engine.resource [req-d240c68d-3be5-4254-b6bf-fc9dbca09bb6 None] Validating FloatingIPAssociation "lb_pool_vip"<br>
2015-07-27 13:59:10.909 4665 INFO heat.engine.environment [req-7417820d-085c-4e8f-b135-3ce1242b2c94 None] Registering OS::Nova::Server::Cassandra -> file:///etc/heat/templates/cassandra_envir.yaml<br>
2015-07-27 13:59:10.913 4665 INFO heat.engine.environment [req-7417820d-085c-4e8f-b135-3ce1242b2c94 None] Registering OS::Nova::Server::Cassandra -> file:///etc/heat/templates/cassandra2.yaml<br>
2015-07-27 13:59:10.916 4665 INFO heat.engine.environment [req-7417820d-085c-4e8f-b135-3ce1242b2c94 None] Registering OS::Nova::Server::Cassandra -> file:///etc/heat/templates/single_instance.yaml<br>
2015-07-27 13:59:11.014 4665 INFO heat.engine.stack [-] Stack CREATE IN_PROGRESS (cassandra_up_down_lb2): Stack CREATE started<br>
2015-07-27 13:59:11.015 4665 INFO heat.engine.resource [-] creating HealthMonitor "monitor" Stack "cassandra_up_down_lb2" [fe2a4224-a82d-4da1-8b97-a0bf02a9bffd]<br>
2015-07-27 13:59:11.129 4665 INFO heat.engine.resource [-] creating SecurityGroup "security_groups" Stack "cassandra_up_down_lb2" [fe2a4224-a82d-4da1-8b97-a0bf02a9bffd]<br>
2015-07-27 13:59:11.645 4665 INFO heat.engine.resource [-] creating Port "lb_vip_port" Stack "cassandra_up_down_lb2" [fe2a4224-a82d-4da1-8b97-a0bf02a9bffd]<br>
2015-07-27 13:59:12.831 4665 INFO heat.engine.environment [req-fcb6678c-bd7f-4edc-b257-234f1dd3d7b1 None] Registering OS::Nova::Server::Cassandra -> file:///etc/heat/templates/cassandra_envir.yaml<br>
2015-07-27 13:59:12.835 4665 INFO heat.engine.environment [req-fcb6678c-bd7f-4edc-b257-234f1dd3d7b1 None] Registering OS::Nova::Server::Cassandra -> file:///etc/heat/templates/cassandra2.yaml<br>
2015-07-27 13:59:12.838 4665 INFO heat.engine.environment [req-fcb6678c-bd7f-4edc-b257-234f1dd3d7b1 None] Registering OS::Nova::Server::Cassandra -> file:///etc/heat/templates/single_instance.yaml<br>
2015-07-27 13:59:13.024 4665 INFO heat.engine.resource [-] creating FloatingIP "lb_vip_floating_ip" Stack "cassandra_up_down_lb2" [fe2a4224-a82d-4da1-8b97-a0bf02a9bffd]<br>
2015-07-27 13:59:13.225 4665 INFO heat.engine.resource [-] creating Port "db_port" Stack "cassandra_up_down_lb2" [fe2a4224-a82d-4da1-8b97-a0bf02a9bffd]<br>
2015-07-27 13:59:13.480 4665 INFO heat.engine.resource [-] creating Pool "pool" Stack "cassandra_up_down_lb2" [fe2a4224-a82d-4da1-8b97-a0bf02a9bffd]<br>
2015-07-27 13:59:13.619 4665 INFO heat.engine.environment [req-263836d3-bdd3-4bc8-a990-af7dca34fbea None] Registering OS::Nova::Server::Cassandra -> file:///etc/heat/templates/cassandra_envir.yaml<br>
2015-07-27 13:59:13.646 4665 INFO heat.engine.environment [req-d6dd8afd-e6a5-4224-8fea-993bdbc14609 None] Registering OS::Nova::Server::Cassandra -> file:///etc/heat/templates/cassandra_envir.yaml<br>
2015-07-27 13:59:16.243 4665 INFO heat.engine.environment [req-43937ec1-9155-4c67-b511-0426efa89d2a None] Registering OS::Nova::Server::Cassandra -> file:///etc/heat/templates/cassandra_envir.yaml<br>
2015-07-27 13:59:16.269 4665 INFO heat.engine.environment [req-e2fc1337-86a7-4b45-b6c1-f6a2f8265462 None] Registering OS::Nova::Server::Cassandra -> file:///etc/heat/templates/cassandra_envir.yaml<br>
2015-07-27 13:59:18.318 4665 INFO heat.engine.resource [-] creating LoadBalancer "lb" Stack "cassandra_up_down_lb2" [fe2a4224-a82d-4da1-8b97-a0bf02a9bffd]<br>
2015-07-27 13:59:18.331 4665 INFO heat.engine.resource [-] creating AutoScalingResourceGroup "group" Stack "cassandra_up_down_lb2" [fe2a4224-a82d-4da1-8b97-a0bf02a9bffd]<br>
2015-07-27 13:59:18.345 4665 INFO heat.engine.environment [-] Registering OS::Heat::ScaledResource -> AWS::EC2::Instance<br>
2015-07-27 13:59:18.347 4665 INFO heat.common.urlfetch [-] Fetching data from file:///etc/heat/templates/cassandra_envir.yaml<br>
2015-07-27 13:59:18.351 4665 INFO heat.engine.resource [-] Validating OS::Nova::Server::Cassandra "fespxephgvg2"<br>
2015-07-27 13:59:18.352 4665 INFO heat.engine.stack [-] Property error : fespxephgvg2: Property db_port not assigned<br>
2015-07-27 13:59:18.352 4665 INFO heat.engine.resource [-] CREATE: AutoScalingResourceGroup "group" Stack "cassandra_up_down_lb2" [fe2a4224-a82d-4da1-8b97-a0bf02a9bffd]<br>
2015-07-27 13:59:18.352 4665 TRACE heat.engine.resource Traceback (most recent call last):<br>
2015-07-27 13:59:18.352 4665 TRACE heat.engine.resource File "/usr/lib/python2.7/site-packages/heat/engine/resource.py", line 439, in _action_recorder<br>
2015-07-27 13:59:18.352 4665 TRACE heat.engine.resource yield<br>
2015-07-27 13:59:18.352 4665 TRACE heat.engine.resource File "/usr/lib/python2.7/site-packages/heat/engine/resource.py", line 509, in _do_action<br>
2015-07-27 13:59:18.352 4665 TRACE heat.engine.resource yield self.action_handler_task(action, args=handler_args)<br>
2015-07-27 13:59:18.352 4665 TRACE heat.engine.resource File "/usr/lib/python2.7/site-packages/heat/engine/scheduler.py", line 286, in wrapper<br>
2015-07-27 13:59:18.352 4665 TRACE heat.engine.resource step = next(subtask)<br>
2015-07-27 13:59:18.352 4665 TRACE heat.engine.resource File "/usr/lib/python2.7/site-packages/heat/engine/resource.py", line 480, in action_handler_task<br>
2015-07-27 13:59:18.352 4665 TRACE heat.engine.resource handler_data = handler(*args)<br>
2015-07-27 13:59:18.352 4665 TRACE heat.engine.resource File "/usr/lib/python2.7/site-packages/heat/engine/resources/autoscaling.py", line 573, in handle_create<br>
2015-07-27 13:59:18.352 4665 TRACE heat.engine.resource self._environment())<br>
2015-07-27 13:59:18.352 4665 TRACE heat.engine.resource File "/usr/lib/python2.7/site-packages/heat/engine/stack_resource.py", line 203, in create_with_template<br>
2015-07-27 13:59:18.352 4665 TRACE heat.engine.resource adopt_data)<br>
2015-07-27 13:59:18.352 4665 TRACE heat.engine.resource File "/usr/lib/python2.7/site-packages/heat/engine/stack_resource.py", line 165, in _parse_nested_stack<br>
2015-07-27 13:59:18.352 4665 TRACE heat.engine.resource nested.validate()<br>
2015-07-27 13:59:18.352 4665 TRACE heat.engine.resource File "/usr/lib/python2.7/site-packages/heat/engine/stack.py", line 461, in validate<br>
2015-07-27 13:59:18.352 4665 TRACE heat.engine.resource raise ex<br>
2015-07-27 13:59:18.352 4665 TRACE heat.engine.resource StackValidationFailed: Property error : fespxephgvg2: Property db_port not assigned<br>
2015-07-27 13:59:18.352 4665 TRACE heat.engine.resource<br>
2015-07-27 13:59:19.389 4665 INFO heat.engine.stack [-] Stack CREATE FAILED (cassandra_up_down_lb2): Resource CREATE failed: StackValidationFailed: Property error : fespxephgvg2: Property db_port not assigned<br>
2015-07-27 13:59:19.389 4665 INFO heat.engine.service [-] Stack create failed, status FAILED<br>
<br>
<div>b.regards,<br>
</div>
<div>Sara</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</div></div></div>
</div>
</div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>