Setting passwords for openstack services in HEX string format breaks deployment: 'err: 12380245 is not a string. It looks to be a Fixnum'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Fuel for OpenStack |
Fix Released
|
High
|
Maksim Malchuk | ||
7.0.x |
Fix Released
|
High
|
Maksim Malchuk |
Bug Description
Fuel version info (7.0 build #289): http://
If password for admin tenant (set manually by cloud administrator) or some OpenStack service (generated automatically by Nailgun) looks like /0X[A-F0-9]+/ (HEX string) then environment deployment fails:
node-1 2015-09-
Steps to reproduce:
1. Create environment
2. Add nodes
3. Set tenant password to '0Xbb44' (without quotes)
4. Deploy environment
Expected result: environment successfully deployed
Actual: deployment fails because password for tenant is not a string
This issue is caused by incompatibility of 'Psych' (default in both) YAML engines in Ruby version 2.1.1 (master node, Astute container) and 1.9.3 (slaves), see details here:
https:/
When Astute dumps string it uses Ruby 2.1.1 which save password as implicit (bare) string:
root@node-1:~# grep quantum_settings /etc/astute.yaml -A 2
quantum_settings:
database:
passwd: 0XbCe855
But Hiera on slaves uses Ruby 1.9.3 which tries to convert unquoted strings to YAML supported formats, so it parses the password as hex/int:
root@node-1:~# hiera quantum_settings | grep database
{"database"
I tried to use Ruby 2.1.1 to load the same YAML and it correctly parsed password as string:
irb(main):002:0> c = File.open(
=> "---\ndatabase:\n passwd: 0XbCe855\n"
irb(main):003:0> hash = YAML::load(c)
=> {"database"
irb(main):004:0> hash['database'
=> String
So looks like we need to upgrade Ruby on slaves to >2.1 version in order to fix this bug.
tags: | added: release-notes |
no longer affects: | fuel/8.0.x |
Changed in fuel: | |
assignee: | Fedor Zhadaev (fzhadaev) → Fuel Python Team (fuel-python) |
Changed in fuel: | |
assignee: | Fuel Python Team (fuel-python) → Fedor Zhadaev (fzhadaev) |
tags: | added: area-python |
Changed in fuel: | |
assignee: | Fedor Zhadaev (fzhadaev) → Fuel Library Team (fuel-library) |
Changed in fuel: | |
assignee: | Fuel Library Team (fuel-library) → Maksim Malchuk (mmalchuk) |
Changed in fuel: | |
status: | Confirmed → In Progress |
tags: | added: tricky |
tags: | added: on-verification |
tags: |
added: 8.0 release-notes-notes removed: release-notes |
tags: |
added: release-notes-done removed: release-notes-notes |
tags: | added: on-verification |
If we want to fix this bug in 7.0 we need to use some workaround, because it's impossible to upgrade Ruby version after HCF. I tried to play with different options in Ruby 2.1.1 (both Psych and Syck modules) to configure Astute to always quote strings explicitly, but with no luck. However I've found another workaround - configure Hiera to use Syck module, which seems parses implicit strings as expected, here is a patch https:/ /review. fuel-infra. org/#/c/ 11489/