diff --git a/dbm-ui/backend/flow/utils/mysql/mysql_act_playload.py b/dbm-ui/backend/flow/utils/mysql/mysql_act_playload.py index 24fa33ce10..a5010084b9 100644 --- a/dbm-ui/backend/flow/utils/mysql/mysql_act_playload.py +++ b/dbm-ui/backend/flow/utils/mysql/mysql_act_playload.py @@ -2338,7 +2338,7 @@ def get_mysql_upgrade_payload(self, **kwargs) -> dict: "extend": { "host": kwargs["ip"], "ports": self.cluster["ports"], - "force": False, + "force": self.ticket_data["force"], "pkg": mysql_pkg.name, "pkg_md5": mysql_pkg.md5, "run": self.cluster["run"], diff --git a/dbm-ui/backend/flow/utils/mysql/proxy_act_payload.py b/dbm-ui/backend/flow/utils/mysql/proxy_act_payload.py index e87c58effd..40e6ea4e37 100644 --- a/dbm-ui/backend/flow/utils/mysql/proxy_act_payload.py +++ b/dbm-ui/backend/flow/utils/mysql/proxy_act_payload.py @@ -88,7 +88,7 @@ def get_proxy_upgrade_payload(self, **kwargs) -> dict: "extend": { "host": kwargs["ip"], "ports": self.cluster["proxy_ports"], - "force": False, + "force": self.ticket_data["force"], "pkg": proxy_pkg.name, "pkg_md5": proxy_pkg.md5, }, diff --git a/dbm-ui/backend/ticket/builders/mysql/mysql_local_upgrade.py b/dbm-ui/backend/ticket/builders/mysql/mysql_local_upgrade.py index 72833f5b45..c6465b75d2 100644 --- a/dbm-ui/backend/ticket/builders/mysql/mysql_local_upgrade.py +++ b/dbm-ui/backend/ticket/builders/mysql/mysql_local_upgrade.py @@ -25,6 +25,7 @@ class InfoSerializer(DisplayInfoSerializer): pkg_id = serializers.IntegerField(help_text=_("目标版本包ID")) infos = serializers.ListField(help_text=_("单据信息"), child=InfoSerializer()) + force = serializers.BooleanField(help_text=_("是否强制执行"), required=False, default=False) class MysqlLocalUpgradeParamBuilder(builders.FlowParamBuilder): diff --git a/dbm-ui/backend/ticket/builders/mysql/mysql_migrate_upgrade.py b/dbm-ui/backend/ticket/builders/mysql/mysql_migrate_upgrade.py index 166431f91b..15fa9e982b 100644 --- a/dbm-ui/backend/ticket/builders/mysql/mysql_migrate_upgrade.py +++ b/dbm-ui/backend/ticket/builders/mysql/mysql_migrate_upgrade.py @@ -44,6 +44,7 @@ class InfoSerializer(DisplayInfoSerializer): ) backup_source = serializers.ChoiceField(help_text=_("备份源"), choices=MySQLBackupSource.get_choices()) infos = serializers.ListField(help_text=_("添加信息"), child=InfoSerializer()) + force = serializers.BooleanField(help_text=_("是否强制执行"), required=False, default=False) def validate(self, attrs): # 校验集群是否可用,集群类型为高可用 diff --git a/dbm-ui/backend/ticket/builders/redis/redis_toolbox_proxy_scale_up.py b/dbm-ui/backend/ticket/builders/redis/redis_toolbox_proxy_scale_up.py index dc64097720..04ffcab7c9 100644 --- a/dbm-ui/backend/ticket/builders/redis/redis_toolbox_proxy_scale_up.py +++ b/dbm-ui/backend/ticket/builders/redis/redis_toolbox_proxy_scale_up.py @@ -35,6 +35,7 @@ class InfoSerializer(ClusterValidateMixin, serializers.Serializer): ip_source = serializers.ChoiceField(help_text=_("主机来源"), choices=IpSource.get_choices()) infos = serializers.ListField(help_text=_("批量操作参数列表"), child=InfoSerializer()) + force = serializers.BooleanField(help_text=_("是否强制执行"), required=False, default=False) class ProxyScaleUpParamBuilder(builders.FlowParamBuilder):