OS :: Heat :: AutoScalingGroup与实例和启动卷资源相关联,从而导致新的弹性伸缩实例失败

问题描述

我定义了伸缩组配置和实例配置,并将它们合并为一个模板数据。我不知道这样做是否合理。对于某些功能,官员最好使用单独的模板。

{
"disable_rollback": true,"files": {},"parameters": {},"stack_name": "test","template": {
    "description": "Example auto scale group,policy and alarm","heat_template_version": "rocky","resources": {
        "cpu_alarm_high": {
            "properties": {
                "aggregation_method": "mean","alarm_actions": [
                    {
                        "get_attr": [
                            "scaleup_policy","alarm_url"
                        ]
                    }
                ],"comparison_operator": "gt","description": "Scale up if CPU > 50%","evaluation_periods": 1,"granularity": 300,"metric": "cpu_util","query": {
                    "list_join": ["",[{"=": {"server_group": {"get_param": "OS::stack_id"}}}]]
                },"resource_type": "instance","threshold": 50
            },"type": "OS::Aodh::GnocchiAggregationByResourcesAlarm"
        },"cpu_alarm_low": {
            "properties": {
                "aggregation_method": "mean","alarm_actions": [
                    {
                        "get_attr": [
                            "scaledown_policy","comparison_operator": "lt","description": "Scale sown if CPU < 15% for 1 minute","threshold": 15
            },"scaledown_policy": {
            "properties": {
                "adjustment_type": "change_in_capacity","auto_scaling_group_id": {
                    "get_resource": "scaleup_group"
                },"cooldown": 60,"scaling_adjustment": -1
            },"type": "OS::Heat::ScalingPolicy"
        },"scaleup_group": {
            "properties": {
                "cooldown": 60,"desired_capacity": 1,"max_size": 3,"min_size": 1,"resource": {
                    "properties": {
                    "admin_pass": "xxxxxx","block_device_mapping": [{
                        "delete_on_termination": "true","device_name": "vda","volume_id": {
                            "get_resource": "volume"
                        }
                    }],"flavor": "99bad899-8d60-468e-b405-30ad33a76077","networks": [
                        {
                            "network": "external-net"
                        }
                    ],"metadata": {
                        "metering.server_group": {
                            "get_param": "OS::stack_id"
                        }
                    }
                    },"type": "OS::Nova::Server"
                }
            },"type": "OS::Heat::AutoScalingGroup"
        },"scaleup_policy": {
            "properties": {
                "adjustment_type": "change_in_capacity","scaling_adjustment": 1
            },"volume": {
            "properties": {
                "image": "trinet-centos76","size": 10
            },"type": "OS::Cinder::Volume"
        }
    },"outputs": {
        "scale_up_url": {
            "description": "This URL is the webhook to scale up the autoscaling group.  You can invoke the scale-up operation by doing an HTTP POST to this URL; no body nor extra headers are needed.","value": {"get_attr": ["scaleup_policy","alarm_url"]}
        },"scale_dn_url": {
            "description": "This URL is the webhook to scale down the autoscaling group.  You can invoke the scale-down operation by doing an HTTP POST to this URL; no body nor extra headers are needed.","value": {"get_attr": ["scaledown_policy","alarm_url"]}
        }
    }
}

}

可以通过curl命令使用上述json数据来创建堆栈。但是,当警报缩放扩展实例时,热引擎将使用旧实例使用的卷来创建新实例,从而导致无效的卷:接收到无效的输入。 enter image description here

我觉得我使用热量的方式是错误的,但是没有解决的办法。谁能指出我正确的方向?谢谢。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

依赖报错 idea导入项目后依赖报错,解决方案:https://blog....
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下...
错误1:gradle项目控制台输出为乱码 # 解决方案:https://bl...
错误还原:在查询的过程中,传入的workType为0时,该条件不起...
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct...