sureshanaparti commented on PR #12882:
URL: https://github.com/apache/cloudstack/pull/12882#issuecomment-4249109506
Verified with MySQL 8.0.45, upgraded from 4.21.0 -> 4.22.0 ->
4.22.1-SNAPSHOT. The value of the config 'user.password.reset.mail.template' is
updated to default value when previous default values are not changed.
```
(localcloud) 🐱 > list configurations name=user.password.reset.mail.template
{
"configuration": [
{
"category": "Advanced",
"component": "UserPasswordResetManagerImpl",
"defaultvalue": "Hello {{username}}!\nYou have requested to reset your
password. Please click the following link to reset your
password:\n{{{resetLink}}}\nIf you did not request a password reset, please
ignore this email.\n\nRegards,\nThe CloudStack Team",
"description": "Password reset mail template. This uses mustache
template engine. Available variables are: username, firstName, lastName,
resetLink, token",
"displaytext": "User password reset mail template",
"group": "Management Server",
"isdynamic": true,
"name": "user.password.reset.mail.template",
"subgroup": "Security",
"type": "String",
"value": "Hello {{username}}!\nYou have requested to reset your
password. Please click the following link to reset your
password:\n{{{resetLink}}}\nIf you did not request a password reset, please
ignore this email.\n\nRegards,\nThe CloudStack Team"
}
],
"count": 1
}
```
```
mysql> SELECT * FROM cloud.version ORDER by id DESC LIMIT 3;
+----+----------+---------------------+----------+
| id | version | updated | step |
+----+----------+---------------------+----------+
| 49 | 4.22.1.0 | 2026-04-15 04:24:48 | Complete |
| 48 | 4.22.0.0 | 2026-04-15 04:14:39 | Complete |
| 47 | 4.21.0.0 | 2026-04-14 17:49:16 | Complete |
+----+----------+---------------------+----------+
3 rows in set (0.00 sec)
mysql> SELECT * FROM cloud.configuration WHERE name =
'user.password.reset.mail.template'\G;
*************************** 1. row ***************************
category: Advanced
instance: DEFAULT
component: UserPasswordResetManagerImpl
name: user.password.reset.mail.template
value: Hello {{username}}!
You have requested to reset your password. Please click the following link
to reset your password:
{{{resetLink}}}
If you did not request a password reset, please ignore this email.
Regards,
The CloudStack Team
description: Password reset mail template. This uses mustache template
engine. Available variables are: username, firstName, lastName, resetLink, token
default_value: Hello {{username}}!
You have requested to reset your password. Please click the following link
to reset your password:
{{{resetLink}}}
If you did not request a password reset, please ignore this email.
Regards,
The CloudStack Team
updated: 2026-04-15 04:25:01
is_dynamic: 1
group_id: 7
subgroup_id: 21
parent: NULL
display_text: User password reset mail template
kind: NULL
options: NULL
scope: 1
1 row in set (0.00 sec)
```
Upgrade log:
```
2026-04-15 04:24:48,258 DEBUG [c.c.u.d.ScriptRunner] (main:[]) (logid:) --
Update `user.password.reset.mail.template` configuration value to match new
logic
2026-04-15 04:24:48,258 DEBUG [c.c.u.d.ScriptRunner] (main:[]) (logid:)
UPDATE `cloud`.`configuration` SET value = CONCAT_WS('\n', 'Hello
{{username}}!', 'You have requested to reset your password. Please click the
following link to reset your password:', '{{{resetLink}}}', 'If you did not
request a password reset, please ignore this email.', '', 'Regards,', 'The
CloudStack Team') WHERE name = 'user.password.reset.mail.template' AND value
IN (CONCAT_WS('\n', 'Hello {{username}}!', 'You have requested to reset your
password. Please click the following link to reset your password:',
'http://{{{resetLink}}}', 'If you did not request a password reset, please
ignore this email.', '', 'Regards,', 'The CloudStack Team'), CONCAT_WS('\n',
'Hello {{username}}!', 'You have requested to reset your password. Please click
the following link to reset your password:', '{{{domainUrl}}}{{{resetLink}}}',
'If you did not request a password reset, please ignore this email.', '',
'Regards,', 'The Clo
udStack Team'))
2026-04-15 04:24:48,294 INFO [c.c.u.DatabaseUpgradeChecker] (main:[])
(logid:) Cleanup upgrade Upgrade42200to42210 to upgrade from 4.22.0.0-4.22.1.0
to 4.22.1.0
2026-04-15 04:24:48,320 DEBUG [c.c.u.DatabaseUpgradeChecker] (main:[])
(logid:) Upgrade completed for version 4.22.1.0
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]