Skip to content

Commit d360260

Browse files
authored
ENG-MAINT-11111 - Latest MySQL version evaluation fix
1 parent 5a04b6c commit d360260

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cookbooks/ey-mysql/attributes/version.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
lock_major_version = `[ -f "/db/.lock_db_version" ] && grep -E -o '^[0-9]+\.[0-9]+' /db/.lock_db_version `
22
db_stack = lock_major_version == "" ? attribute["dna"]["engineyard"]["environment"]["db_stack_name"] : "mysql#{lock_major_version.gsub(/\./, '_').strip}"
33

4-
default["latest_version_57"] = `apt-cache madison percona-server-common-5.7 |awk '{print $3'} | tail -1`.split("-")[0]
5-
default["latest_version_80"] = `apt-cache madison percona-server-common |awk '{print $3'} | tail -1`.split("-")[0]
4+
default["latest_version_57"] = `apt-cache madison percona-server-common-5.7 | sort -V | awk '{print $3'} | tail -1`.split("-")[0]
5+
default["latest_version_80"] = `apt-cache madison percona-server-common | sort -V | awk '{print $3'} | tail -1`.split("-")[0]
66

77
major_version = ""
88
custom_version = fetch_env_var(node, "EY_MYSQL_VERSION", nil)

0 commit comments

Comments
 (0)