Skip to content

Commit

Permalink
feat(backend): mysql 升级支持安全模式 #7126
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangzhw8 committed Sep 25, 2024
1 parent dbf9a54 commit c279fc2
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dbm-ui/backend/flow/utils/mysql/mysql_act_playload.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand Down
2 changes: 1 addition & 1 deletion dbm-ui/backend/flow/utils/mysql/proxy_act_payload.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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):
# 校验集群是否可用,集群类型为高可用
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit c279fc2

Please sign in to comment.